日期:2014-05-17 浏览次数:20861 次
public void SetProcessInfo(int value)
{
if (progressBar1.InvokeRequired)
{
Action<int> setProcessDelegate = new Action<int>(SetProcessInfo);
progressBar1.Invoke(setProcessDelegate, value);
}
else
{//此处有断点1,条件(!progressBar1.InvokeRequired)
if (value > progressBar1.Maximum)
value = progressBar1.Maximum;
if (value < progressBar1.Minimum)
value = progressBar1.Minimum;
progressBar1.Value = value;//此处有断点2,条件(progressBar1.InvokeRequired)
}
}