示例#1
0
 private void SetMaximum(int max)
 {
     if (this.InvokeRequired)
     {
         IntFunctionCallBack d = new IntFunctionCallBack(SetMaximum);
         this.Invoke(d, new object[] { max });
     }
     else
     {
         progressBar1.Maximum = max;
     }
 }
示例#2
0
 private void SetValue(int value)
 {
     if (this.InvokeRequired)
     {
         IntFunctionCallBack d = new IntFunctionCallBack(SetValue);
         this.Invoke(d, new object[] { value });
     }
     else
     {
         progressBar1.Value = value;
     }
 }
示例#3
0
 /********************** private ***************************/
 private void SetWidth(int newWidth)
 {
     if (this.InvokeRequired)
     {
         IntFunctionCallBack d = new IntFunctionCallBack(SetWidth);
         this.Invoke(d, new object[] { newWidth });
     }
     else
     {
         this.Size = new Size(newWidth, Size.Height);
         this.CenterToParent();
     }
 }