public void ProcessDownloadList() { try { bool flag = true; Label_00A8: while ((this.currentDownloads < Settings.Default.MaxConcurrentDownloads) && flag) { flag = false; foreach (DownloadItem item in this.lstDownloadItemList) { if (!item.started) { item.started = true; DownloaderTask task = new DownloaderTask(item, this, mutNotify) { RefreshDownloadListViewCallback = this.RefreshDownloadListViewCallback }; this.downloadTasks.Add(task); new Thread(new ThreadStart(task.StartDownload)) { Name = item.itemUri.ToString() }.Start(); this.currentDownloads++; flag = true; goto Label_00A8; } } } } catch (Exception exception) { this.debugLogText.AddLine("Error ProcessDownloadList.\r\n" + exception.Message); } }
public void ProcessDownloadList() { try { bool flag = true; Label_00A8: while ((this.currentDownloads < Settings.Default.MaxConcurrentDownloads) && flag) { flag = false; foreach (DownloadItem item in this.lstDownloadItemList) { if (!item.started) { item.started = true; DownloaderTask task = new DownloaderTask(item, this, mutNotify) { RefreshDownloadListViewCallback = this.RefreshDownloadListViewCallback }; this.downloadTasks.Add(task); new Thread(new ThreadStart(task.StartDownload)) { Name = item.itemUri.ToString() }.Start(); this.currentDownloads++; flag = true; goto Label_00A8; } } } } catch (Exception exception) { this.debugLogText.AddLine("Error ProcessDownloadList.\r\n" + exception.Message); } }