Example #1
0
 public void Download(IEnumerable <IFile> files)
 {
     foreach (var f in files)
     {
         if (!Directory.Exists(Path.GetDirectoryName(f.LocalPath)))
         {
             Directory.CreateDirectory(Path.GetDirectoryName(f.LocalPath));
         }
         client.DownloadFile(f.DownloadUrl, f.LocalPath);
         DownloadedAFile?.Invoke(this, new FileDownloadedEventArgs(f));
     }
     AllFinished?.Invoke(this, new EventArgs());
 }
Example #2
0
 /// <summary>
 /// 文件传输完成
 /// </summary>
 protected virtual void OnAllFinished()
 {
     AllFinished?.Invoke(this, new EventArgs());
 }
Example #3
0
 protected virtual void OnAllFinished(AllFinishedEventArgs e)
 {
     AllFinished?.Invoke(this, e);
 }