private void StartReplaceClick(object sender, EventArgs e) { if (AreFilesSelected()) { EditResult result = null; switch (cmbReplaceAction.SelectedIndex) { case 0: result = FolderEdit.Edit.FolderEdit.INSTANCE.SearchText( editableFolder, EditModes.GetModeByName(cmbEditMode.Text), txtSearch.Text, chbCaseSens.Checked, chbRegex.Checked); break; case 1: result = FolderEdit.Edit.FolderEdit.INSTANCE.ReplaceText( editableFolder, EditModes.GetModeByName(cmbEditMode.Text), txtSearch.Text, txtReplace.Text, chbCaseSens.Checked, chbRegex.Checked); break; case 2: result = FolderEdit.Edit.FolderEdit.INSTANCE.DeleteFiles( editableFolder, EditModes.GetModeByName(cmbEditMode.Text), txtSearch.Text, chbCaseSens.Checked, chbRegex.Checked); break; } if (result != null) { FormSearchResult.ShowResult(result); } } }
private void drgvResult_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { Restaurant selectedRestaurant = drgvResult.Rows[drgvResult.CurrentCell.RowIndex].DataBoundItem as Restaurant; if (selectedRestaurant == null) { return; } if (this.childForm != null) { this.childForm.Close(); } this.childForm = new FormSearchResult(selectedRestaurant); this.childForm.Show(); }