diff --git a/src/AddIns/Misc/SearchAndReplace/Project/Commands/SearchToolbarCommands.cs b/src/AddIns/Misc/SearchAndReplace/Project/Commands/SearchToolbarCommands.cs deleted file mode 100644 index fd05630253..0000000000 --- a/src/AddIns/Misc/SearchAndReplace/Project/Commands/SearchToolbarCommands.cs +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt) -// This code is distributed under the GNU LGPL (for details please see \doc\license.txt) - -using System; -using System.Windows.Controls; -using ICSharpCode.Core; -using System.Windows.Input; - -namespace SearchAndReplace -{ - /// - /// Description of SearchToolbarCommands. - /// - public class FindComboBox : AbstractComboBoxCommand - { - ComboBox comboBox; - - public FindComboBox() - { - } - - void RefreshComboBox() - { - comboBox.Items.Clear(); - foreach (string findItem in SearchOptions.FindPatterns) { - comboBox.Items.Add(findItem); - } - comboBox.Text = SearchOptions.FindPattern; - } - - void OnKeyPress(object sender, KeyEventArgs e) - { - if (e.Key == Key.Enter) { - e.Handled = true; - CommitSearch(); - } - } - - void CommitSearch() - { - if (comboBox.Text.Length > 0) { - LoggingService.Debug("FindComboBox.CommitSearch()"); - SearchOptions.DocumentIteratorType = DocumentIteratorType.CurrentDocument; - SearchOptions.FindPattern = comboBox.Text; - SearchReplaceManager.FindNext(null); - comboBox.Focus(); - } - } - - void SearchOptionsChanged(object sender, PropertyChangedEventArgs e) - { - if (e.Key == "FindPatterns") { - RefreshComboBox(); - } - } - - protected override void OnOwnerChanged(EventArgs e) - { - base.OnOwnerChanged(e); - comboBox = (ComboBox)base.ComboBox; - comboBox.IsEditable = true; - comboBox.KeyDown += OnKeyPress; - comboBox.Width = 130; - SearchOptions.Properties.PropertyChanged += new PropertyChangedEventHandler(SearchOptionsChanged); - - RefreshComboBox(); - } - } -} diff --git a/src/AddIns/Misc/SearchAndReplace/Project/SearchAndReplace.addin b/src/AddIns/Misc/SearchAndReplace/Project/SearchAndReplace.addin index f92cf5609f..2fe1ee27e8 100644 --- a/src/AddIns/Misc/SearchAndReplace/Project/SearchAndReplace.addin +++ b/src/AddIns/Misc/SearchAndReplace/Project/SearchAndReplace.addin @@ -56,11 +56,6 @@ icon = "Icons.16x16.FindIcon" tooltip = "${res:MainWindow.Windows.ClassBrowser.CommitSearch.ToolTip}" class = "SearchAndReplace.Find"/> - -