private void NonLineare_Click(object sender, EventArgs e) { Motto.Image = null; Lineare.Image = null; CaesarClick.Image = null; NonLineare.Image = Image.FromFile(Application.StartupPath + @"\Picture\galka.jpg"); Tritemius algorithm = new Tritemius(); if (algorithm.CheckText(EntryField.Text)) { return; } if (algorithm.CheckKey("Tritemius.NonLineare", Methods)) { return; } double[] key = new double[3]; string[] key_word = Key.Split(new char[] { ' ' }); key[0] = Convert.ToDouble(key_word[0]); key[1] = Convert.ToDouble(key_word[1]); key[1] = Convert.ToDouble(key_word[2]); switch (Info.language) { case "Англійський": EntryField.Text = algorithm.tritemius(EntryField.Text, algorithm.EnglishAlphabet, "NonLineare", key, Info.encrypt); break; case "Український": EntryField.Text = algorithm.tritemius(EntryField.Text, algorithm.UkraineAlphabet, "NonLineare", key, Info.encrypt); break; } }
private void Motto_Click(object sender, EventArgs e) { Motto.Image = Image.FromFile(Application.StartupPath + @"\Picture\galka.jpg"); Lineare.Image = null; NonLineare.Image = null; Tritemius algorithm = new Tritemius(); if (algorithm.CheckText(EntryField.Text)) { return; } if (algorithm.CheckKey("Tritemius.Motto", Methods)) { return; } MessageBox.Show("Here"); switch (Info.language) { case "Англійський": EntryField.Text = algorithm.tritemius(EntryField.Text, algorithm.EnglishAlphabet, "Motto", Key, Info.encrypt); break; case "Український": EntryField.Text = algorithm.tritemius(EntryField.Text, algorithm.UkraineAlphabet, "Motto", Key, Info.encrypt); break; } }