Skip to content
This repository was archived by the owner on Jun 3, 2023. It is now read-only.

Commit 2239b15

Browse files
committed
UI & UX Revise
1 parent 0fef995 commit 2239b15

File tree

15 files changed

+386
-151
lines changed

15 files changed

+386
-151
lines changed

.screenshots/UI.png

12.4 KB
Loading

demo/Conforyon.UI/Conforyon.UI/Conforyon.UI.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
<StartupObject>Conforyon.UI.Program</StartupObject>
1616
</PropertyGroup>
1717
<ItemGroup>
18-
<PackageReference Include="Conforyon" Version="2.0.0.0" />
18+
<PackageReference Include="Conforyon" Version="2.0.0.1" />
19+
<PackageReference Include="TextCopy" Version="6.1.0" />
1920
</ItemGroup>
2021
</Project>

demo/Conforyon.UI/Conforyon.UI/Main.Designer.cs

Lines changed: 43 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demo/Conforyon.UI/Conforyon.UI/Main.cs

Lines changed: 94 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@
1010
using Conforyon.Typology;
1111
using Conforyon.Unicode;
1212
using System;
13+
using System.Security.Cryptography;
1314
using System.Text.RegularExpressions;
1415
using System.Windows.Forms;
16+
using TextCopy;
1517

1618
namespace Conforyon.UI
1719
{
@@ -141,9 +143,25 @@ private void ComboBox()
141143
}
142144

143145
if (comboBox6.SelectedIndex == 0)
146+
{
147+
Selection6 = "K=>C";
148+
}
149+
else if (comboBox6.SelectedIndex == 1)
150+
{
151+
Selection6 = "K=>F";
152+
}
153+
else if (comboBox6.SelectedIndex == 2)
154+
{
155+
Selection6 = "C=>K";
156+
}
157+
else if (comboBox6.SelectedIndex == 3)
144158
{
145159
Selection6 = "C=>F";
146160
}
161+
else if (comboBox6.SelectedIndex == 4)
162+
{
163+
Selection6 = "F=>K";
164+
}
147165
else
148166
{
149167
Selection6 = "F=>C";
@@ -196,7 +214,7 @@ private void ComboBox()
196214

197215
if (comboBox12.SelectedIndex == 0)
198216
{
199-
Selection12 = "Text=>Base64";
217+
Selection12 = "Text=>Base";
200218
}
201219
else if (comboBox12.SelectedIndex == 1)
202220
{
@@ -220,7 +238,15 @@ private void ComboBox()
220238
}
221239
else if (comboBox12.SelectedIndex == 6)
222240
{
223-
Selection12 = "Base64=>Text";
241+
Selection12 = "Base=>Text";
242+
}
243+
else if (comboBox12.SelectedIndex == 7)
244+
{
245+
Selection12 = "Aes=>Encrypt";
246+
}
247+
else
248+
{
249+
Selection12 = "Aes=>Decrypt";
224250
}
225251

226252
if (comboBox17.SelectedIndex == 0)
@@ -573,7 +599,9 @@ private void Button4_Click(object sender, EventArgs e)
573599
if (button4.Cursor == Cursors.Hand)
574600
{
575601
button4.Cursor = Cursors.No;
576-
Board.Text.Copy(textBox4.Text);
602+
Board.Text.Copy(textBox4);
603+
ClipboardService.SetText(textBox4.Text);
604+
577605
}
578606
}
579607
catch (Exception Ex)
@@ -592,10 +620,26 @@ private void Button5_Click(object sender, EventArgs e)
592620
textBox5.Text = "1";
593621
}
594622

