コード例 #1
0
        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();
        }
コード例 #2
0
        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();
            }
        }