コード例 #1
0
        public void ReportProgress(TaskProgressChangedEventArgs e)
        {
            e.Instance = this;
            e.Percent  = e.Percent > 100 ? 100 : e.Percent;
            e.Percent  = e.Percent < 0 ? 0 : e.Percent;

            TryStop();

            OnProgressChanged(e);
            if (ProgressChanged != null)
            {
                ProgressChanged(this, e);
            }
        }
コード例 #2
0
        public static void ReportProgress(this ITask source, int percent, object userState = null)
        {
            TaskProgressChangedEventArgs e = new TaskProgressChangedEventArgs(percent, userState);

            source.ReportProgress(e);
        }
コード例 #3
0
 protected virtual void OnProgressChanged(TaskProgressChangedEventArgs e)
 {
 }
コード例 #4
0
 protected virtual void OnProgressChanged(TaskDelegateMetadata meta, TaskProgressChangedEventArgs progressChanged)
 {
     throw new NotImplementedException();
 }