private void button2_Click(object sender, EventArgs e) { ProstoiZaminu pr = new ProstoiZaminu(); pr.alphaREplace(textBox1.Text[0], textBox2.Text[0]); textBox3.Text = pr.GetAlphaIN(); textBox4.Text = pr.GetAlphaOUT(); button1_Click(sender, e); }
private void button1_Click(object sender, EventArgs e) { richTextBox2.Text = ""; switch (comboBox1.SelectedIndex) { case 0: { Cesar ces = new Cesar(Convert.ToInt16(keytextBox.Text)); foreach (char c in richTextBox1.Text) { richTextBox2.Text += ces.chifer(c); } } break; case 1: { ProstoiZaminu pz = new ProstoiZaminu(); foreach (char c in richTextBox1.Text) { richTextBox2.Text += pz.chifer(c); } } break; case 2: { Vijiner vij = new Vijiner(keytextBox.Text.ToUpper()); foreach (char c in richTextBox1.Text) { richTextBox2.Text += vij.chifer(c); } } break; default: MessageBox.Show("wrong comand"); break; } }