595-
if (Selection6 == "C=>F")
623+
if (Selection6 == "K=>C")
624+
{
625+
textBox2.Text = Kelvin.Celsius(textBox1.Text, Selection9, Selection8, Convert.ToInt32(textBox5.Text), Selection7, "Error!");
626+
}
627+
else if (Selection6 == "K=>F")
628+
{
629+
textBox2.Text = Kelvin.Fahrenheit(textBox1.Text, Selection9, Selection8, Convert.ToInt32(textBox5.Text), Selection7, "Error!");
630+
}
631+
else if (Selection6 == "C=>K")
632+
{
633+
textBox2.Text = Celsius.Kelvin(textBox1.Text, Selection9, Selection8, Convert.ToInt32(textBox5.Text), Selection7, "Error!");
634+
}
635+
else if (Selection6 == "C=>F")
596636
{
597637
textBox2.Text = Celsius.Fahrenheit(textBox1.Text, Selection9, Selection8, Convert.ToInt32(textBox5.Text), Selection7, "Error!");
598638
}
639+
else if (Selection6 == "F=>K")
640+
{
641+
textBox2.Text = Fahrenheit.Kelvin(textBox1.Text, Selection9, Selection8, Convert.ToInt32(textBox5.Text), Selection7, "Error!");
642+
}
599643
else
600644
{
601645
textBox2.Text = Fahrenheit.Celsius(textBox1.Text, Selection9, Selection8, Convert.ToInt32(textBox5.Text), Selection7, "Error!");
@@ -616,7 +660,7 @@ private void Button6_Click(object sender, EventArgs e)
616660
if (button6.Cursor == Cursors.Hand)
617661
{
618662
button6.Cursor = Cursors.No;
619-
Board.Text.Copy(textBox2.Text);
663+
ClipboardService.SetText(textBox2.Text);
620664
}
621665
}
622666
catch (Exception Ex)
@@ -630,12 +674,28 @@ private void Button7_Click(object sender, EventArgs e)
630674
try
631675
{
632676
if (comboBox6.SelectedIndex == 0)
677+
{
678+
comboBox6.SelectedIndex = 2;
679+
}
680+
else if (comboBox6.SelectedIndex == 1)
681+
{
682+
comboBox6.SelectedIndex = 4;
683+
}
684+
else if (comboBox6.SelectedIndex == 2)
685+
{
686+
comboBox6.SelectedIndex = 0;
687+
}
688+
else if (comboBox6.SelectedIndex == 3)
689+
{
690+
comboBox6.SelectedIndex = 5;
691+
}
692+
else if (comboBox6.SelectedIndex == 4)
633693
{
634694
comboBox6.SelectedIndex = 1;
635695
}
636696
else
637697
{
638-
comboBox6.SelectedIndex = 0;
698+
comboBox6.SelectedIndex = 3;
639699
}
640700
}
641701
catch (Exception Ex)
@@ -670,7 +730,7 @@ private void Button9_Click(object sender, EventArgs e)
670730
if (button9.Cursor == Cursors.Hand)
671731
{
672732
button9.Cursor = Cursors.No;
673-
Board.Text.Copy(textBox8.Text);
733+
ClipboardService.SetText(textBox8.Text);
674734
}
675735
}
676736
catch (Exception Ex)
@@ -751,7 +811,7 @@ private void Button23_Click(object sender, EventArgs e)
751811
if (button23.Cursor == Cursors.Hand)
752812
{
753813
button23.Cursor = Cursors.No;
754-
Board.Text.Copy(textBox19.Text);
814+
ClipboardService.SetText(textBox19.Text);
755815
}
756816
}
757817
catch (Exception Ex)
@@ -801,7 +861,7 @@ private void Button24_Click(object sender, EventArgs e)
801861
if (button24.Cursor == Cursors.Hand)
802862
{
803863
button24.Cursor = Cursors.No;
804-
Board.Text.Copy(textBox22.Text);
864+
ClipboardService.SetText(textBox22.Text);
805865
}
806866
}
807867
catch (Exception Ex)
@@ -851,7 +911,7 @@ private void Button10_Click(object sender, EventArgs e)
851911
if (button10.Cursor == Cursors.Hand)
852912
{
853913
button10.Cursor = Cursors.No;
854-
Board.Text.Copy(textBox6.Text + ", " + textBox9.Text + ", " + textBox10.Text);
914+
ClipboardService.SetText(textBox6.Text + ", " + textBox9.Text + ", " + textBox10.Text);
855915
}
856916
}
857917
catch (Exception Ex)
@@ -903,7 +963,7 @@ private void Button13_Click(object sender, EventArgs e)
903963
if (button13.Cursor == Cursors.Hand)
904964
{
905965
button13.Cursor = Cursors.No;
906-
Board.Text.Copy(textBox11.Text);
966+
ClipboardService.SetText(textBox11.Text);
907967
}
908968
}
909969
catch (Exception Ex)
@@ -919,7 +979,7 @@ private void Button14_Click(object sender, EventArgs e)
919979
if (button14.Cursor == Cursors.Hand)
920980
{
921981
button14.Cursor = Cursors.No;
922-
Board.Text.Copy(textBox12.Text);
982+
ClipboardService.SetText(textBox12.Text);
923983
}
924984
}
925985
catch (Exception Ex)
@@ -956,7 +1016,7 @@ private void Button16_Click(object sender, EventArgs e)
9561016
try
9571017
{
9581018
ComboBox();
959-
if (Selection12 == "Text=>Base64")
1019+
if (Selection12 == "Text=>Base")
9601020
{
9611021
textBox13.Text = TEXT.BASE(textBox14.Text, "Error!");
9621022
}
@@ -980,10 +1040,18 @@ private void Button16_Click(object sender, EventArgs e)
9801040
{
9811041
textBox13.Text = TEXT.SHA512(textBox14.Text, false, "Error!");
9821042
}
983-
else if (Selection12 == "Base64=>Text")
1043+
else if (Selection12 == "Base=>Text")
9841044
{
9851045
textBox13.Text = BASE.TEXT(textBox14.Text, "Error!");
9861046
}
1047+
else if (Selection12 == "Aes=>Encrypt")
1048+
{
1049+
textBox13.Text = AES.Encrypt(textBox14.Text, textBox27.Text, textBox28.Text, (CipherMode)comboBox27.SelectedIndex + 1, "Error!");
1050+
}
1051+
else if (Selection12 == "Aes=>Decrypt")
1052+
{
1053+
textBox13.Text = AES.Decrypt(textBox14.Text, textBox27.Text, textBox28.Text, (CipherMode)comboBox27.SelectedIndex + 1, "Error!");
1054+
}
9871055

9881056
button17.Cursor = Cursors.Hand;
9891057
}
@@ -998,7 +1066,7 @@ private void Button17_Click(object sender, EventArgs e)
9981066
if (button17.Cursor == Cursors.Hand)
9991067
{
10001068
button17.Cursor = Cursors.No;
1001-
Board.Text.Copy(textBox13.Text);
1069+
ClipboardService.SetText(textBox13.Text);
10021070
}
10031071
}
10041072

