示例#1
0
 public void progressBarSetValue(int i)
 {
     try
     {
         if (this.InvokeRequired)
         {
             SetIntegerCallback d = new SetIntegerCallback(progressBarSetValue);
             this.BeginInvoke(d, i);
             return;
         }
         else
         {
             if (i == 0)
             {
                 i = 1;
             }
             myProgressBar.Visible = Visible;
             myProgressBar.Value   = i;
         }
     }
     catch (Exception e)
     {
         logger.Debug(e.Message);
         logger.Error(e.StackTrace);
         throw e;
     }
 }
示例#2
0
 public void progressBarSetMaxStep(int i)
 {
     try
     {
         if (this.InvokeRequired)
         {
             SetIntegerCallback d = new SetIntegerCallback(progressBarSetMaxStep);
             this.BeginInvoke(d, i);
             return;
         }
         else
         {
             myProgressBar.Maximum = i;
         }
     }
     catch (Exception e)
     {
         logger.Debug(e.Message);
         logger.Error(e.StackTrace);
         throw e;
     }
 }