Esempio n. 1
0
 /// <summary>
 /// 子任务线程完成触发事件通知方法
 /// </summary>
 /// <param name="args"></param>
 protected void SubFinishNotity(HttpLoadFileEventArgs args)
 {
     if (SubFinished != null)
     {
         SubFinished(this, args);
     }
 }
Esempio n. 2
0
 /// <summary>
 /// 子任务线程出错触发事件通知方法
 /// <param name="args"></param>
 protected void SubErrorNotify(HttpLoadFileEventArgs args)
 {
     if (Error != null)
     {
         Error(this, args);
     }
 }
Esempio n. 3
0
 /// <summary>
 /// 全局任务出错触发事件通知方法
 /// </summary>
 protected void AllErrorNotify()
 {
     if (Error != null)
     {
         HttpLoadFileEventArgs args = new HttpLoadFileEventArgs();
         args.TaskCount    = taskCount;
         args.SourceUrl    = sourceUrl;
         args.SaveFilePath = saveFilePath;
         args.IsFinish     = false;
         args.ErrMsg       = errMsg;
         Error(this, args);
     }
 }
Esempio n. 4
0
 protected void ErrorNotify()
 {
     if (Error != null)
     {
         HttpLoadFileEventArgs args = new HttpLoadFileEventArgs();
         args.TaskIndex    = this.taskIndex;
         args.IsFinish     = false;
         args.ErrMsg       = errMsg;
         args.SourceUrl    = httpLoadFile.SourceUrl;
         args.SaveFilePath = httpLoadFile.SaveFilePath;
         args.TaskCount    = httpLoadFile.TaskCount;
         Error(this, args);
     }
 }
Esempio n. 5
0
 /// <summary>
 /// 全部任务完成触发事件通知方法
 /// </summary>
 protected void AllFinishNotify()
 {
     if (AllFinished != null)
     {
         HttpLoadFileEventArgs args = new HttpLoadFileEventArgs();
         args.TaskCount    = taskCount;
         args.SourceUrl    = sourceUrl;
         args.SaveFilePath = saveFilePath;
         args.IsFinish     = true;
         args.ErrMsg       = "No Error!";
         args.TaskIndex    = taskCount;
         AllFinished(this, args);
     }
 }
Esempio n. 6
0
 protected void HttpLoadFile_Finished(object sender, HttpLoadFileEventArgs e)
 {
     isFinishList[e.TaskIndex] = e.IsFinish;
     SubFinishNotity(e);
 }
Esempio n. 7
0
 protected void HttpLoadFile_Error(object sender, HttpLoadFileEventArgs e)
 {
     errMsg = e.ErrMsg;
     SubErrorNotify(e);
 }