Beispiel #1
0
        private void du_onCompleted(object sender, CompletedEventArgs e)
        {
            IProgressable d  = (IProgressable)sender;
            OperationInfo op = (OperationInfo)d.State;

            if (e.Success)
            {
                op.status = OperationStatus.Success;
            }
            else if (op.status == OperationStatus.Processing)
            {
                if (e.Cancel)
                {
                    op.status = OperationStatus.Cancel;
                }
                else
                {
                    op.status = OperationStatus.Fail;
                    op.errmsg = e.Exception == null ? string.Empty : e.Exception.Message;
                }
            }
        }
Beispiel #2
0
 private void du_onCompleted(object sender, CompletedEventArgs e)
 {
     IProgressable d = (IProgressable)sender;
     OperationInfo op = (OperationInfo)d.State;
     if (e.Success)
         op.status = OperationStatus.Success;
     else if (op.status == OperationStatus.Processing)
     {
         if (e.Cancel)
             op.status = OperationStatus.Cancel;
         else
         {
             op.status = OperationStatus.Fail;
             op.errmsg = e.Exception == null ? string.Empty : e.Exception.Message;
         }
     }
 }
Beispiel #3
0
 protected virtual void fireCompleted(CompletedEventArgs args)
 {
     if (Completed != null)
         Completed(this, args);
 }