//increments the progressbar of the refresh list button
 private void IncrementProgressBar()
 {
     // InvokeRequired required compares the thread ID of the
     // calling thread to the thread ID of the creating thread.
     // If these threads are different, it returns true.
     if (this.progressBar1.InvokeRequired)
     {
         //call itself on the main thread
         IncrementProgressBarCallback d = new IncrementProgressBarCallback(IncrementProgressBar);
         this.Invoke(d);
     }
     else
     {
         this.progressBar1.Increment(1);
     }
 }
 private void IncrementProgressBar()
 {
     // InvokeRequired required compares the thread ID of the
     // calling thread to the thread ID of the creating thread.
     // If these threads are different, it returns true.
     if (this.cachingProgressBar.InvokeRequired)
     {
         //call itself on the main thread
         IncrementProgressBarCallback d = new IncrementProgressBarCallback(IncrementProgressBar);
         this.Invoke(d);
     }
     else
     {
         this.cachingProgressBar.Increment(1);
     }
 }
Esempio n. 3
0
 //method for display inverting progress
 //delegate for display inverting progress
 private void ProgressBarIncrement()
 {
     if (statusStrip.InvokeRequired)
     {
         var d = new IncrementProgressBarCallback(ProgressBarIncrement);
         Invoke(d);
     }
     else
     {
         filterToolStripProgressBar.Increment(1);
     }
 }