示例#1
0
 private void Start()
 {
     DownloadFileList.AsParallel().ForAll(t =>
     {
         t.StartDownload();
     });
 }
示例#2
0
 private void Pause()
 {
     DownloadFileList.AsParallel().ForAll(t =>
     {
         t.PauseDownload();
     });
 }
示例#3
0
        private void timer_Tick(object sender, EventArgs e)
        {
            double speed = 0;

            DownloadFileList.AsParallel().ForAll(t =>
            {
                t.InitSpeed(interval);
                speed += t.Speed;
            });
            this.Speed = speed;
        }