예제 #1
0
        /// <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();
        }
예제 #2
0
        /// <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;
        }
예제 #3
0
        // 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 = "";
                }
            }
        }