protected override bool ProcessCmdKey(ref Message msg, Keys keyData) { //Capture ctrl+v events if (keyData == (Keys.Control | Keys.V) && btnDownloads.selected) { DownloadItemManager.AddDownloadItem(Clipboard.GetText(), ucDownloads.pnlVideos); return(true); } return(base.ProcessCmdKey(ref msg, keyData)); }
private void bnLoadList_Click(object sender, EventArgs e) { string path = FSManager.Files.GetSelectedFileWithPath("Text Files", "*.txt"); if (!string.IsNullOrEmpty(path)) { string commaSeperatedVideoUrls = File.ReadAllText(path); foreach (string url in commaSeperatedVideoUrls.Split(',')) { DownloadItemManager.AddDownloadItem(url, pnlVideos); } } }
private void btnPaste_Click(object sender, EventArgs e) { DownloadItem item = DownloadItemManager.AddDownloadItem(Clipboard.GetText(), pnlVideos); pnlLoading.Visible = false; lblLoading.Visible = false; if (BLSettings.IsAutomaticDownload) { if (item != null) { toAutoDownloadVideos.Add(item); } tmrDownload.Start(); } }