Example #1
0
        private void BackgroundWorkerProgressChanged(object sender, ProgressChangedEventArgs e)
        {
            // do not propagate any events after task has been disposed
            if (_disposed)
            {
                return;
            }

            _lastBackgroundTaskProgress = new BackgroundTaskProgressEventArgs(_userState, (BackgroundTaskProgress)e.UserState);
            EventsHelper.Fire(_progressUpdated, this, _lastBackgroundTaskProgress);
        }
Example #2
0
        void ProgressUpdated(object sender, BackgroundTaskProgressEventArgs e)
        {
            _progressBar.Text = e.Progress.Message;
            _progressBar.Value = e.Progress.Percent > 100 ? 100 : e.Progress.Percent;
            _progressBar.Update();

            if (e.Progress.Percent >= 100)
            {
                _buttonCancel.Enabled = false;
                _buttonGenerate.Enabled = true;
            }
        }
Example #3
0
 private void BackgroundWorkerProgressChanged(object sender, ProgressChangedEventArgs e)
 {
     _lastBackgroundTaskProgress = new BackgroundTaskProgressEventArgs(_userState, (BackgroundTaskProgress) e.UserState);
     EventsHelper.Fire(_progressUpdated, this, _lastBackgroundTaskProgress);
 }
Example #4
0
 private void BackgroundWorkerProgressChanged(object sender, ProgressChangedEventArgs e)
 {
     _lastBackgroundTaskProgress = new BackgroundTaskProgressEventArgs(_userState, (BackgroundTaskProgress)e.UserState);
     EventsHelper.Fire(_progressUpdated, this, _lastBackgroundTaskProgress);
 }
Example #5
0
 void WorkerProgressUpdated(object sender, BackgroundTaskProgressEventArgs e)
 {
     ScanResultSet.Progress = e.Progress;
     EventsHelper.Fire(ProgressUpdated, this, null);
 }
Example #6
0
		private void BackgroundWorkerProgressChanged(object sender, ProgressChangedEventArgs e)
		{
			// do not propagate any events after task has been disposed
			if (_disposed)
				return;

			_lastBackgroundTaskProgress = new BackgroundTaskProgressEventArgs(_userState, (BackgroundTaskProgress)e.UserState);
			EventsHelper.Fire(_progressUpdated, this, _lastBackgroundTaskProgress);
		}
			private void NotifyProgressUpdated(object sender, BackgroundTaskProgressEventArgs backgroundTaskProgressEventArgs)
			{
				EventsHelper.Fire(_progressUpdated, this, EventArgs.Empty);
			}