private async void inputTitle_KeyPress(object sender, KeyPressEventArgs e) { if (!string.IsNullOrEmpty(inputTitle.Text)) { if (e.KeyChar == (char)Keys.Enter && CanRun()) { string title = inputTitle.Text; outputLogs.AppendText(@"Rozpoczęcie pobierania: " + title + "..." + NL + NL); YoutubeDLDownload downloader = new YoutubeDLDownload(); var output = await downloader.StartDownloadTitle(title); outputLogs.AppendText(output + NL + NL); } } }
private async void ButtonDownloadTitle_Click(object sender, EventArgs e) { if (!CanRun()) { return; } string title = inputTitle.Text; outputLogs.AppendText(@"Rozpoczęcie pobierania: " + title + "..." + NL + NL); YoutubeDLDownload downloader = new YoutubeDLDownload(); var output = await downloader.StartDownloadTitle(title); outputLogs.AppendText(output + NL + NL); }
private async void ButtonDownloadLinks_Click(object sender, EventArgs e) { if (!CanRun()) { return; } List <string> links = new List <string>(inputLinks.Lines); outputLogs.AppendText(@"Rozpoczęcie pobierania zestawu linków..." + NL + NL); YoutubeDLDownload downloader = new YoutubeDLDownload(); var output = await downloader.StartDownloadLinks(links); outputLogs.AppendText(output + NL + NL); }
private void ButtonDownloadedFolder_Click(object sender, EventArgs e) { string path = Directory.GetCurrentDirectory() + @"\" + YoutubeDLDownload.GetPathDownloading(); System.Diagnostics.Process.Start("explorer.exe", path); }