private void startDownload() { downloader = new QADDownloader(queue); downloader.maxParallalDownload = 1; downloader.ProgressChanged += downloader_ProgressChanged; downloader.DownloadsFinished += downloader_DownloadsFinished; statusLabel.Text = "Fetching chapter : " + (currentChapter+1).ToString() + "/" + chapters.Count.ToString(); downloader.startDownloads(); }
void downloader_DownloadsFinished(object sender, EventArgs e) { statusProgressBar.Value++; currentChapter++; if (currentChapter >= chapters.Count) { MessageBox.Show("Téléchargement terminé !"); this.buttonCancel.Text = "Fermer"; downloader = null; } else { loadImages(); } }