Ejemplo n.º 1
0
 void EnqueueWork(WorkArgument workArgument)
 {
     if (worker.IsBusy)
     {
         works.Enqueue(workArgument);
     }
     else
     {
         StartWork(workArgument);
     }
 }
Ejemplo n.º 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);
 }