C# 进度条封装
主要是使用BackgroundWorker控件实现异步刷新…… public class ProgressTool { private BackgroundWorker backgroundWorkerProgress; public ProgressTool() { // // backgroundWorkerProgress // this.backgroundWorkerProgress = new System.ComponentModel.BackgroundWorker(); this.backgroundWorkerProgress.WorkerReportsProgress = true; this.backgroundWorkerProgress.WorkerSupportsCancellation = true; this.backgroundWorkerProgress.DoWork += new System.ComponentModel.DoWorkEventHandler(this.backgroundWorkerProgress_DoWork); this.backgroundWorkerProgress.RunWorkerCompleted += new System.ComponentModel.RunWorkerCompletedEventHandler(this.backgroundWorkerProgress_RunWorkerCompleted); } public void StartBar(Form dialog, int maxVal)