public SearchPane() { InitializeComponent(); searchModeComboBox.Items.Add(new { Image = Images.Library, Name = "Types and Members" }); searchModeComboBox.Items.Add(new { Image = Images.Class, Name = "Type" }); searchModeComboBox.Items.Add(new { Image = Images.Property, Name = "Member" }); searchModeComboBox.Items.Add(new { Image = Images.Method, Name = "Method" }); searchModeComboBox.Items.Add(new { Image = Images.Field, Name = "Field" }); searchModeComboBox.Items.Add(new { Image = Images.Property, Name = "Property" }); searchModeComboBox.Items.Add(new { Image = Images.Event, Name = "Event" }); searchModeComboBox.Items.Add(new { Image = Images.Literal, Name = "Constant" }); searchModeComboBox.Items.Add(new { Image = Images.Library, Name = "Metadata Token" }); searchModeComboBox.Items.Add(new { Image = Images.Resource, Name = "Resource" }); searchModeComboBox.Items.Add(new { Image = Images.Assembly, Name = "Assembly" }); searchModeComboBox.Items.Add(new { Image = Images.Namespace, Name = "Namespace" }); ContextMenuProvider.Add(listBox); MainWindow.Instance.CurrentAssemblyListChanged += MainWindow_Instance_CurrentAssemblyListChanged; DockWorkspace.Instance.PropertyChanged += DockWorkspace_PropertyChanged; filterSettings = MainWindow.Instance.SessionSettings.FilterSettings; filterSettings.PropertyChanged += FilterSettings_PropertyChanged; CompositionTarget.Rendering += UpdateResults; // This starts empty search right away, so do at the end (we're still in ctor) searchModeComboBox.SelectedIndex = (int)MainWindow.Instance.SessionSettings.SelectedSearchMode; }
private SearchPane() { InitializeComponent(); searchModeComboBox.Items = new [] { new { Image = Images.Library, Name = "Types and Members" }, new { Image = Images.Class, Name = "Type" }, new { Image = Images.Property, Name = "Member" }, new { Image = Images.Method, Name = "Method" }, new { Image = Images.Field, Name = "Field" }, new { Image = Images.Property, Name = "Property" }, new { Image = Images.Event, Name = "Event" }, new { Image = Images.Literal, Name = "Constant" }, new { Image = Images.Library, Name = "Metadata Token" } }; ContextMenuProvider.Add(listBox); MainWindow.Instance.CurrentAssemblyListChanged += MainWindow_Instance_CurrentAssemblyListChanged; MainWindow.Instance.SessionSettings.FilterSettings.PropertyChanged += FilterSettings_PropertyChanged; // This starts empty search right away, so do at the end (we're still in ctor) searchModeComboBox.SelectedIndex = (int)MainWindow.Instance.SessionSettings.SelectedSearchMode; searchModeComboBox.SelectionChanged += (sender, e) => MainWindow.Instance.SessionSettings.SelectedSearchMode = (Search.SearchMode)searchModeComboBox.SelectedIndex; updateResultTimer.Tick += UpdateResults; this.DataContext = new DataGridCollectionView(Results); }
public DnHexBox() { SetBinding(Control.FontFamilyProperty, new Binding("FontFamily") { Source = HexSettings.Instance }); SetBinding(Control.FontSizeProperty, new Binding("FontSize") { Source = HexSettings.Instance }); SetResourceReference(Control.BackgroundProperty, HexBoxThemeHelper.GetBackgroundResourceKey(ColorType.HexText)); SetResourceReference(Control.ForegroundProperty, HexBoxThemeHelper.GetForegroundResourceKey(ColorType.HexText)); SetResourceReference(HexBox.OffsetForegroundProperty, HexBoxThemeHelper.GetForegroundResourceKey(ColorType.HexOffset)); SetResourceReference(HexBox.Byte0ForegroundProperty, HexBoxThemeHelper.GetForegroundResourceKey(ColorType.HexByte0)); SetResourceReference(HexBox.Byte1ForegroundProperty, HexBoxThemeHelper.GetForegroundResourceKey(ColorType.HexByte1)); SetResourceReference(HexBox.ByteErrorForegroundProperty, HexBoxThemeHelper.GetForegroundResourceKey(ColorType.HexByteError)); SetResourceReference(HexBox.AsciiForegroundProperty, HexBoxThemeHelper.GetForegroundResourceKey(ColorType.HexAscii)); SetResourceReference(HexBox.CaretForegroundProperty, HexBoxThemeHelper.GetBackgroundResourceKey(ColorType.HexCaret)); SetResourceReference(HexBox.InactiveCaretForegroundProperty, HexBoxThemeHelper.GetBackgroundResourceKey(ColorType.HexInactiveCaret)); SetResourceReference(HexBox.SelectionBackgroundProperty, HexBoxThemeHelper.GetBackgroundResourceKey(ColorType.HexSelection)); SetResourceReference(Control.FontStyleProperty, HexBoxThemeHelper.GetFontStyleResourceKey(ColorType.HexText)); SetResourceReference(Control.FontWeightProperty, HexBoxThemeHelper.GetFontWeightResourceKey(ColorType.HexText)); ContextMenuProvider.Add(this); BytesGroupCount = null; BytesPerLine = null; UseHexPrefix = null; ShowAscii = null; LowerCaseHex = null; AsciiEncoding = null; InstallBindings(); }
private AnalyzerTreeView() { this.ShowRoot = false; this.Root = new AnalyzerRootNode { Language = MainWindow.Instance.CurrentLanguage }; this.BorderThickness = new Thickness(0); ContextMenuProvider.Add(this); MainWindow.Instance.CurrentAssemblyListChanged += MainWindow_Instance_CurrentAssemblyListChanged; }
public DecompileTabState(Language language) { var view = TextView; view.Tag = this; this.language = language; ContextMenuProvider.Add(view); view.DragOver += view_DragOver; view.OnThemeUpdated(); InstallMouseWheelZoomHandler(TextView.TextEditor.TextArea); }
public AnalyzerTreeView() { this.ShowRoot = false; this.Root = new AnalyzerRootNode { Language = MainWindow.Instance.CurrentLanguage }; this.BorderThickness = new Thickness(0); ContextMenuProvider.Add(this); MainWindow.Instance.CurrentAssemblyListChanged += MainWindow_Instance_CurrentAssemblyListChanged; MainWindow.Instance.SessionSettings.FilterSettings.PropertyChanged += FilterSettings_PropertyChanged; }
TabManager <TState> CreateTabManager(int insertIndex) { var tabControl = new TabControl(); tabControl.Style = App.Current.FindResource("TabStateTabControl") as Style; var tabManager = new TabManager <TState>(this, tabControl, onSelectionChanged, onAddRemoveTabState); tabManagers.Insert(insertIndex, tabManager); ContextMenuProvider.Add(tabManager.TabControl); if (OnTabGroupAdded != null) { OnTabGroupAdded(this, TabGroupEventArgs.Empty); } return(tabManager); }
public static DataGrid PrepareDataGrid(TabPageModel tabPage, ILSpyTreeNode selectedNode) { if (!(tabPage.Content is DataGrid view && view.Name == "MetadataView")) { view = new MetaDataGrid() { Name = "MetadataView", GridLinesVisibility = DataGridGridLinesVisibility.None, CanUserAddRows = false, CanUserDeleteRows = false, CanUserReorderColumns = false, HeadersVisibility = DataGridHeadersVisibility.Column, EnableColumnVirtualization = true, EnableRowVirtualization = true, RowHeight = 20, IsReadOnly = true, SelectionMode = DataGridSelectionMode.Single, SelectionUnit = DataGridSelectionUnit.FullRow, SelectedTreeNode = selectedNode, CellStyle = (Style)MetadataTableViews.Instance["DataGridCellStyle"], }; ContextMenuProvider.Add(view); DataGridFilter.SetIsAutoFilterEnabled(view, true); DataGridFilter.SetContentFilterFactory(view, new RegexContentFilterFactory()); } DataGridFilter.GetFilter(view).Clear(); view.RowDetailsTemplateSelector = null; view.RowDetailsVisibilityMode = DataGridRowDetailsVisibilityMode.Collapsed; view.EnableColumnVirtualization = true; view.EnableRowVirtualization = true; ((MetaDataGrid)view).SelectedTreeNode = selectedNode; if (!view.AutoGenerateColumns) { view.Columns.Clear(); } view.AutoGenerateColumns = true; view.AutoGeneratingColumn += View_AutoGeneratingColumn; view.AutoGeneratedColumns += View_AutoGeneratedColumns; return(view); }
private SearchPane() { InitializeComponent(); searchModeComboBox.Items = new[] { new { Image = Images.Library, Name = "Types and Members" }, new { Image = Images.Class, Name = "Type" }, new { Image = Images.Property, Name = "Member" }, new { Image = Images.Method, Name = "Method" }, new { Image = Images.Field, Name = "Field" }, new { Image = Images.Property, Name = "Property" }, new { Image = Images.Event, Name = "Event" }, new { Image = Images.Literal, Name = "Constant" }, new { Image = Images.Library, Name = "Metadata Token" } }; searchModeComboBox.SelectedIndex = (int)MainWindow.Instance.SessionSettings.SelectedSearchMode; searchModeComboBox.SelectionChanged += (sender, e) => MainWindow.Instance.SessionSettings.SelectedSearchMode = (Search.SearchMode)searchModeComboBox.SelectedIndex; ContextMenuProvider.Add(listBox); MainWindow.Instance.CurrentAssemblyListChanged += MainWindow_Instance_CurrentAssemblyListChanged; }