private void CancelButton_Click(object sender, EventArgs e)
 {
     CancelBtn.Enabled = false;
     if (OnBeginBackgroundWork != null)
     {
         SlowWork.CancelAsync();
         ExceptionResult   = "aborted by user";
         StatusLabel.Text += ", aborting...";
     }
 }
Exemple #2
0
 private void SlowProgressDialog_Shown(object sender, EventArgs e)
 {
     if (OnBeginBackgroundWork != null)
     {
         SlowWork.RunWorkerAsync();
     }
     else
     {
         DialogResult = DialogResult.Abort;
     }
 }
 private void SlowProgressDialog_Shown(object sender, EventArgs e)
 {
     if (OnBeginBackgroundWork != null)
     {
         ExceptionResult   = null;
         CancelBtn.Enabled = true;
         SlowWork.RunWorkerAsync();
     }
     else
     {
         DialogResult = DialogResult.Abort;
     }
 }