private void SetMaximum(int max) { if (this.InvokeRequired) { IntFunctionCallBack d = new IntFunctionCallBack(SetMaximum); this.Invoke(d, new object[] { max }); } else { progressBar1.Maximum = max; } }
private void SetValue(int value) { if (this.InvokeRequired) { IntFunctionCallBack d = new IntFunctionCallBack(SetValue); this.Invoke(d, new object[] { value }); } else { progressBar1.Value = value; } }
/********************** 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(); } }