public static void ShowForReplace(TextEditor editor) { if (theDialog == null) { theDialog = new FindReplaceDialog(editor); theDialog.tabMain.SelectedIndex = 1; theDialog.Show(); theDialog.Activate(); } else { theDialog.tabMain.SelectedIndex = 1; theDialog.Activate(); } if (!editor.TextArea.Selection.IsMultiline) { theDialog.txtFind.Text = theDialog.txtFind2.Text = editor.TextArea.Selection.GetText(); theDialog.txtFind.SelectAll(); theDialog.txtFind2.SelectAll(); theDialog.txtFind2.Focus(); } }
public static void ShowForFind(TextEditor editor) { if (theDialog == null) { theDialog = new FindReplaceDialog(editor); theDialog.tabMain.SelectedIndex = 0; theDialog.Show(); theDialog.Activate(); } else { theDialog.tabMain.SelectedIndex = 0; theDialog.Activate(); } }