public MainWindow() { instance = this; spySettings = ILSpySettings.Load(); this.sessionSettings = new SessionSettings(spySettings); this.assemblyListManager = new AssemblyListManager(spySettings); //this.Icon = new WindowIcon(new Bitmap("pack://application:,,,/ILSpy;component/images/ILSpy.ico")); this.DataContext = sessionSettings; InitializeComponent(); MainWindow_Loaded(this, EventArgs.Empty); #if DEBUG this.AttachDevTools(); #endif decompilerTextView = App.ExportProvider.GetExportedValue <DecompilerTextView>(); mainPane.Content = decompilerTextView; if (sessionSettings.SplitterPosition > 0 && sessionSettings.SplitterPosition < 1) { leftColumn.Width = new GridLength(sessionSettings.SplitterPosition, GridUnitType.Star); rightColumn.Width = new GridLength(1 - sessionSettings.SplitterPosition, GridUnitType.Star); } sessionSettings.FilterSettings.PropertyChanged += filterSettings_PropertyChanged; InitMainMenu(); InitToolbar(); ContextMenuProvider.Add(treeView, decompilerTextView); }
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; }
private SearchPane() { InitializeComponent(); var 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.Items = items; searchModeComboBox.SelectedIndex = (int)MainWindow.Instance.SessionSettings.SelectedSearchMode; searchModeComboBox.SelectionChanged += (sender, e) => MainWindow.Instance.SessionSettings.SelectedSearchMode = (SearchMode)searchModeComboBox.SelectedIndex; ContextMenuProvider.Add(listBox); MainWindow.Instance.CurrentAssemblyListChanged += MainWindow_Instance_CurrentAssemblyListChanged; }