public DownloadWindow(List<MusicFile> files, FindFilesWindow findFilesWindow)
 {
     this._findFilesWindow = findFilesWindow;
     this._files = files;
     InitializeComponent();
     progressBar1.Maximum = files.Count;
     progressBar1.Minimum = 0;
     _client = new WebClient();
     _client.DownloadFileCompleted += new AsyncCompletedEventHandler(client_DownloadFileCompleted);
     _client.DownloadProgressChanged += new DownloadProgressChangedEventHandler(client_DownloadProgressChanged);
     this.Visible = true;
     listBox1.DataSource = files;
     lbTitle.Text = files[0].ToString();
     findFilesWindow.Visible = false;
     new Thread(new ParameterizedThreadStart(findFilesWindow.DownloadFile)).Start(files[0]);
 }
Ejemplo n.º 2
0
 public DownloadWindow(List <MusicFile> files, FindFilesWindow findFilesWindow)
 {
     this._findFilesWindow = findFilesWindow;
     this._files           = files;
     InitializeComponent();
     progressBar1.Maximum = files.Count;
     progressBar1.Minimum = 0;
     _client = new WebClient();
     _client.DownloadFileCompleted   += new AsyncCompletedEventHandler(client_DownloadFileCompleted);
     _client.DownloadProgressChanged += new DownloadProgressChangedEventHandler(client_DownloadProgressChanged);
     this.Visible            = true;
     listBox1.DataSource     = files;
     lbTitle.Text            = files[0].ToString();
     findFilesWindow.Visible = false;
     new Thread(new ParameterizedThreadStart(findFilesWindow.DownloadFile)).Start(files[0]);
 }