Пример #1
0
 private void textBox_CipherText_TextChanged(object sender, TextChangedEventArgs e)
 {
     if (textBox_CipherText.IsFocused)
     {
         try {
             textBox_ClearText.Text      = Base64Translator.DecryptBase64(textBox_CipherText.Text, GetSelectedEncoding());
             textBox_ClearText.IsEnabled = true;
         } catch (FormatException) {
             textBox_ClearText.Text      = "Invalid cipher text.";
             textBox_ClearText.IsEnabled = false;
         }
     }
 }