示例#1
0
文件: UserUtil.cs 项目: SylarLi/EGUI2
        internal static void PasteNodes(Node root)
        {
            var parent  = UserDatabase.selection.node != null ? UserDatabase.selection.node.parent : root;
            var pending = UserClipBoard.Paste() as Node[];

            if (pending != null && pending.Length > 0)
            {
                Command.Execute(new NodeDuplicateThenSelectionCommand(pending, pending.Select(i => parent).ToArray(), root));
            }
        }
示例#2
0
文件: UserUtil.cs 项目: SylarLi/EGUI2
        internal static void CopyNodes(Node root)
        {
            var nodes   = UserDatabase.selection.nodes ?? new Node[0];
            var pending = FilterNested(FilterDuplicated(nodes));

            if (pending.Length > 0)
            {
                pending = Duplicate(pending, root);
                UserClipBoard.Copy(pending);
            }
        }