コード例 #1
0
        private void Decrypt_Click(object sender, RoutedEventArgs e)
        {
            var cipher = new CaesarCipher();

            a = Int32.Parse(ATextBox.Text);
            b = Int32.Parse(BTextBox.Text);



            if (buttin1Clicked == true)
            {
                MessageBox.Show("Decrypted Text: ", cipher.Decrypt(Encrypted_text.Text, a, b, alfabet));
                textbox.Text = cipher.Decrypt(Encrypted_text.Text, a, b, alfabet);
            }
            else if (button2Clicked == true)
            {
                c = Int32.Parse(CTextBox.Text);
                MessageBox.Show("Decrypted Text: ", cipher.Decrypt3d(Encrypted_text.Text, a, b, c, alfabet));

                textbox.Text = cipher.Decrypt3d(Encrypted_text.Text, a, b, c, alfabet);
            }
        }