public ReplaceDialog(IServiceProvider provider, ISearchableDocumentView view, Microsoft.Matrix.Core.UserInterface.FindReplaceOptions FindReplaceOptions, string initialSearchString, MruList findMru, MruList replaceMru) : base(provider) { this.InitializeComponent(); this._documentView = view; if ((this._documentView.ReplaceSupport & Microsoft.Matrix.Core.UserInterface.FindReplaceOptions.InSelection) == Microsoft.Matrix.Core.UserInterface.FindReplaceOptions.None) { this._inSelectionCheckBox.Enabled = false; } if ((this._documentView.ReplaceSupport & Microsoft.Matrix.Core.UserInterface.FindReplaceOptions.All) == Microsoft.Matrix.Core.UserInterface.FindReplaceOptions.None) { this._replaceAllButton.Enabled = false; } this._findMru = findMru; this._replaceMru = replaceMru; if ((initialSearchString != null) && (initialSearchString.Length > 0)) { this._searchStringComboBox.Text = initialSearchString; } else { if (findMru.Count != 0) { this._searchStringComboBox.Items.AddRange(findMru.Save()); this._searchStringComboBox.SelectedIndex = 0; } if (replaceMru.Count != 0) { this._replaceStringComboBox.Items.AddRange(replaceMru.Save()); this._replaceStringComboBox.SelectedIndex = 0; } } this.SetFindReplaceOptions(FindReplaceOptions); }
public SearchForm(IServiceProvider serviceProvider, ISearchableDocumentView view, Microsoft.Matrix.Core.UserInterface.FindReplaceOptions FindReplaceOptions, string initialSearchString, MruList findMru) : base(serviceProvider) { this.InitializeComponent(); this._view = view; this._findMru = findMru; this._findComboBox.FlatAppearance = true; this._findComboBox.AlwaysShowFocusCues = true; this._findComboBox.TextBoxKeyPress += new KeyPressEventHandler(this.OnTextBoxKeyPress); this._findComboBox.TextChanged += new EventHandler(this.OnFindComboBoxTextChanged); if ((initialSearchString != null) && (initialSearchString.Length > 0)) { this._findComboBox.Text = initialSearchString; } else if (findMru.Count != 0) { this._findComboBox.Items.AddRange(findMru.Save()); this._findComboBox.SelectedIndex = 0; } this._findComboBox.Select(); this.SetFindReplaceOptions(FindReplaceOptions); }
public MruEnumerator(MruList owner, int version) { this._owner = owner; this._index = -1; this._version = version; }