private void unignoreAllFilesToolStripMenuItem_Click(object sender, EventArgs e) { DialogResult result = MessageBox.Show( "This will unignore ALL previously ignored files, and restart\n" + "the Importer. This means all uncommitted matches from this\n" + "import session will have to be reapproved. Do you want to\n" + "continue?\n", "Warning", MessageBoxButtons.YesNo); if (result == DialogResult.Yes) { ProgressPopup popup = new ProgressPopup(new WorkerDelegate(unignoreAllFiles)); popup.Owner = this.ParentForm; popup.Show(); } }
//remove selected movies from the ignore list. private void unignoreSelectedButton_Click(object sender, EventArgs e) { //prevent extra clicks by disabling buttons unignoreSelectedButton.Enabled = false; DialogResult result = MessageBox.Show(this, "This will remove the selected files from the ignored list, and restart\n" + "the Importer. This means all uncommitted matches from this\n" + "import session will have to be reapproved. Do you want to\n" + "continue?\n", "Warning", MessageBoxButtons.YesNo); //only process if there is at least one row selected if (result == DialogResult.Yes && ignoredMovieGrid.SelectedRows.Count > 0) { //process selected files ProgressPopup popup = new ProgressPopup(new WorkerDelegate(unignoreSelectedFiles)); popup.Owner = this.ParentForm; popup.Show(); this.DialogResult = DialogResult.OK; } else { if (ignoredMovieGrid.SelectedRows.Count == 0) MessageBox.Show(this, "No movies were selected."); //enable the unignore buttons in case user wants to unignore again unignoreSelectedButton.Enabled = true; } }