Browse Source

Enable AvalonEdit SearchPanel for DecompilerTextView. Closes #261.

pull/320/merge
Daniel Grunwald 14 years ago
parent
commit
43ad684022
  1. 2
      ILSpy/ISmartTextOutput.cs
  2. 3
      ILSpy/TextView/DecompilerTextView.cs
  3. 7
      ILSpy/TextView/DecompilerTextView.xaml

2
ILSpy/ISmartTextOutput.cs

@ -49,6 +49,8 @@ namespace ICSharpCode.ILSpy @@ -49,6 +49,8 @@ namespace ICSharpCode.ILSpy
Button button = new Button();
button.Cursor = Cursors.Arrow;
button.Margin = new Thickness(2);
button.Padding = new Thickness(9, 1, 9, 1);
button.MinWidth = 73;
if (icon != null) {
button.Content = new StackPanel {
Orientation = Orientation.Horizontal,

3
ILSpy/TextView/DecompilerTextView.cs

@ -33,7 +33,6 @@ using System.Windows.Media; @@ -33,7 +33,6 @@ using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Threading;
using System.Xml;
using ICSharpCode.AvalonEdit;
using ICSharpCode.AvalonEdit.Document;
using ICSharpCode.AvalonEdit.Editing;
@ -41,6 +40,7 @@ using ICSharpCode.AvalonEdit.Folding; @@ -41,6 +40,7 @@ using ICSharpCode.AvalonEdit.Folding;
using ICSharpCode.AvalonEdit.Highlighting;
using ICSharpCode.AvalonEdit.Highlighting.Xshd;
using ICSharpCode.AvalonEdit.Rendering;
using ICSharpCode.AvalonEdit.Search;
using ICSharpCode.Decompiler;
using ICSharpCode.ILSpy.AvalonEdit;
using ICSharpCode.ILSpy.Bookmarks;
@ -121,6 +121,7 @@ namespace ICSharpCode.ILSpy.TextView @@ -121,6 +121,7 @@ namespace ICSharpCode.ILSpy.TextView
// Bookmarks context menu
IconMarginActionsProvider.Add(iconMargin);
textEditor.TextArea.DefaultInputHandler.NestedInputHandlers.Add(new SearchInputHandler(textEditor.TextArea));
this.Loaded += new RoutedEventHandler(DecompilerTextView_Loaded);
}

7
ILSpy/TextView/DecompilerTextView.xaml

@ -10,7 +10,12 @@ @@ -10,7 +10,12 @@
<Grid>
<ae:TextEditor Name="textEditor" FontFamily="Consolas" FontSize="10pt" IsReadOnly="True"
Background="{DynamicResource {x:Static SystemColors.InfoBrushKey}}"
Foreground="{DynamicResource {x:Static SystemColors.InfoTextBrushKey}}" />
Foreground="{DynamicResource {x:Static SystemColors.InfoTextBrushKey}}">
<ae:TextEditor.Resources>
<!-- prevent App-wide button style from applying to the buttons in the search box -->
<Style TargetType="{x:Type Button}" />
</ae:TextEditor.Resources>
</ae:TextEditor>
<Border Name="waitAdorner" Background="#C0FFFFFF" Visibility="Collapsed">
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock FontSize="14pt">Decompiling...</TextBlock>

Loading…
Cancel
Save