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

            var nsNode = (NamespaceNode)nodes[0];

            var data = new NamespaceVM(nsNode.Name);
            var win  = new NamespaceDlg();

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

            if (nsNode.Name == data.Name)
            {
                return;
            }

            undoCommandService.Value.Add(new RenameNamespaceCommand(data.Name, nsNode));
        }
        static void Execute(Lazy <IUndoCommandManager> undoCommandManager, IAppWindow appWindow, IFileTreeNodeData[] nodes)
        {
            if (!CanExecute(nodes))
            {
                return;
            }

            var nsNode = (INamespaceNode)nodes[0];

            var data = new NamespaceVM(nsNode.Name);
            var win  = new NamespaceDlg();

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

            if (nsNode.Name == data.Name)
            {
                return;
            }

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

            var nsNode = (NamespaceTreeNode)nodes[0];

            var data = new NamespaceVM(nsNode.Name);
            var win  = new NamespaceDlg();

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

            if (AssemblyTreeNode.NamespaceStringEqualsComparer.Equals(nsNode.Name, data.Name))
            {
                return;
            }

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

			var nsNode = (NamespaceTreeNode)nodes[0];

			var data = new NamespaceVM(nsNode.Name);
			var win = new NamespaceDlg();
			win.DataContext = data;
			win.Owner = MainWindow.Instance;
			if (win.ShowDialog() != true)
				return;

			if (AssemblyTreeNode.NamespaceStringEqualsComparer.Equals(nsNode.Name, data.Name))
				return;

			UndoCommandManager.Instance.Add(new RenameNamespaceCommand(data.Name, nsNode));
		}
		static void Execute(Lazy<IUndoCommandManager> undoCommandManager, IAppWindow appWindow, IFileTreeNodeData[] nodes) {
			if (!CanExecute(nodes))
				return;

			var nsNode = (INamespaceNode)nodes[0];

			var data = new NamespaceVM(nsNode.Name);
			var win = new NamespaceDlg();
			win.DataContext = data;
			win.Owner = appWindow.MainWindow;
			if (win.ShowDialog() != true)
				return;

			if (nsNode.Name == data.Name)
				return;

			undoCommandManager.Value.Add(new RenameNamespaceCommand(data.Name, nsNode));
		}
		static void Execute(Lazy<IUndoCommandService> undoCommandService, IAppService appService, DocumentTreeNodeData[] nodes) {
			if (!CanExecute(nodes))
				return;

			var nsNode = (NamespaceNode)nodes[0];

			var data = new NamespaceVM(nsNode.Name);
			var win = new NamespaceDlg();
			win.DataContext = data;
			win.Owner = appService.MainWindow;
			if (win.ShowDialog() != true)
				return;

			if (nsNode.Name == data.Name)
				return;

			undoCommandService.Value.Add(new RenameNamespaceCommand(data.Name, nsNode));
		}