/// <summary> /// Clears all input (text box and list view). /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnClearAllInput_Click(object sender, EventArgs e) { if (!InputValidation.ConfirmUserAction(btnClearAllInput)) { return; } txtInput.Clear(); lvInput.Items.Clear(); }
/// <summary> /// Stops the download process. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnStopDownloading_Click(object sender, EventArgs e) { if (!InputValidation.ConfirmUserAction(btnStopDownloading)) { return; } _cancellationTokenSource.Cancel(); btnStartDownloading.Enabled = true; btnStopDownloading.Enabled = false; }
// Reset all filter settings private void resetAllFilterToolStripMenuItem_Click(object sender, EventArgs e) { if (!InputValidation.ConfirmUserAction(resetAllFilterToolStripMenuItem)) { return; } foreach (Control c in gbMediaFilters.Controls) { if (c is CheckBox cb) { cb.Checked = false; } if (c is TextBox tb) { tb.Clear(); } if (c is ComboBox comboBox) { comboBox.Text = ""; } } }