Esempio n. 1
0
 private void cancel_Click(object sender, EventArgs e)
 {
     if (FindServicesWorker.IsBusy)
     {
         FindServicesWorker.CancelAsync();
     }
     //CleanUp();
 }
Esempio n. 2
0
 private void ServiceSelectionDialog_FormClosing(object sender, FormClosingEventArgs e)
 {
     this.FindServicesWorker.RunWorkerCompleted -= this.FindServicesWorker_RunWorkerCompleted;
     this.FindServicesWorker.ProgressChanged    -= this.FindServicesWorker_ProgressChanged;
     if (FindServicesWorker.IsBusy)
     {
         FindServicesWorker.CancelAsync();
     }
 }