Esempio n. 1
0
 private static void CheckNext(TaskInfo obj)
 {
     taskrunning = false;
     if (Finished != null && obj != null) Finished(obj);
     if (pending.Count > 0)
     {
         taskrunning = true;
         TaskInfo info = pending.Dequeue();
         info.Task.ContinueWith(() => CheckNext(info));
         info.Task.Start();
         if (Started != null) Started(info);
     }
 }
Esempio n. 2
0
 private void taskstarted(TaskInfo obj)
 {
     try
     {
         Invoke(new MethodInvoker(() =>
         {
             statLabel.Text = obj.Label;
             if (obj.ShowProg)
             {
                 progBar.Visible = true;
                 progBarTimer.Start();
             }
         }));
     }
     catch { /* Disposed */}
 }
Esempio n. 3
0
 private void taskfinished(TaskInfo obj)
 {
     try
     {
         Invoke(new MethodInvoker(() =>
         {
             progBar.Visible = false; progBarTimer.Stop();
             statLabel.Text = TaskManager.defaultLabel;
         }));
     }
     catch { /* Disposed */}
 }