コード例 #1
1
 private void SetProgressBarParams(ProgressBar pb, int minimum, int maximum, int step)
 {
     // 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 (pb.InvokeRequired)
     {
         SetProgressBarParamsCallback d = new SetProgressBarParamsCallback(SetProgressBarParams);
         pb.BeginInvoke(d, new object[] { pb, minimum, maximum, step });
     }
     else
     {
         pb.Minimum = minimum;
         pb.Maximum = maximum;
         pb.Step = step;
     }
 }
コード例 #2
0
ファイル: ConvertationPage.cs プロジェクト: Keyhad/PKStudio
 private void SetProgressBarParams(ProgressBar pb, int minimum, int maximum, int step)
 {
     // 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 (pb.InvokeRequired)
     {
         SetProgressBarParamsCallback d = new SetProgressBarParamsCallback(SetProgressBarParams);
         pb.BeginInvoke(d, new object[] { pb, minimum, maximum, step });
     }
     else
     {
         pb.Minimum = minimum;
         pb.Maximum = maximum;
         pb.Step    = step;
     }
 }