public FindReplaceDialog(string defaultSearchText, string defaultReplaceText, EditorPreferences preferences, FindReplace findReplace) { _findReplace = findReplace; _preferences = preferences; InitializeComponent(); btnOK.Enabled = false; foreach (string previousSearch in preferences.RecentSearches) { cmbFind.Items.Add(previousSearch); cmbReplace.Items.Add(previousSearch); } cmbLookIn.Items.Add(LOOK_IN_CURRENT_DOCUMENT); cmbLookIn.Items.Add(LOOK_IN_CURRENT_PROJECT); cmbLookIn.Text = _lastSelectedLookIn ?? LOOK_IN_CURRENT_DOCUMENT; chkCaseSensitive.Checked = _lastSelectedCaseSensitive; cmbFind.Text = defaultSearchText; cmbReplace.Text = defaultReplaceText; btnCancel.Left = btnReplace.Left; cmbFind.Focus(); }
private void ShowFindReplaceDialog(bool showReplace, bool showAll) { FindReplace findReplace = new FindReplace(_script, _agsEditor, _lastSearchText, _lastCaseSensitive); findReplace.LastSearchTextChanged += new FindReplace.LastSearchTextChangedHandler(findReplace_LastSearchTextChanged); findReplace.ShowFindReplaceDialog(showReplace, showAll); }
private void ShowFindReplaceDialog(bool showReplace, bool showAll) { FindReplace findReplace = new FindReplace(_dialog, _agsEditor, _lastSearchText, _lastCaseSensitive); findReplace.ShowFindReplaceDialog(showReplace, showAll); }