Ejemplo n.º 1
0
 // Callbacks
 public void SetProgressBarMax(ProgressBar p, int max)
 {
     if (p.InvokeRequired)
     {
         SetProgressBarMaxCallback d = new SetProgressBarMaxCallback(UpdateProgressBar);
         this.Invoke(d, new Object[] { p, max });
     }
     else
     {
         p.Maximum = max;
     }
 }
Ejemplo n.º 2
0
 private void SetProgressBarMax(int max)
 {
     if (progressBarFilesCompleted.InvokeRequired)
     {
         SetProgressBarMaxCallback cb =
             new SetProgressBarMaxCallback(SetProgressBarMax);
         Invoke(cb, new object[] { max });
     }
     else
     {
         progressBarFilesCompleted.Maximum = max;
     }
 }
Ejemplo n.º 3
0
 private void SetProgressBarMax(int count)
 {
     // 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.pb.InvokeRequired)
     {
         SetProgressBarMaxCallback d = new SetProgressBarMaxCallback(SetProgressBarMax);
         this.Invoke(d, new object[] { count });
     }
     else
     {
         this.pb.Maximum = count;
     }
 }
Ejemplo n.º 4
0
        private void SetProgressBarMaxValue(int value)
        {
            // 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.pgBar.InvokeRequired)
            {
                SetProgressBarMaxCallback d = new SetProgressBarMaxCallback(SetProgressBarMaxValue);
                this.Invoke(d, new object[] { value });
            }
            else
            {
                pgBar.Maximum = value;
            }
        }
Ejemplo n.º 5
0
 private void SetMax(int max)
 {
     // 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 (progressBar.InvokeRequired)
     {
         SetProgressBarMaxCallback d = new SetProgressBarMaxCallback(SetMax);
         this.Invoke(d, new object[] { max });
     }
     else
     {
         progressBar.Maximum = max;
         Reset();
     }
 }
Ejemplo n.º 6
0
 private void SetProgressBarMax(int count)
 {
     // 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.pb.InvokeRequired)
     {
         SetProgressBarMaxCallback d = new SetProgressBarMaxCallback(SetProgressBarMax);
         this.Invoke(d, new object[] { count });
     }
     else
     {
         this.pb.Maximum = count;
     }
 }