private void btnDebugDownloadArgs_Click(object sender, EventArgs e) { if (!Clipboard.ContainsText()) { return; } frmDownloader Downloader = new frmDownloader(); Downloader.DownloadPath = Downloads.Default.downloadPath; Downloader.DownloadQuality = Saved.Default.videoQuality; Downloader.DownloadType = 0; Downloader.DownloadUrl = Clipboard.GetText(); Downloader.Debugging = true; Downloader.BatchDownload = true; Downloader.Show(); }
private void cmTrayDownloadCustomSettings_Click(object sender, EventArgs e) { if (!Clipboard.ContainsText()) { return; } if (string.IsNullOrEmpty(Saved.Default.downloadArgs)) { MessageBox.Show("No arguments are saved in the application settings, save arguments to the settings to use this command"); return; } else { frmDownloader Downloader = new frmDownloader(); Downloader.DownloadArguments = Saved.Default.downloadArgs; Downloader.DownloadPath = Downloads.Default.downloadPath; Downloader.DownloadQuality = -1; Downloader.DownloadType = 2; Downloader.DownloadUrl = Clipboard.GetText(); Downloader.Show(); } }
private void cmTrayDownloadCustomTxtBox_Click(object sender, EventArgs e) { if (!Clipboard.ContainsText()) { return; } if (string.IsNullOrEmpty(txtArgs.Text)) { MessageBox.Show("No arguments are currently in memory. Enter in custom arguments in the arguments text box on the main form."); return; } else { frmDownloader Downloader = new frmDownloader(); Downloader.DownloadArguments = txtArgs.Text; Downloader.DownloadPath = Downloads.Default.downloadPath; Downloader.DownloadQuality = -1; Downloader.DownloadType = 2; Downloader.DownloadUrl = Clipboard.GetText(); Downloader.Show(); } }
private void StartDownload() { if (string.IsNullOrEmpty(txtUrl.Text)) { return; } frmDownloader Downloader = new frmDownloader(); if (rbVideo.Checked) { Downloader.DownloadPath = Downloads.Default.downloadPath; Downloader.DownloadQuality = cbQuality.SelectedIndex; Downloader.DownloadFormat = cbFormat.SelectedIndex; Downloader.DownloadType = 0; Downloader.Set60FPS = cbQuality.GetItemText(cbQuality.SelectedItem).EndsWith("p60"); Downloader.DownloadVideoAudio = chkDownloadSound.Checked; Downloader.DownloadUrl = txtUrl.Text; Downloader.Show(); Saved.Default.downloadType = 0; Saved.Default.videoQuality = cbQuality.SelectedIndex; Saved.Default.VideoFormat = cbFormat.SelectedIndex; Downloads.Default.VideoDownloadSound = chkDownloadSound.Checked; } else if (rbAudio.Checked) { Downloader.DownloadType = 1; Downloader.DownloadPath = Downloads.Default.downloadPath; Downloader.DownloadQuality = cbQuality.SelectedIndex; Downloader.UseVBR = chkDownloadSound.Checked; Downloader.DownloadFormat = cbFormat.SelectedIndex; Downloader.DownloadUrl = txtUrl.Text; Downloader.Show(); Saved.Default.downloadType = 1; Saved.Default.audioQuality = cbQuality.SelectedIndex; Saved.Default.AudioFormat = cbFormat.SelectedIndex; Downloads.Default.AudioDownloadAsVBR = chkDownloadSound.Checked; } else if (rbCustom.Checked) { Downloader.DownloadType = 2; Downloader.DownloadArguments = txtArgs.Text; Downloader.DownloadPath = Downloads.Default.downloadPath; Downloader.DownloadQuality = -1; Downloader.DownloadUrl = txtUrl.Text; Downloader.Show(); Saved.Default.downloadType = 2; Saved.Default.downloadArgs = txtArgs.Text; } else { Downloader.Dispose(); try { throw new Exception("Video, Audio, or Custom was not selected in the form, please select an actual download option to proceed."); } catch (Exception ex) { ErrorLog.ReportException(ex); } } if (Downloads.Default.SaveFormatQuality && !Program.IsPortable) { Saved.Default.Save(); } if (General.Default.ClearURLOnDownload) { txtUrl.Clear(); } if (General.Default.ClearClipboardOnDownload) { Clipboard.Clear(); } if (!Program.IsPortable) { Downloads.Default.Save(); } }