private void lblExit_Click(object sender, EventArgs e) { if (isDownloading) { ctsDownload.Cancel(false); DownloadItemManager.toDeleteFiles.Add(pathToVideo); DownloadItemManager.StartTimer(); } if (isConverting) { //Cancel the convert task ctsConvert.Cancel(false); FFMpegConverter.Abort(); DownloadItemManager.toDeleteFiles.Add(pathToSong); DownloadItemManager.StartTimer(); } this.Dispose(); if (isHistory) { BLHistory.RemoveRecord(historyRecord); UCHistory.RepositionDownloadItems(); } else { DownloadItemManager.RepositionDownloadItems(); } }
public static void RepositionDownloadItems() { DownloadItemManager.RepositionDownloadItems(items); }