Example #1
0
 private void ProgressBarSetValue(int val)
 {
     if (this.progressBar1.InvokeRequired)
     {
         ProgressBarSetValueCallback d = new ProgressBarSetValueCallback(ProgressBarSetValue);
         this.Invoke(d, new object[] { val });
     }
     else
     {
         progressBar1.Value = val;
     }
 }
Example #2
0
 void ProgressBarSetValue(int value)
 {
     if (DownloadProgressBar.InvokeRequired)
     {
         ProgressBarSetValueCallback d = new ProgressBarSetValueCallback(ProgressBarSetValue);
         Invoke(d, new object[] { value });
     }
     else
     {
         DownloadProgressBar.Value = value;
     }
 }