static void Execute(ILSpyTreeNode[] nodes) { if (!CanExecute(nodes)) { return; } var asmNode = (AssemblyTreeNode)nodes[0]; var module = asmNode.LoadedAssembly.ModuleDefinition; var data = new AssemblyOptionsVM(new AssemblyOptions(asmNode.LoadedAssembly.AssemblyDefinition), module, MainWindow.Instance.CurrentLanguage); var win = new AssemblyOptionsDlg(); win.DataContext = data; win.Owner = MainWindow.Instance; if (win.ShowDialog() != true) { return; } UndoCommandManager.Instance.Add(new AssemblySettingsCommand(asmNode, data.CreateAssemblyOptions())); }
static void Execute(ILSpyTreeNode[] nodes) { if (!CanExecute(nodes)) { return; } var newModule = new ModuleDefUser(); var data = new AssemblyOptionsVM(AssemblyOptions.Create("MyAssembly"), newModule, MainWindow.Instance.CurrentLanguage); data.CanShowClrVersion = true; var win = new AssemblyOptionsDlg(); win.Title = "Create Assembly"; win.DataContext = data; win.Owner = MainWindow.Instance; if (win.ShowDialog() != true) { return; } UndoCommandManager.Instance.Add(new CreateAssemblyCommand(newModule, data.CreateAssemblyOptions())); }
static void Execute(ILSpyTreeNode[] nodes) { if (!CanExecute(nodes)) return; var newModule = new ModuleDefUser(); var data = new AssemblyOptionsVM(AssemblyOptions.Create("MyAssembly"), newModule, MainWindow.Instance.CurrentLanguage); data.CanShowClrVersion = true; var win = new AssemblyOptionsDlg(); win.Title = "Create Assembly"; win.DataContext = data; win.Owner = MainWindow.Instance; if (win.ShowDialog() != true) return; UndoCommandManager.Instance.Add(new CreateAssemblyCommand(newModule, data.CreateAssemblyOptions())); }
static void Execute(ILSpyTreeNode[] nodes) { if (!CanExecute(nodes)) return; var asmNode = (AssemblyTreeNode)nodes[0]; var module = asmNode.LoadedAssembly.ModuleDefinition; var data = new AssemblyOptionsVM(new AssemblyOptions(asmNode.LoadedAssembly.AssemblyDefinition), module, MainWindow.Instance.CurrentLanguage); var win = new AssemblyOptionsDlg(); win.DataContext = data; win.Owner = MainWindow.Instance; if (win.ShowDialog() != true) return; UndoCommandManager.Instance.Add(new AssemblySettingsCommand(asmNode, data.CreateAssemblyOptions())); }