public ProgressOperator() { this._backgroundWorker = new BackgroundWorker(); this._processForm = new ProgressForm(); this._eventArgs = new BackgroundWorkerEventArgs(); this._backgroundWorker.DoWork += new DoWorkEventHandler(this.backgroundWorker_DoWork); this._backgroundWorker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(this.backgroundWorker_RunWorkerCompleted); }
private ProgressForm _processForm; //进度条窗体 #endregion Fields #region Constructors public PercentProgressOperator() { this._processForm = new ProgressForm(); this._eventArgs = new BackgroundWorkerEventArgs(); this._processForm.ProcessStyle = System.Windows.Forms.ProgressBarStyle.Continuous; this._backgroundWorker = new BackgroundWorker(); this._backgroundWorker.WorkerReportsProgress = true; this._backgroundWorker.DoWork += new DoWorkEventHandler(this._backgroundWorker_DoWork); this._backgroundWorker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(this._backgroundWorker_RunWorkerCompleted); this._backgroundWorker.ProgressChanged += new ProgressChangedEventHandler(this._backgroundWorker_ProgressChanged); }