Exemple #1
0
        static void Execute(Lazy <IUndoCommandService> undoCommandService, IAppService appService, DocumentTreeNodeData[] nodes)
        {
            if (!CanExecute(nodes))
            {
                return;
            }

            var asmNode = (ModuleDocumentNode)nodes[0];

            var module = asmNode.Document.ModuleDef;
            var data   = new ModuleOptionsVM(module, new ModuleOptions(module), appService.DecompilerService);
            var win    = new ModuleOptionsDlg();

            win.DataContext = data;
            win.Owner       = appService.MainWindow;
            if (win.ShowDialog() != true)
            {
                return;
            }

            undoCommandService.Value.Add(new ModuleSettingsCommand(asmNode, data.CreateModuleOptions()));
        }
Exemple #2
0
        static void Execute(Lazy <IUndoCommandManager> undoCommandManager, IAppWindow appWindow, IFileTreeNodeData[] nodes)
        {
            if (!CanExecute(nodes))
            {
                return;
            }

            var asmNode = (IModuleFileNode)nodes[0];

            var module = asmNode.DnSpyFile.ModuleDef;
            var data   = new ModuleOptionsVM(module, new ModuleOptions(module), appWindow.LanguageManager);
            var win    = new ModuleOptionsDlg();

            win.DataContext = data;
            win.Owner       = appWindow.MainWindow;
            if (win.ShowDialog() != true)
            {
                return;
            }

            undoCommandManager.Value.Add(new ModuleSettingsCommand(asmNode, data.CreateModuleOptions()));
        }
Exemple #3
0
        static void Execute(ILSpyTreeNode[] nodes)
        {
            if (!CanExecute(nodes))
            {
                return;
            }

            var asmNode = (AssemblyTreeNode)nodes[0];

            var module = asmNode.LoadedAssembly.ModuleDefinition;
            var data   = new ModuleOptionsVM(module, new ModuleOptions(module), MainWindow.Instance.CurrentLanguage);
            var win    = new ModuleOptionsDlg();

            win.DataContext = data;
            win.Owner       = MainWindow.Instance;
            if (win.ShowDialog() != true)
            {
                return;
            }

            UndoCommandManager.Instance.Add(new ModuleSettingsCommand(asmNode, data.CreateModuleOptions()));
        }
Exemple #4
0
        static void Execute(ILSpyTreeNode[] nodes)
        {
            if (!CanExecute(nodes))
                return;

            var asmNode = (AssemblyTreeNode)nodes[0];

            var module = asmNode.LoadedAssembly.ModuleDefinition;
            var data = new ModuleOptionsVM(module, new ModuleOptions(module), MainWindow.Instance.CurrentLanguage);
            var win = new ModuleOptionsDlg();
            win.DataContext = data;
            win.Owner = MainWindow.Instance;
            if (win.ShowDialog() != true)
                return;

            UndoCommandManager.Instance.Add(new ModuleSettingsCommand(asmNode, data.CreateModuleOptions()));
        }
Exemple #5
0
		static void Execute(Lazy<IUndoCommandManager> undoCommandManager, IAppWindow appWindow, IFileTreeNodeData[] nodes) {
			if (!CanExecute(nodes))
				return;

			var asmNode = (IModuleFileNode)nodes[0];

			var module = asmNode.DnSpyFile.ModuleDef;
			var data = new ModuleOptionsVM(module, new ModuleOptions(module), appWindow.LanguageManager);
			var win = new ModuleOptionsDlg();
			win.DataContext = data;
			win.Owner = appWindow.MainWindow;
			if (win.ShowDialog() != true)
				return;

			undoCommandManager.Value.Add(new ModuleSettingsCommand(asmNode, data.CreateModuleOptions()));
		}
Exemple #6
0
		static void Execute(Lazy<IUndoCommandService> undoCommandService, IAppService appService, DocumentTreeNodeData[] nodes) {
			if (!CanExecute(nodes))
				return;

			var asmNode = (ModuleDocumentNode)nodes[0];

			var module = asmNode.Document.ModuleDef;
			var data = new ModuleOptionsVM(module, new ModuleOptions(module), appService.DecompilerService);
			var win = new ModuleOptionsDlg();
			win.DataContext = data;
			win.Owner = appService.MainWindow;
			if (win.ShowDialog() != true)
				return;

			undoCommandService.Value.Add(new ModuleSettingsCommand(asmNode, data.CreateModuleOptions()));
		}