Пример #1
0
 public void Stop()
 {
     if (IsCompleteDownLoad)
     {
         return;
     }
     for (int i = 0; i < groupList.Count; i++)
     {
         groupList[i].Stop();
     }
     Error  = "download stop.";
     IsDone = true;
     State  = DownloadState.finished;
     DownLoadManager.RefList();
 }
Пример #2
0
 public void StartAsync()
 {
     if (State != DownloadState.normal)
     {
         return;
     }
     State         = DownloadState.downloading;
     ContentLength = 0;
     for (int i = 0; i < groupList.Count; i++)
     {
         if (!groupList[i].IsCompleteDownLoad)
         {
             DownLoadManager.DownLoadFileAsync(groupList[i], null, null);
         }
         ContentLength += groupList[i].ContentLength;
     }
     Error  = null;
     IsDone = false;
     DownLoadManager.AddGroup(this);
 }