private void end_config_button_Click(object sender, EventArgs e) { int key = 0; string alphabet = ""; try { key = int.Parse(key_textbox.Text); } catch { MessageBox.Show("Input key number!"); return; } if (russian_language_checkbox.Checked) { alphabet = russian_alphabet; } if (english_language_checkbox.Checked) { alphabet = english_alphabet; } else { alphabet = english_alphabet; // default value } conf = new CesaarConfig(alphabet, key); form.encrypt_button.Enabled = true; form.decrypt_button.Enabled = true; this.Close(); }
public Cesaar_Cryptor(CesaarConfig conf) : this(conf.Key, conf.Alphabet) { }