private void Search() { string text = this._findComboBox.Text; this._findMru.AddEntry(text); this._findComboBox.Items.Clear(); this._findComboBox.Items.AddRange(this._findMru.Save()); this._findComboBox.SelectedIndex = 0; this._findReplaceOptions = this.GetFindReplaceOptions(); if (!this._view.PerformFind(text, this._findReplaceOptions)) { IUIService service = (IUIService) base.ServiceProvider.GetService(typeof(IUIService)); if (service != null) { service.ShowMessage("Couldn't find '" + text + "'", string.Empty, MessageBoxButtons.OK); } } }
private void SetFindReplaceOptions(Microsoft.Matrix.Core.UserInterface.FindReplaceOptions FindReplaceOptions) { this._findReplaceOptions = FindReplaceOptions; if ((FindReplaceOptions & Microsoft.Matrix.Core.UserInterface.FindReplaceOptions.MatchCase) != Microsoft.Matrix.Core.UserInterface.FindReplaceOptions.None) { this._matchCaseCheckBox.Checked = true; } if ((FindReplaceOptions & Microsoft.Matrix.Core.UserInterface.FindReplaceOptions.WholeWord) != Microsoft.Matrix.Core.UserInterface.FindReplaceOptions.None) { this._wholeWordCheckBox.Checked = true; } if ((FindReplaceOptions & Microsoft.Matrix.Core.UserInterface.FindReplaceOptions.SearchUp) != Microsoft.Matrix.Core.UserInterface.FindReplaceOptions.None) { this._upRadioButton.Checked = true; } }
private void OnReplaceButtonClick(object sender, EventArgs e) { string text = this._searchStringComboBox.Text; if (text.Length != 0) { string entry = this._replaceStringComboBox.Text; this._findMru.AddEntry(text); this._searchStringComboBox.Items.Clear(); this._searchStringComboBox.Items.AddRange(this._findMru.Save()); this._searchStringComboBox.SelectedIndex = 0; this._replaceMru.AddEntry(entry); this._replaceStringComboBox.Items.Clear(); this._replaceStringComboBox.Items.AddRange(this._replaceMru.Save()); this._replaceStringComboBox.SelectedIndex = 0; this._findReplaceOptions = this.GetFindReplaceOptions(); if (!this._documentView.PerformReplace(text, entry, this._findReplaceOptions)) { this.ShowNotFoundMessage(text); } } }