Пример #1
0
 private void Downloader_DownloadFinish(object sender, SongItemDownloader e)
 {
     songs.Remove(e);
     if (songs.Count < max_downloading_size)
     {
         MergedSong song = queqes.Dequeue();
         AddDownload(song);
     }
 }
Пример #2
0
        public void AddDownload(MergedSong song)
        {
            SongItemDownloader downloader = new SongItemDownloader(musicProviders, target, song);

            downloader.DownloadFinish += Downloader_DownloadFinish;

            songs.Add(downloader);

            downloader.Download();
        }
Пример #3
0
        public void AddDownload(MergedSong song)
        {
            if (songs.Count >= max_downloading_size)
            {
                queqes.Enqueue(song);
                return;
            }

            SongItemDownloader downloader = new SongItemDownloader(musicProviders, target, song, rate);

            downloader.DownloadFinish += Downloader_DownloadFinish;

            songs.Add(downloader);

            downloader.Download();
        }
Пример #4
0
 private void Downloader_DownloadFinish(object sender, SongItemDownloader e)
 {
     songs.Remove(e);
 }