public override void Decompile(Language language, ITextOutput output, DecompilationOptions options) { EnsureLazyChildren(); base.Decompile(language, output, options); if (stringTableEntries.Count != 0) { ISmartTextOutput smartOutput = output as ISmartTextOutput; if (null != smartOutput) { smartOutput.AddUIElement( delegate { return(new ResourceStringTable(stringTableEntries, Docking.DockWorkspace.Instance.GetTextView())); } ); } output.WriteLine(); output.WriteLine(); } if (otherEntries.Count != 0) { ISmartTextOutput smartOutput = output as ISmartTextOutput; if (null != smartOutput) { smartOutput.AddUIElement( delegate { return(new ResourceObjectTable(otherEntries, Docking.DockWorkspace.Instance.GetTextView())); } ); } output.WriteLine(); } }
/// <summary> /// Creates a button. /// </summary> public static void AddButton(this ISmartTextOutput output, ImageSource icon, string text, RoutedEventHandler click) { output.AddUIElement( delegate { 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, Children = { new Image { Width = 16, Height = 16, Source = icon, Margin = new Thickness(0, 0, 4, 0) }, new TextBlock { Text = text } } }; } else { button.Content = text; } button.Click += click; return(button); }); }
/// <summary> /// Creates a button. /// </summary> public static void AddButton(this ISmartTextOutput output, string text, RoutedEventHandler click) { output.AddUIElement(() => { var button = new Button(); button.SetResourceReference(FrameworkElement.StyleProperty, "TextEditorButton"); button.Content = text; button.Click += click; return(button); }); }
public override void Decompile(Language language, ITextOutput output, DecompilationOptions options) { base.Decompile(language, output, options); if (filteredEntries.Count == 0) { return; } ISmartTextOutput smartOutput = output as ISmartTextOutput; if (null != smartOutput) { smartOutput.AddUIElement( delegate { return(new ResourceStringTable(filteredEntries)); } ); } output.WriteLine(); }
public override void Decompile(Language language, ITextOutput output, DecompilationOptions options) { EnsureLazyChildren(); base.Decompile(language, output, options); if (stringTableEntries.Count != 0) { ISmartTextOutput smartOutput = output as ISmartTextOutput; if (null != smartOutput) { smartOutput.AddUIElement( delegate { return(new ResourceStringTable(stringTableEntries, new System.Windows.Size(MainWindow.Instance.mainPane.ActualWidth - 45, MainWindow.Instance.mainPane.ActualHeight))); } ); } output.WriteLine(); output.WriteLine(); } if (otherEntries.Count != 0) { ISmartTextOutput smartOutput = output as ISmartTextOutput; if (null != smartOutput) { smartOutput.AddUIElement( delegate { return(new ResourceObjectTable(otherEntries, new System.Windows.Size(MainWindow.Instance.mainPane.ActualWidth - 45, MainWindow.Instance.mainPane.ActualHeight))); } ); } output.WriteLine(); } }