示例#1
0
        public static void UpdateProgress(ProgressBarX progress, int val, int max)
        {
            IAsyncResult res;

            res = progress.BeginInvoke(new InvokeProgress(UpdateProgressX), new object[] { progress, val, max });
            progress.EndInvoke(res);
        }
示例#2
0
 public void UpdateProgressBar(ProgressBarX progressBarX, int healtPercentage)
 {
     if (progressBarX.InvokeRequired)
     {
         progressBarX.BeginInvoke(
             new MethodInvoker(
                 delegate { UpdateProgressBar(progressBarX, healtPercentage); }));
     }
     else
     {
         progressBarX.Value = healtPercentage;
     }
 }