private void OnCurrentLanguageChanged(object sender, EventArgs e) { if (SourceView.CurrentTask != null) { DecompilerManager.RequestCodeDisassembly(SourceView.CurrentTask.CallingAssembly, SourceView.CurrentTask.Source); } }
/* * private void OnLoadAssemblyClick(object sender, RoutedEventArgs e) * { * var dlg = new OpenFileDialog(); * if (dlg.ShowDialog() == true) * { * Dispatcher.BeginInvoke(() => * { * try * { * var definition = AssemblyDefinition.ReadAssembly(dlg.File.OpenRead()); * * string assemblyPath = definition.IsSilverlight() * ? StorageService.CacheSilverlightAssembly(dlg.File.Name, dlg.File.OpenRead()) * : StorageService.CacheNetAssembly(dlg.File.Name, dlg.File.OpenRead()); * * ApplicationModel.Current.AssemblyCache.AddAssembly(assemblyPath, definition); * * LoadOrReplaceAssembly(definition); * } * catch (Exception ex) * { * Debug.WriteLine(ex.Message); * } * }); * } * } */ private void OnItemSelected(object sender, RoutedPropertyChangedEventArgs <object> e) { //ShowCode(e.NewValue); //ShowCodeUri(e.NewValue); if (AssemblyBrowserSettings.Current.AutoDisassemble) { var node = e.NewValue as TreeNode; if (node == null) { return; } Dispatcher.BeginInvoke(() => DecompilerManager.RequestCodeDisassembly(node.DeclaringAssembly, node.Component)); } }