Example #1
0
 private static string AskForEncryptionPassphrase()
 {
     using (EncryptPassphraseDialog passphraseDialog = new EncryptPassphraseDialog())
     {
         passphraseDialog.ShowPassphraseCheckBox.Checked = Settings.Default.ShowEncryptPasshrase;
         DialogResult dialogResult = passphraseDialog.ShowDialog();
         if (dialogResult != DialogResult.OK)
         {
             return(String.Empty);
         }
         if (passphraseDialog.ShowPassphraseCheckBox.Checked != Settings.Default.ShowEncryptPasshrase)
         {
             Settings.Default.ShowEncryptPasshrase = passphraseDialog.ShowPassphraseCheckBox.Checked;
             Settings.Default.Save();
         }
         return(passphraseDialog.PassphraseTextBox.Text);
     }
 }
Example #2
0
 private static string AskForEncryptionPassphrase()
 {
     using (EncryptPassphraseDialog passphraseDialog = new EncryptPassphraseDialog())
     {
         passphraseDialog.ShowPassphraseCheckBox.Checked = Settings.Default.ShowEncryptPasshrase;
         DialogResult dialogResult = passphraseDialog.ShowDialog();
         if (dialogResult != DialogResult.OK)
         {
             return String.Empty;
         }
         if (passphraseDialog.ShowPassphraseCheckBox.Checked != Settings.Default.ShowEncryptPasshrase)
         {
             Settings.Default.ShowEncryptPasshrase = passphraseDialog.ShowPassphraseCheckBox.Checked;
             Settings.Default.Save();
         }
         return passphraseDialog.PassphraseTextBox.Text;
     }
 }