10
10
using Conforyon . Typology ;
11
11
using Conforyon . Unicode ;
12
12
using System ;
13
+ using System . Security . Cryptography ;
13
14
using System . Text . RegularExpressions ;
14
15
using System . Windows . Forms ;
16
+ using TextCopy ;
15
17
16
18
namespace Conforyon . UI
17
19
{
@@ -141,9 +143,25 @@ private void ComboBox()
141
143
}
142
144
143
145
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 )
144
158
{
145
159
Selection6 = "C=>F" ;
146
160
}
161
+ else if ( comboBox6 . SelectedIndex == 4 )
162
+ {
163
+ Selection6 = "F=>K" ;
164
+ }
147
165
else
148
166
{
149
167
Selection6 = "F=>C" ;
@@ -196,7 +214,7 @@ private void ComboBox()
196
214
197
215
if ( comboBox12 . SelectedIndex == 0 )
198
216
{
199
- Selection12 = "Text=>Base64 " ;
217
+ Selection12 = "Text=>Base " ;
200
218
}
201
219
else if ( comboBox12 . SelectedIndex == 1 )
202
220
{
@@ -220,7 +238,15 @@ private void ComboBox()
220
238
}
221
239
else if ( comboBox12 . SelectedIndex == 6 )
222
240
{
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" ;
224
250
}
225
251
226
252
if ( comboBox17 . SelectedIndex == 0 )
@@ -573,7 +599,9 @@ private void Button4_Click(object sender, EventArgs e)
573
599
if ( button4 . Cursor == Cursors . Hand )
574
600
{
575
601
button4 . Cursor = Cursors . No ;
576
- Board . Text . Copy ( textBox4 . Text ) ;
602
+ Board . Text . Copy ( textBox4 ) ;
603
+ ClipboardService . SetText ( textBox4 . Text ) ;
604
+
577
605
}
578
606
}
579
607
catch ( Exception Ex )
@@ -592,10 +620,26 @@ private void Button5_Click(object sender, EventArgs e)
592
620
textBox5 . Text = "1" ;
593
621
}
594
622
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" )
596
636
{
597
637
textBox2 . Text = Celsius . Fahrenheit ( textBox1 . Text , Selection9 , Selection8 , Convert . ToInt32 ( textBox5 . Text ) , Selection7 , "Error!" ) ;
598
638
}
639
+ else if ( Selection6 == "F=>K" )
640
+ {
641
+ textBox2 . Text = Fahrenheit . Kelvin ( textBox1 . Text , Selection9 , Selection8 , Convert . ToInt32 ( textBox5 . Text ) , Selection7 , "Error!" ) ;
642
+ }
599
643
else
600
644
{
601
645
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)
616
660
if ( button6 . Cursor == Cursors . Hand )
617
661
{
618
662
button6 . Cursor = Cursors . No ;
619
- Board . Text . Copy ( textBox2 . Text ) ;
663
+ ClipboardService . SetText ( textBox2 . Text ) ;
620
664
}
621
665
}
622
666
catch ( Exception Ex )
@@ -630,12 +674,28 @@ private void Button7_Click(object sender, EventArgs e)
630
674
try
631
675
{
632
676
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 )
633
693
{
634
694
comboBox6 . SelectedIndex = 1 ;
635
695
}
636
696
else
637
697
{
638
- comboBox6 . SelectedIndex = 0 ;
698
+ comboBox6 . SelectedIndex = 3 ;
639
699
}
640
700
}
641
701
catch ( Exception Ex )
@@ -670,7 +730,7 @@ private void Button9_Click(object sender, EventArgs e)
670
730
if ( button9 . Cursor == Cursors . Hand )
671
731
{
672
732
button9 . Cursor = Cursors . No ;
673
- Board . Text . Copy ( textBox8 . Text ) ;
733
+ ClipboardService . SetText ( textBox8 . Text ) ;
674
734
}
675
735
}
676
736
catch ( Exception Ex )
@@ -751,7 +811,7 @@ private void Button23_Click(object sender, EventArgs e)
751
811
if ( button23 . Cursor == Cursors . Hand )
752
812
{
753
813
button23 . Cursor = Cursors . No ;
754
- Board . Text . Copy ( textBox19 . Text ) ;
814
+ ClipboardService . SetText ( textBox19 . Text ) ;
755
815
}
756
816
}
757
817
catch ( Exception Ex )
@@ -801,7 +861,7 @@ private void Button24_Click(object sender, EventArgs e)
801
861
if ( button24 . Cursor == Cursors . Hand )
802
862
{
803
863
button24 . Cursor = Cursors . No ;
804
- Board . Text . Copy ( textBox22 . Text ) ;
864
+ ClipboardService . SetText ( textBox22 . Text ) ;
805
865
}
806
866
}
807
867
catch ( Exception Ex )
@@ -851,7 +911,7 @@ private void Button10_Click(object sender, EventArgs e)
851
911
if ( button10 . Cursor == Cursors . Hand )
852
912
{
853
913
button10 . Cursor = Cursors . No ;
854
- Board . Text . Copy ( textBox6 . Text + ", " + textBox9 . Text + ", " + textBox10 . Text ) ;
914
+ ClipboardService . SetText ( textBox6 . Text + ", " + textBox9 . Text + ", " + textBox10 . Text ) ;
855
915
}
856
916
}
857
917
catch ( Exception Ex )
@@ -903,7 +963,7 @@ private void Button13_Click(object sender, EventArgs e)
903
963
if ( button13 . Cursor == Cursors . Hand )
904
964
{
905
965
button13 . Cursor = Cursors . No ;
906
- Board . Text . Copy ( textBox11 . Text ) ;
966
+ ClipboardService . SetText ( textBox11 . Text ) ;
907
967
}
908
968
}
909
969
catch ( Exception Ex )
@@ -919,7 +979,7 @@ private void Button14_Click(object sender, EventArgs e)
919
979
if ( button14 . Cursor == Cursors . Hand )
920
980
{
921
981
button14 . Cursor = Cursors . No ;
922
- Board . Text . Copy ( textBox12 . Text ) ;
982
+ ClipboardService . SetText ( textBox12 . Text ) ;
923
983
}
924
984
}
925
985
catch ( Exception Ex )
@@ -956,7 +1016,7 @@ private void Button16_Click(object sender, EventArgs e)
956
1016
try
957
1017
{
958
1018
ComboBox ( ) ;
959
- if ( Selection12 == "Text=>Base64 " )
1019
+ if ( Selection12 == "Text=>Base " )
960
1020
{
961
1021
textBox13 . Text = TEXT . BASE ( textBox14 . Text , "Error!" ) ;
962
1022
}
@@ -980,10 +1040,18 @@ private void Button16_Click(object sender, EventArgs e)
980
1040
{
981
1041
textBox13 . Text = TEXT . SHA512 ( textBox14 . Text , false , "Error!" ) ;
982
1042
}
983
- else if ( Selection12 == "Base64 =>Text" )
1043
+ else if ( Selection12 == "Base =>Text" )
984
1044
{
985
1045
textBox13 . Text = BASE . TEXT ( textBox14 . Text , "Error!" ) ;
986
1046
}
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
+ }
987
1055
988
1056
button17 . Cursor = Cursors . Hand ;
989
1057
}
@@ -998,7 +1066,7 @@ private void Button17_Click(object sender, EventArgs e)
998
1066
if ( button17 . Cursor == Cursors . Hand )
999
1067
{
1000
1068
button17 . Cursor = Cursors . No ;
1001
- Board . Text . Copy ( textBox13 . Text ) ;
1069
+ ClipboardService . SetText ( textBox13 . Text ) ;
1002
1070
}
1003
1071
}
1004
1072
@@ -1007,7 +1075,7 @@ private void Button18_Click(object sender, EventArgs e)
1007
1075
if ( button18 . Cursor == Cursors . Hand )
1008
1076
{
1009
1077
button18 . Cursor = Cursors . No ;
1010
- Board . Text . Copy ( textBox16 . Text ) ;
1078
+ ClipboardService . SetText ( textBox16 . Text ) ;
1011
1079
}
1012
1080
}
1013
1081
@@ -1021,6 +1089,14 @@ private void Button19_Click(object sender, EventArgs e)
1021
1089
{
1022
1090
comboBox12 . SelectedIndex = 0 ;
1023
1091
}
1092
+ else if ( comboBox12 . SelectedIndex == 7 )
1093
+ {
1094
+ comboBox12 . SelectedIndex = 8 ;
1095
+ }
1096
+ else if ( comboBox12 . SelectedIndex == 8 )
1097
+ {
1098
+ comboBox12 . SelectedIndex = 7 ;
1099
+ }
1024
1100
}
1025
1101
1026
1102
private void Button20_Click ( object sender , EventArgs e )
@@ -1117,7 +1193,7 @@ private void Main_Load(object sender, EventArgs e)
1117
1193
comboBox9 . SelectedIndex = comboBox9 . Items . IndexOf ( "Decimal On" ) ;
1118
1194
comboBox10 . SelectedIndex = comboBox10 . Items . IndexOf ( "RGB => HEX" ) ;
1119
1195
comboBox11 . SelectedIndex = comboBox11 . Items . IndexOf ( "Char => ASCII" ) ;
1120
- comboBox12 . SelectedIndex = comboBox12 . Items . IndexOf ( "Text => Base64 " ) ;
1196
+ comboBox12 . SelectedIndex = comboBox12 . Items . IndexOf ( "Text => Base " ) ;
1121
1197
comboBox14 . SelectedIndex = comboBox14 . Items . IndexOf ( "FILE => MD5" ) ;
1122
1198
comboBox13 . SelectedIndex = comboBox13 . Items . IndexOf ( "CM" ) ;
1123
1199
comboBox17 . SelectedIndex = comboBox17 . Items . IndexOf ( "INCH" ) ;
@@ -1132,6 +1208,7 @@ private void Main_Load(object sender, EventArgs e)
1132
1208
comboBox24 . SelectedIndex = comboBox24 . Items . IndexOf ( "Fraction Off" ) ;
1133
1209
comboBox25 . SelectedIndex = comboBox25 . Items . IndexOf ( "Type On" ) ;
1134
1210
comboBox26 . SelectedIndex = comboBox26 . Items . IndexOf ( "Miles Per Hour => Kilometers Per Hour" ) ;
1211
+ comboBox27 . SelectedIndex = comboBox27 . Items . IndexOf ( "CBC" ) ;
1135
1212
}
1136
1213
catch ( Exception Ex )
1137
1214
{
0 commit comments