Exemplo n.º 1
0
 public void UpdateProgress(string message, int percent)
 {
     UpdateEventArgs eArg = new UpdateEventArgs(message, percent);
     object argList = new object[] { null, eArg };
     if (InvokeRequired)
     {
         this.BeginInvoke(new System.EventHandler<UpdateEventArgs>(_UpdateProgress), argList);
     }
     else
     {
         _UpdateProgress(this, eArg);
     }
 }
Exemplo n.º 2
0
 private void _UpdateProgress(object sender, UpdateEventArgs args)
 {
     int _percent = args.percent;
     if (_percent < 0)
     {
         _percent = 0;
     }
     if (_percent > 100)
     {
         _percent = 100;
     }
     toolStripProgressBar.Value = _percent;
     toolStripStatusLabelInfo.Text = args.message;
     statusStrip1.Refresh();
 }