Exemplo n.º 1
0
  /// <summary>Called if a search fails with an exception.</summary>
  void SearchFailed(Exception ex)
  {
    bool throwError = !searchStartedFromUI; // save this because it'll be clobbered by SearchFinished

    SearchFinished();

    if(!(ex is ThreadAbortException))
    {
      if(throwError) throw ex;
      else PGPUI.ShowErrorDialog("searching", ex);
    }
  }
Exemplo n.º 2
0
 void btnAdd_Click(object sender, EventArgs e)
 {
   NewSubkeyForm form = new NewSubkeyForm(pgp);
   if(form.ShowDialog() == DialogResult.OK)
   {
     ProgressForm progress = new ProgressForm("Generating Subkey",
       "Please wait while the subkey is generated. This may take several minutes. Actively typing and performing "+
       "disk-intensive operations can help speed up the process.",
       delegate { pgp.AddSubkey(key, form.KeyType, form.Capabilities, form.KeyLength, form.Expiration); });
     if(progress.ShowDialog() == DialogResult.Abort && progress.Exception != null)
     {
       PGPUI.ShowErrorDialog("creating the subkey", progress.Exception);
     }
     ReloadKey();
   }
 }
Exemplo n.º 3
0
 void GenerationFailed(Exception ex)
 {
   GenerationFinished();
   PGPUI.ShowErrorDialog("generating the key", ex);
 }