public MainWindow() { instance = this; spySettings = ILSpySettings.Load(); this.sessionSettings = new SessionSettings(spySettings); this.assemblyListManager = new AssemblyListManager(spySettings); this.Icon = new BitmapImage(new Uri("pack://application:,,,/ILSpy;component/images/ILSpy.ico")); this.DataContext = sessionSettings; InitializeComponent(); App.CompositionContainer.ComposeParts(this); 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); this.Loaded += MainWindow_Loaded; }
public MainWindow() { instance = this; var spySettings = ILSpySettings.Load(); this.spySettingsForMainWindow_Loaded = spySettings; this.sessionSettings = new SessionSettings(spySettings); this.assemblyListManager = new AssemblyListManager(spySettings); this.Icon = new BitmapImage(new Uri("pack://application:,,,/ILSpy;component/images/ILSpy.ico")); this.DataContext = sessionSettings; InitializeComponent(); decompilerTextView = App.ExportProvider.GetExportedValue <DecompilerTextView>(); mainPane.Content = decompilerTextView; sessionSettings.DockLayout.Deserialize(new XmlLayoutSerializer(DockManager)); sessionSettings.FilterSettings.PropertyChanged += filterSettings_PropertyChanged; InitMainMenu(); InitToolbar(); ContextMenuProvider.Add(treeView, decompilerTextView); this.Loaded += MainWindow_Loaded; }
private SearchPane() { InitializeComponent(); this.DataContext = this; foreach (var type in searchTypes) { searchModeComboBox.Items.Add(type); searchModeToIndex[type.SearchMode] = searchModeComboBox.Items.Count - 1; } searchModeComboBox.SelectedIndex = searchModeToIndex[SearchMode.TypeDef]; ContextMenuProvider.Add(listBox); MainWindow.Instance.CurrentAssemblyListChanged += MainWindow_Instance_CurrentAssemblyListChanged; var checkBoxes = new[] { matchWholeWordsCheckBox, caseSensitiveCheckBox, matchAnyWordsCheckBox }; foreach (var cb in checkBoxes) { cb.Checked += (s, e) => RestartSearch(); cb.Unchecked += (s, e) => RestartSearch(); } dnSpy.dntheme.Themes.ThemeChanged += Themes_ThemeChanged; Options.DisplaySettingsPanel.CurrentDisplaySettings.PropertyChanged += CurrentDisplaySettings_PropertyChanged; TooManyResults = false; }
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; }
public MainWindow() { instance = this; var spySettings = ILSpySettings.Load(); this.spySettingsForMainWindow_Loaded = spySettings; this.sessionSettings = new SessionSettings(spySettings); this.assemblyListManager = new AssemblyListManager(spySettings); this.Icon = new BitmapImage(new Uri("pack://application:,,,/ILSpy;component/images/ILSpy.ico")); this.DataContext = new MainWindowDataContext { Workspace = DockWorkspace.Instance, SessionSettings = sessionSettings }; DockWorkspace.Instance.LoadSettings(sessionSettings); InitializeComponent(); DockWorkspace.Instance.InitializeLayout(DockManager); sessionSettings.FilterSettings.PropertyChanged += filterSettings_PropertyChanged; InitMainMenu(); InitToolbar(); ContextMenuProvider.Add(treeView); this.Loaded += MainWindow_Loaded; }
public MainWindow() { instance = this; spySettings = ILSpySettings.Load(); this.sessionSettings = new SessionSettings(spySettings); this.assemblyListManager = new AssemblyListManager(spySettings); this.Icon = new WindowIcon("Images/ILSpy.png"); this.DataContext = sessionSettings; InitializeComponent(); #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; ContextMenuProvider.Add(treeView, decompilerTextView); }
public MainWindow() { instance = this; spySettings = ILSpySettings.Load(); this.sessionSettings = new SessionSettings(spySettings); this.assemblyListManager = new AssemblyListManager(spySettings); this.Icon = new BitmapImage(new Uri("pack://application:,,,/ILSpy;component/images/ILSpy.ico")); this.DataContext = sessionSettings; this.Left = sessionSettings.WindowBounds.Left; this.Top = sessionSettings.WindowBounds.Top; this.Width = sessionSettings.WindowBounds.Width; this.Height = sessionSettings.WindowBounds.Height; // TODO: validate bounds (maybe a monitor was removed...) this.WindowState = sessionSettings.WindowState; InitializeComponent(); App.CompositionContainer.ComposeParts(this); 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); this.Loaded += new RoutedEventHandler(MainWindow_Loaded); }
private AnalyzerTreeView() { this.ShowRoot = false; this.Root = new AnalyzerTreeNode { Language = MainWindow.Instance.CurrentLanguage }; ContextMenuProvider.Add(this); }
private AnalyzerTreeView() { this.ShowRoot = false; this.Root = new AnalyzerRootNode { Language = MainWindow.Instance.CurrentLanguage }; ContextMenuProvider.Add(this); MainWindow.Instance.CurrentAssemblyListChanged += MainWindow_Instance_CurrentAssemblyListChanged; }
private SearchPane() { InitializeComponent(); searchModeComboBox.Items.Add(new { Image = Images.Class, Name = "Type" }); searchModeComboBox.Items.Add(new { Image = Images.Property, Name = "Member" }); searchModeComboBox.Items.Add(new { Image = Images.Literal, Name = "Constant" }); searchModeComboBox.SelectedIndex = (int)SearchMode.Type; ContextMenuProvider.Add(listBox); MainWindow.Instance.CurrentAssemblyListChanged += MainWindow_Instance_CurrentAssemblyListChanged; }
public TabStateDecompile(Language language) { var view = TextView; TabItem.Content = view; TabItem.Style = App.Current.FindResource("TabStateDecompileTabItemStyle") as Style; this.language = language; UpdateHeader(); ContextMenuProvider.Add(view); view.DragOver += view_DragOver; view.OnThemeUpdated(); }
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_CurrentAssemblyListChanged; MainWindow.Instance.OnModuleModified += MainWindow_OnModuleModified; dntheme.Themes.ThemeChanged += Themes_ThemeChanged; Options.DisplaySettingsPanel.CurrentDisplaySettings.PropertyChanged += CurrentDisplaySettings_PropertyChanged; }
TabManager <TState> CreateTabManager(int insertIndex) { var tabControl = new TabControl(); tabControl.Style = App.Current.FindResource("TabStateDecompileTabControl") 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); }
private 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.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; }
public MainWindow() { instance = this; var spySettings = ILSpySettings.Load(); this.spySettingsForMainWindow_Loaded = spySettings; this.sessionSettings = new SessionSettings(spySettings); this.assemblyListManager = new AssemblyListManager(spySettings); this.Icon = new BitmapImage(new Uri("pack://application:,,,/ILSpy;component/images/ILSpy.ico")); this.DataContext = new MainWindowDataContext { Workspace = DockWorkspace.Instance, SessionSettings = sessionSettings }; DockWorkspace.Instance.LoadSettings(sessionSettings); InitializeComponent(); XmlLayoutSerializer serializer = new XmlLayoutSerializer(DockManager); serializer.LayoutSerializationCallback += DockWorkspace.Instance.LayoutSerializationCallback; try { sessionSettings.DockLayout.Deserialize(serializer); } finally { serializer.LayoutSerializationCallback -= DockWorkspace.Instance.LayoutSerializationCallback; } DockWorkspace.Instance.EnsureUnclosablePanes(); sessionSettings.FilterSettings.PropertyChanged += filterSettings_PropertyChanged; InitMainMenu(); InitToolbar(); ContextMenuProvider.Add(treeView); this.Loaded += MainWindow_Loaded; }