コード例 #1
0
ファイル: DUWorker.cs プロジェクト: zhrtc/BaiduPCS_NET
        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;
                }
            }
        }
コード例 #2
0
ファイル: DUWorker.cs プロジェクト: cheehwasun/BaiduPCS_NET
 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;
         }
     }
 }
コード例 #3
0
ファイル: Uploader.cs プロジェクト: cheehwasun/BaiduPCS_NET
 protected virtual void fireCompleted(CompletedEventArgs args)
 {
     if (Completed != null)
         Completed(this, args);
 }