进度条 文字说明

 

 

if (i % 1 == 0 || this.RunState == ThreadRunState.Stop)
{
this.SetProgressBarValue(i + 1);
this.SetLabelStatusText(string.Format("共:{0}条 已完成:{1}条 剩余:{2}条"
, lstEntryId.Count, i + 1, lstEntryId.Count - i - 1));
}


// if (i % 1 == 0 || this.RunState == ThreadRunState.Stop ||i == lstEntryId.Count-1)
//{
// //string tableLayoutPanel1 = "共:" + lstEntryId.Count + "条,已执行了" + (i + 1) + "条,剩余" + (lstEntryId.Count-(i + 1)) + "条";
// //this.SetLabelStatusText(tableLayoutPanel1);
// //线程睡眠的方法
// //Thread.Sleep(300);
//}

注:i % 1 == 0 每执行一条 显示一下

posted @ 2016-09-19 13:21  余先森  阅读(516)  评论(0编辑  收藏  举报