コード例 #1
0
        private void ProgressBarPerformStep(ToolStripProgressBar pb)
        {
            // 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 (statusStrip1.InvokeRequired)
            {
                ProgressBarPerformStepCallback d = new ProgressBarPerformStepCallback(ProgressBarPerformStep);
                statusStrip1.BeginInvoke(d, new object[] { pb });
            }
            else
            {
                if (pb.Value == pb.Maximum)
                {
                    ProgressBarFillTimes++;
                }

                if (ProgressBarFillTimes == 100)
                {
                    pb.Value             = pb.Minimum;
                    ProgressBarFillTimes = 0;
                }
                pb.PerformStep();
            }
        }
コード例 #2
0
ファイル: ConvertationPage.cs プロジェクト: Keyhad/PKStudio
 private void ProgressBarPerformStep(ProgressBar pb)
 {
     // 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)
     {
         ProgressBarPerformStepCallback d = new ProgressBarPerformStepCallback(ProgressBarPerformStep);
         pb.BeginInvoke(d, new object[] { pb });
     }
     else
     {
         if (pb.Value >= pb.Maximum)
         {
             pb.Value = pb.Minimum;
         }
         pb.PerformStep();
     }
 }
コード例 #3
0
 private void ProgressBarPerformStep(ProgressBar pb)
 {
     // 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)
     {
         ProgressBarPerformStepCallback d = new ProgressBarPerformStepCallback(ProgressBarPerformStep);
         pb.BeginInvoke(d, new object[] { pb });
     }
     else
     {
         if (pb.Value >= pb.Maximum)
         {
             pb.Value = pb.Minimum;
         }
         pb.PerformStep();
     }
 }
コード例 #4
0
ファイル: MainForm.cs プロジェクト: AlexandrSurkov/PKStudio
        private void ProgressBarPerformStep(ToolStripProgressBar pb)
        {
            // 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 (statusStrip1.InvokeRequired)
            {
                ProgressBarPerformStepCallback d = new ProgressBarPerformStepCallback(ProgressBarPerformStep);
                statusStrip1.BeginInvoke(d, new object[] { pb });
            }
            else
            {
                if (pb.Value == pb.Maximum)
                    ProgressBarFillTimes++;

                if (ProgressBarFillTimes == 100)
                {
                    pb.Value = pb.Minimum;
                    ProgressBarFillTimes = 0;
                }
                pb.PerformStep();
            }
        }