private void mi_typeencrypt_Click(object sender, RoutedEventArgs e) { WindowTypeEncrypt = new WindowTypeEncrypt(); WindowTypeEncrypt.Owner = this; WindowTypeEncrypt.ShowDialog(); if (WindowTypeEncrypt.DialogResult.HasValue && WindowTypeEncrypt.DialogResult.Value) { if (WindowTypeEncrypt.radioButton_cezar.IsChecked == true) Cipher = new Cesar(); else if (WindowTypeEncrypt.radioButton_tritemius.IsChecked == true) Cipher = new Tritemius(); else if (WindowTypeEncrypt.radioButton_xor.IsChecked == true) Cipher = new XOR(); else if (WindowTypeEncrypt.radioButton_Cycle.IsChecked == true) Cipher = new Cycle("1 0 1 1"); else if (WindowTypeEncrypt.radioButton_shtirl.IsChecked == true) Cipher = new Shtirliz(); else if (WindowTypeEncrypt.radioButton_des.IsChecked == true) Cipher = new DES(); else if (WindowTypeEncrypt.radioButton_RSA.IsChecked == true) Cipher = new RSA(); else if (WindowTypeEncrypt.radioButton_El_Gammal.IsChecked == true) Cipher = new El_Gammal(); Cipher.Alphabet = WindowTypeEncrypt.AlphabetString.ToArray(); } }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.WindowTypeEncrypt1 = ((KKLab1.WindowTypeEncrypt)(target)); #line 8 "..\..\WindowTypeEncrypt.xaml" this.WindowTypeEncrypt1.Loaded += new System.Windows.RoutedEventHandler(this.WindowTypeEncrypt1_Loaded); #line default #line hidden return; case 2: this.textBlock1 = ((System.Windows.Controls.TextBlock)(target)); return; case 3: this.textBlock2 = ((System.Windows.Controls.TextBlock)(target)); return; case 4: this.button_ok = ((System.Windows.Controls.Button)(target)); #line 44 "..\..\WindowTypeEncrypt.xaml" this.button_ok.Click += new System.Windows.RoutedEventHandler(this.button_ok_Click); #line default #line hidden return; case 5: this.groupBox = ((System.Windows.Controls.GroupBox)(target)); return; case 6: this.radioButton_cezar = ((System.Windows.Controls.RadioButton)(target)); #line 62 "..\..\WindowTypeEncrypt.xaml" this.radioButton_cezar.Checked += new System.Windows.RoutedEventHandler(this.radioButton_cezar_Checked); #line default #line hidden return; case 7: this.radioButton_tritemius = ((System.Windows.Controls.RadioButton)(target)); #line 65 "..\..\WindowTypeEncrypt.xaml" this.radioButton_tritemius.Checked += new System.Windows.RoutedEventHandler(this.radioButton_tritemius_Checked); #line default #line hidden return; case 8: this.radioButton_xor = ((System.Windows.Controls.RadioButton)(target)); #line 66 "..\..\WindowTypeEncrypt.xaml" this.radioButton_xor.Checked += new System.Windows.RoutedEventHandler(this.radioButton_xor_Checked); #line default #line hidden return; case 9: this.radioButton_Cycle = ((System.Windows.Controls.RadioButton)(target)); #line 67 "..\..\WindowTypeEncrypt.xaml" this.radioButton_Cycle.Checked += new System.Windows.RoutedEventHandler(this.radioButton_Cycle_Checked); #line default #line hidden return; case 10: this.radioButton_shtirl = ((System.Windows.Controls.RadioButton)(target)); #line 68 "..\..\WindowTypeEncrypt.xaml" this.radioButton_shtirl.Checked += new System.Windows.RoutedEventHandler(this.radioButton_shtirl_Checked); #line default #line hidden return; case 11: this.radioButton_des = ((System.Windows.Controls.RadioButton)(target)); #line 69 "..\..\WindowTypeEncrypt.xaml" this.radioButton_des.Checked += new System.Windows.RoutedEventHandler(this.radioButton_des_Checked); #line default #line hidden return; case 12: this.radioButton_RSA = ((System.Windows.Controls.RadioButton)(target)); #line 70 "..\..\WindowTypeEncrypt.xaml" this.radioButton_RSA.Checked += new System.Windows.RoutedEventHandler(this.radioButton_RSA_Checked); #line default #line hidden return; case 13: this.radioButton_El_Gammal = ((System.Windows.Controls.RadioButton)(target)); #line 71 "..\..\WindowTypeEncrypt.xaml" this.radioButton_El_Gammal.Checked += new System.Windows.RoutedEventHandler(this.radioButton_El_Gammal_Checked); #line default #line hidden return; case 14: this.groupBox_alphabet = ((System.Windows.Controls.GroupBox)(target)); return; case 15: this.radioButton_latin = ((System.Windows.Controls.RadioButton)(target)); #line 86 "..\..\WindowTypeEncrypt.xaml" this.radioButton_latin.Checked += new System.Windows.RoutedEventHandler(this.radioButton_latin_Checked); #line default #line hidden return; case 16: this.radioButton_other = ((System.Windows.Controls.RadioButton)(target)); #line 87 "..\..\WindowTypeEncrypt.xaml" this.radioButton_other.Checked += new System.Windows.RoutedEventHandler(this.radioButton_other_Checked); #line default #line hidden return; case 17: this.radioButton_kirilica = ((System.Windows.Controls.RadioButton)(target)); #line 88 "..\..\WindowTypeEncrypt.xaml" this.radioButton_kirilica.Checked += new System.Windows.RoutedEventHandler(this.radioButton_kirilica_Checked); #line default #line hidden return; case 18: this.textBox_alphabet = ((System.Windows.Controls.TextBox)(target)); return; } this._contentLoaded = true; }