Пример #1
0
 private void caesarbtn_Click(object sender, EventArgs e)
 {
     using (var form = new caesarkeydialog())
     {
         var result = form.ShowDialog();
         if (result == DialogResult.OK)
         {
             caesarkey = form.ReturnValue1;
             CzarEncode encode = new CzarEncode(plaintext, caesarkey);
             outputtext.Text = encode.get_Ciphertext();
             File.WriteAllText(filepath, encode.get_Ciphertext());
         }
     }
 }
Пример #2
0
 private void caesarbtn_Click(object sender, EventArgs e)
 {
     plaintext = inputtext.Text;
     using (var form = new caesarkeydialog())
     {
         var result = form.ShowDialog();
         if (result == DialogResult.OK)
         {
             caesarkey = form.ReturnValue1;
         }
     }
     if (caesarkey != 1024)
     {
         CzarEncode czarobj = new CzarEncode(plaintext, caesarkey);
         outputtext.Text = czarobj.get_Ciphertext();
     }
 }