Exemple #1
0
 private void incrementProgress(int count = 1)
 {
     if (progressBar.InvokeRequired)
     {
         var increment = new IncrementDelegator(progressBar.Increment);
         progressBar.Invoke(increment, count);
     }
     else
     {
         progressBar.Increment(count);
     }
 }
Exemple #2
0
 private void incrementProgressBarMax(int count)
 {
     if (progressBar.InvokeRequired)
     {
         var increment = new IncrementDelegator(incrementProgressBarMax);
         progressBar.Invoke(increment, count);
     }
     else
     {
         actualProgressBarSum += count;
         progressBar.Maximum   = Math.Max(progressBar.Maximum, actualProgressBarSum);
     }
 }