예제 #1
0
 private void IncrementProgress()
 {
     if (this.progressBar1.InvokeRequired)
     {
         IncrementProgressCallback cb = new IncrementProgressCallback(IncrementProgress);
         this.Invoke(cb, new object[] { });
     }
     else
     {
         this.progressBar1.PerformStep();
     }
 }
예제 #2
0
 /// <summary>
 /// Thread-safe method for incrementing (or decrementing) the progress bar.
 /// </summary>
 private void IncrementProgress(int value)
 {
     if (this.prgUpdate.InvokeRequired)
     {
         IncrementProgressCallback prgCallback = new IncrementProgressCallback(IncrementProgress);
         this.Invoke(prgCallback, new object[] { value });
     }
     else
     {
         prgUpdate.Value += value;
         prgUpdate.Refresh();
     }
 }
예제 #3
0
 private void IncrementProgress()
 {
     if (progressBar1.InvokeRequired)
     {
         var cb = new IncrementProgressCallback(IncrementProgress);
         Invoke(cb, new object[] { });
     }
     else
         progressBar1.PerformStep();
 }
예제 #4
0
 private void IncrementProgress()
 {
     if (this.progressBar1.InvokeRequired)
     {
         IncrementProgressCallback cb = new IncrementProgressCallback(IncrementProgress);
         this.Invoke(cb, new object[] { });
     }
     else
     {
         this.progressBar1.PerformStep();
     }
 }