Пример #1
0
 public static bool SetParent(NodeModifier node, NodeModifier parentNode)
 {
     if (node.CanSetParent(parentNode))
     {
         node.RemoveFromContent();
         node.DeleteParent();
         node.SetParent(parentNode);
         return(true);
     }
     return(false);
 }
Пример #2
0
        //Static=============================================
        //以下静态方法将会同时处理设置中的各项引用、依赖关系
        //<<<===============================================
        public static void Delete(NodeModifier node)
        {
            NodeModifier[] nodes = node.NextNodes;
            for (int i = 0; i < nodes.Length; i++)
            {
                node.Remove(nodes[i]);
            }

            node.DeleteParent();
            node.RemoveFromContent();
        }
Пример #3
0
 public static void SetContent(NodeModifier node, NodeContent content)
 {
     node.RemoveFromContent();
     node.DeleteParent();
     node.SetContent(content);
 }