コード例 #1
0
ファイル: ProgressOperator.cs プロジェクト: eagles/demo
 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);
 }
コード例 #2
0
        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);
        }