protected virtual void OnTaskCompleted(CompletedEventArgs result)
        {
            if (this.Runners.Count == 0)
            {
                this.EndedWithSuccess = true;
            }

            if (TaskCompleted != null)
            {
                TaskCompleted(this, result);
            }
        }
        void runner_Completed(object sender, CompletedEventArgs e)
        {
            Interlocked.Exchange(ref CurrentRunner, null);

            if (!e.CompletionResult.RanToCompletion)
            {
                Progress = 100;
            }
            else
            {
                OnTaskCompleted(e);
            }

            this.results.Add(e.CompletionResult);
        }
Пример #3
0
 void runner_Completed(object sender, CompletedEventArgs e)
 {
     (this.Template.FindName("William", this) as Grid).Children.Remove(RunnerDict[sender as IProgressRunner].Item1);
     (this.Template.FindName("William", this) as Grid).RowDefinitions.Remove(RunnerDict[sender as IProgressRunner].Item2);
     RunnerDict.Remove(sender as IProgressRunner);
 }
 void ProgressDownloader_TaskCompleted(object sender, CompletedEventArgs e)
 {
 }