예제 #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));
        }
예제 #2
0
        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));
        }
예제 #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));
        }
예제 #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));
		}
예제 #5
0
		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));
		}
예제 #6
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));
		}