@ -7,7 +7,6 @@ using System.Windows;
@@ -7,7 +7,6 @@ using System.Windows;
using System.Windows.Input ;
using ICSharpCode.AvalonEdit.Document ;
using ICSharpCode.AvalonEdit.Search ;
namespace ICSharpCode.AvalonEdit.Editing
{
@ -42,9 +41,6 @@ namespace ICSharpCode.AvalonEdit.Editing
@@ -42,9 +41,6 @@ namespace ICSharpCode.AvalonEdit.Editing
this . CommandBindings . Add ( new CommandBinding ( ApplicationCommands . Undo , ExecuteUndo , CanExecuteUndo ) ) ;
this . CommandBindings . Add ( new CommandBinding ( ApplicationCommands . Redo , ExecuteRedo , CanExecuteRedo ) ) ;
this . CommandBindings . Add ( new CommandBinding ( ApplicationCommands . Find , ExecuteFind ) ) ;
this . CommandBindings . Add ( new CommandBinding ( SearchCommands . FindNext , ExecuteFindNext ) ) ;
this . CommandBindings . Add ( new CommandBinding ( SearchCommands . FindPrevious , ExecuteFindPrevious ) ) ;
}
internal static KeyBinding CreateFrozenKeyBinding ( ICommand command , ModifierKeys modifiers , Key key )
@ -110,28 +106,5 @@ namespace ICSharpCode.AvalonEdit.Editing
@@ -110,28 +106,5 @@ namespace ICSharpCode.AvalonEdit.Editing
}
}
#endregion
void ExecuteFind ( object sender , ExecutedRoutedEventArgs e )
{
var panel = TextArea . TextView . Layers . OfType < SearchPanel > ( ) . FirstOrDefault ( ) ;
if ( panel = = null )
new SearchPanel ( TextArea ) ;
else
panel . Reactivate ( ) ;
}
void ExecuteFindNext ( object sender , ExecutedRoutedEventArgs e )
{
var panel = TextArea . TextView . Layers . OfType < SearchPanel > ( ) . FirstOrDefault ( ) ;
if ( panel ! = null )
panel . FindNext ( ) ;
}
void ExecuteFindPrevious ( object sender , ExecutedRoutedEventArgs e )
{
var panel = TextArea . TextView . Layers . OfType < SearchPanel > ( ) . FirstOrDefault ( ) ;
if ( panel ! = null )
panel . FindPrevious ( ) ;
}
}
}