Example #1
0
 void EnqueueWork(WorkArgument workArgument)
 {
     if (worker.IsBusy)
     {
         works.Enqueue(workArgument);
     }
     else
     {
         StartWork(workArgument);
     }
 }
Example #2
0
 void StartWork(WorkArgument workArgument)
 {
     if (!Disposing && state != null && !state.IsDisposed)
     {
         state.UpdateText(workArgument.WorkName);
     }
     if (!Disposing && progress != null && !progress.IsDisposed)
     {
         progress.UpdateVisible(true);
     }
     BaseBindingSource.SuspendAll();
     worker.RunWorkerAsync(workArgument);
 }