Exemplo n.º 1
0
        public void AddItem(DownloadItem downloadItem)
        {
            MultiDownload md = new MultiDownload(downloadItem.Url, downloadItem.SavePath, downloadItem.ThreadNum, downloadItem.CanResume);

            md.DownloadProgressChanged += DownloadManager_DownloadProgressChanged;
            md.DownloadComplete        += Md_DownloadComplete;
            md.ThreadDownloadComplete  += Md_ThreadDownloadComplete;
            md.DownloadError           += Md_DownloadError;
            _currentDownloadItems.Add(md);
        }
Exemplo n.º 2
0
 public DownloadManager(List <DownloadItem> downloadItems)
 {
     foreach (DownloadItem di in downloadItems)
     {
         MultiDownload md = new MultiDownload(di.Url, di.SavePath, di.ThreadNum, di.CanResume);
         md.DownloadProgressChanged += DownloadManager_DownloadProgressChanged;
         md.DownloadComplete        += Md_DownloadComplete;
         md.ThreadDownloadComplete  += Md_ThreadDownloadComplete;
         md.DownloadError           += Md_DownloadError;
         _currentDownloadItems.Add(md);
     }
 }