110,538
社区成员
发帖
与我相关
我的任务
分享
Action pAction = new Action(() => { ProBar.Maximum = 2000; });
GUIControl ProBarControl = new GUIControl((int x) => ProBar.Value=x);
int LoopCount = 1;
if (ProBar.InvokeRequired)
{
ProBar.BeginInvoke(pAction);
}
else
{
ProBar.Maximum = 2000;
}
while (大于2000条数据)
{
LoopCount++;
while (大于20条数据)
{
//每次写一条数据
}
if (ProBar.InvokeRequired)
{
ProBar.BeginInvoke(ProBarControl, new object[] { LoopCount });
}
else
{
ProBar.Value++;
}
}