Esempio n. 1
0
        private void CutAndCopy(BeTreeNode arg1, BeTreeNode arg2)
        {
            RunTimeNodeData data1 = _datas[arg1.SrcTreeID];
            RunTimeNodeData data2 = _datas[arg2.SrcTreeID];

            NodeParam root = data1.GetNodeParam(arg1.NodeID);
            NodeParam copy = data2.GetNodeParam(arg2.NodeID);

            if (!data1.CopyChild(root, copy))
            {
                return;
            }
            data2.DeleteNode(copy.NodeID);

            if (data1 == data2)
            {
                _id2Windows[data1.ID].Canvas.RefreshNodeParam(data1.Root);
                SetNodeShowValue(data1.ID);
            }
            else
            {
                _id2Windows[data1.ID].Canvas.RefreshNodeParam(data1.Root);
                _id2Windows[data2.ID].Canvas.RefreshNodeParam(data2.Root);
                SetNodeShowValue(data1.ID);
                SetNodeShowValue(data2.ID);
            }
        }
Esempio n. 2
0
        private void RemoveNode(BeTreeNode node)
        {
            RunTimeNodeData data = _datas[node.SrcTreeID];

            data.DeleteNode(node.NodeID);
            _id2Windows[data.ID].Canvas.RefreshNodeParam(data.Root);
            SetNodeShowValue(data.ID);
        }