void MainWindow_Loaded(object sender, RoutedEventArgs e) { ILSpySettings spySettings = this.spySettings; this.spySettings = null; // Load AssemblyList only in Loaded event so that WPF is initialized before we start the CPU-heavy stuff. // This makes the UI come up a bit faster. this.assemblyList = assemblyListManager.LoadList(spySettings, sessionSettings.ActiveAssemblyList); HandleCommandLineArguments(App.CommandLineArguments); if (assemblyList.GetAssemblies().Length == 0 && assemblyList.ListName == AssemblyListManager.DefaultListName) { LoadInitialAssemblies(); } ShowAssemblyList(this.assemblyList); if (sessionSettings.ActiveAutoLoadedAssembly != null) { this.assemblyList.Open(sessionSettings.ActiveAutoLoadedAssembly, true); } Dispatcher.BeginInvoke(DispatcherPriority.Loaded, new Action(() => OpenAssemblies(spySettings))); #if DEBUG this.Title = $"ILSpy {RevisionClass.FullVersion}"; #endif }
void MainWindow_Loaded(object sender, RoutedEventArgs e) { ILSpySettings spySettings = this.spySettings; this.spySettings = null; // Load AssemblyList only in Loaded event so that WPF is initialized before we start the CPU-heavy stuff. // This makes the UI come up a bit faster. this.assemblyList = assemblyListManager.LoadList(spySettings, sessionSettings.ActiveAssemblyList); HandleCommandLineArguments(App.CommandLineArguments); if (assemblyList.GetAssemblies().Length == 0 && assemblyList.ListName == AssemblyListManager.DefaultListName) { LoadInitialAssemblies(); } ShowAssemblyList(this.assemblyList); HandleCommandLineArgumentsAfterShowList(App.CommandLineArguments); if (App.CommandLineArguments.NavigateTo == null && App.CommandLineArguments.AssembliesToLoad.Count != 1) { SharpTreeNode node = null; if (sessionSettings.ActiveTreeViewPath != null) { node = FindNodeByPath(sessionSettings.ActiveTreeViewPath, true); if (node == this.assemblyListTreeNode && sessionSettings.ActiveAutoLoadedAssembly != null) { this.assemblyList.Open(sessionSettings.ActiveAutoLoadedAssembly, true); node = FindNodeByPath(sessionSettings.ActiveTreeViewPath, true); } } if (node != null) { SelectNode(node); // only if not showing the about page, perform the update check: ShowMessageIfUpdatesAvailableAsync(spySettings); } else { AboutPage.Display(decompilerTextView); } } AvalonEditTextOutput output = new AvalonEditTextOutput(); if (FormatExceptions(App.StartupExceptions.ToArray(), output)) { decompilerTextView.ShowText(output); } }
void MainWindow_Loaded(object sender, RoutedEventArgs e) { ILSpySettings spySettings = this.spySettings; this.spySettings = null; // Load AssemblyList only in Loaded event so that WPF is initialized before we start the CPU-heavy stuff. // This makes the UI come up a bit faster. this.assemblyList = assemblyListManager.LoadList(spySettings, sessionSettings.ActiveAssemblyList); HandleCommandLineArguments(App.CommandLineArguments); if (assemblyList.GetAssemblies().Length == 0 && assemblyList.ListName == AssemblyListManager.DefaultListName) { LoadInitialAssemblies(); } ShowAssemblyList(this.assemblyList); HandleCommandLineArgumentsAfterShowList(App.CommandLineArguments); if (App.CommandLineArguments.NavigateTo == null) { SharpTreeNode node = FindNodeByPath(sessionSettings.ActiveTreeViewPath, true); if (node != null) { SelectNode(node); // only if not showing the about page, perform the update check: ShowMessageIfUpdatesAvailableAsync(spySettings); } else { AboutPage.Display(decompilerTextView); } } //Fires the OnLoaded notification to the plugins foreach (var x in applicationLifeCycleInterceptors) { x.Value.OnLoaded(); } }
void MainWindow_Loaded(object sender, RoutedEventArgs e) { ILSpySettings spySettings = this.spySettings; this.spySettings = null; // Load AssemblyList only in Loaded event so that WPF is initialized before we start the CPU-heavy stuff. // This makes the UI come up a bit faster. this.assemblyList = assemblyListManager.LoadList(spySettings, sessionSettings.ActiveAssemblyList); ShowAssemblyList(this.assemblyList); string[] args = Environment.GetCommandLineArgs(); for (int i = 1; i < args.Length; i++) { assemblyList.OpenAssembly(args[i]); } if (assemblyList.GetAssemblies().Length == 0) { LoadInitialAssemblies(); } SharpTreeNode node = FindNodeByPath(sessionSettings.ActiveTreeViewPath, true); if (node != null) { SelectNode(node); // only if not showing the about page, perform the update check: ShowMessageIfUpdatesAvailableAsync(spySettings); } else { AboutPage.Display(decompilerTextView); } }
void MainWindow_Loaded(object sender, RoutedEventArgs e) { DockWorkspace.Instance.Documents.Add(new DecompiledDocumentModel() { IsCloseable = false, Language = CurrentLanguage, LanguageVersion = CurrentLanguageVersion }); DockWorkspace.Instance.ActiveDocument = DockWorkspace.Instance.Documents.First(); ILSpySettings spySettings = this.spySettingsForMainWindow_Loaded; this.spySettingsForMainWindow_Loaded = null; var loadPreviousAssemblies = Options.MiscSettingsPanel.CurrentMiscSettings.LoadPreviousAssemblies; if (loadPreviousAssemblies) { // Load AssemblyList only in Loaded event so that WPF is initialized before we start the CPU-heavy stuff. // This makes the UI come up a bit faster. this.assemblyList = assemblyListManager.LoadList(spySettings, sessionSettings.ActiveAssemblyList); } else { this.assemblyList = new AssemblyList(AssemblyListManager.DefaultListName); assemblyListManager.ClearAll(); } HandleCommandLineArguments(App.CommandLineArguments); if (assemblyList.GetAssemblies().Length == 0 && assemblyList.ListName == AssemblyListManager.DefaultListName && loadPreviousAssemblies) { LoadInitialAssemblies(); } ShowAssemblyList(this.assemblyList); if (sessionSettings.ActiveAutoLoadedAssembly != null) { this.assemblyList.Open(sessionSettings.ActiveAutoLoadedAssembly, true); } Dispatcher.BeginInvoke(DispatcherPriority.Loaded, new Action(() => OpenAssemblies(spySettings))); }