상속: System.EventArgs
예제 #1
0
 protected virtual void OnWorkFinished(ProgressFinishedEventArgs e)
 {
     if (WorkFinished != null)
     {
         System.Windows.Threading.Dispatcher.CurrentDispatcher.BeginInvoke(WorkFinished, this, e);
     }
 }
예제 #2
0
        private void ProgressService_OnProgressFinished(object sender, ProgressFinishedEventArgs e)
        {
            var succeedCount = e.Steps - (e.Steps - (e.CurrentStep + 1)) - e.FailedSteps;
            Tools.Output += string.Format(
                "Operation finished : {0} Total, {1} Succeed, {2} Failed.\n\n",
                e.Steps, succeedCount, e.FailedSteps);

            _progressService.WorkFinished -= ProgressService_OnProgressFinished;
        }
예제 #3
0
 public void EndWork()
 {
     var eventArgs = new ProgressFinishedEventArgs()
     {
         Steps = _steps,
         CurrentStep = _currentStep,
         FailedSteps = _failedSteps
     };
     if (!IsFinished)
         OnWorkFinished(eventArgs);
 }
예제 #4
0
        public void EndWork()
        {
            var eventArgs = new ProgressFinishedEventArgs()
            {
                Steps       = _steps,
                CurrentStep = _currentStep,
                FailedSteps = _failedSteps
            };

            if (!IsFinished)
            {
                OnWorkFinished(eventArgs);
            }
        }
예제 #5
0
        public void NextStep()
        {
            var lastStep = _steps - 1;

            if (_currentStep < lastStep)
            {
                _currentStep++;
            }
            else
            {
                throw new Exception("Progress is finished!!");
            }

            if (IsFinished)
            {
                var eventArgs = new ProgressFinishedEventArgs()
                {
                    Steps       = _steps,
                    CurrentStep = _currentStep,
                    FailedSteps = _failedSteps
                };
                OnWorkFinished(eventArgs);
            }
        }
 protected virtual void OnWorkFinished(ProgressFinishedEventArgs e)
 {
     if (WorkFinished != null)
         System.Windows.Threading.Dispatcher.CurrentDispatcher.BeginInvoke(WorkFinished, this, e);
 }
 private void ProgressService_OnWorkFinished(object sender, ProgressFinishedEventArgs e)
 {
     OnWorkFinished(e);
     _lastWork.WorkFinished -= ProgressService_OnWorkFinished;
 }
예제 #8
0
 private void ProgressService_OnWorkFinished(object sender, ProgressFinishedEventArgs e)
 {
     OnWorkFinished(e);
     _lastWork.WorkFinished -= ProgressService_OnWorkFinished;
 }
예제 #9
0
        public void NextStep()
        {
            var lastStep = _steps - 1;
            if (_currentStep < lastStep)
                _currentStep++;
            else
                throw new Exception("Progress is finished!!");

            if (IsFinished)
            {
                var eventArgs = new ProgressFinishedEventArgs()
                {
                    Steps = _steps,
                    CurrentStep = _currentStep,
                    FailedSteps = _failedSteps
                };
                OnWorkFinished(eventArgs);
            }
        }