private void DownloadAll_Execute() { var UrlList = new List <string>(); foreach (var item in Items) { UrlList.Add(item.FullPictureUrl); } var cookies = _memoryManager.CurrentCookies; IMediaDownloader downloader = new MediaDownloader(cookies); downloader.Downloading += Downloader_DownloadFull; downloader.DownloadStarted += delegate(int count) { DownloadProgress = $"Downloading {0}/{count}"; Count = count; }; downloader.DownloadAllImages(UrlList); }
public async void ReloadData() { #if !DEBUG DeleteTempDirectory(); #endif Refresh = true; var ids = await com.GetImages(_event, _memoryManager.CurrentCookies); foreach (var id in ids) { Images.Add(UrlFactory.Generate(DataType.GetPreview) + $"/{_event.Pin}/{id}"); } IMediaDownloader downloader = new MediaDownloader(_memoryManager.CurrentCookies); downloader.Downloading += Downloader_DownloadPreview; sw.Start(); downloader.DownloadAllImages(Images); }