@@ -1007,7 +1075,7 @@ private void Button18_Click(object sender, EventArgs e)
10071075
if (button18.Cursor == Cursors.Hand)
10081076
{
10091077
button18.Cursor = Cursors.No;
1010-
Board.Text.Copy(textBox16.Text);
1078+
ClipboardService.SetText(textBox16.Text);
10111079
}
10121080
}
10131081

@@ -1021,6 +1089,14 @@ private void Button19_Click(object sender, EventArgs e)
10211089
{
10221090
comboBox12.SelectedIndex = 0;
10231091
}
1092+
else if (comboBox12.SelectedIndex == 7)
1093+
{
1094+
comboBox12.SelectedIndex = 8;
1095+
}
1096+
else if (comboBox12.SelectedIndex == 8)
1097+
{
1098+
comboBox12.SelectedIndex = 7;
1099+
}
10241100
}
10251101

10261102
private void Button20_Click(object sender, EventArgs e)
@@ -1117,7 +1193,7 @@ private void Main_Load(object sender, EventArgs e)
11171193
comboBox9.SelectedIndex = comboBox9.Items.IndexOf("Decimal On");
11181194
comboBox10.SelectedIndex = comboBox10.Items.IndexOf("RGB => HEX");
11191195
comboBox11.SelectedIndex = comboBox11.Items.IndexOf("Char => ASCII");
1120-
comboBox12.SelectedIndex = comboBox12.Items.IndexOf("Text => Base64");
1196+
comboBox12.SelectedIndex = comboBox12.Items.IndexOf("Text => Base");
11211197
comboBox14.SelectedIndex = comboBox14.Items.IndexOf("FILE => MD5");
11221198
comboBox13.SelectedIndex = comboBox13.Items.IndexOf("CM");
11231199
comboBox17.SelectedIndex = comboBox17.Items.IndexOf("INCH");
@@ -1132,6 +1208,7 @@ private void Main_Load(object sender, EventArgs e)
11321208
comboBox24.SelectedIndex = comboBox24.Items.IndexOf("Fraction Off");
11331209
comboBox25.SelectedIndex = comboBox25.Items.IndexOf("Type On");
11341210
comboBox26.SelectedIndex = comboBox26.Items.IndexOf("Miles Per Hour => Kilometers Per Hour");
1211+
comboBox27.SelectedIndex = comboBox27.Items.IndexOf("CBC");
11351212
}
11361213
catch (Exception Ex)
11371214
{

0 commit comments

Comments
 (0)