예제 #1
0
 private void RemoveChild(NodeControl node)
 {
     if (ChildNodes.Contains(node))
     {
         ChildNodes.Remove(node);
     }
 }
예제 #2
0
 internal void AddNode(TreeNode treeNode)
 {
     if (!ChildNodes.Contains(treeNode))
     {
         ChildNodes.Add(treeNode);
     }
 }
예제 #3
0
 public bool Add(UITreeNode value)
 {
     if (!CheckNodeSafe(value))
     {
         throw new Exception("只能添加UITreeNode类型的对象");
     }
     if (ChildNodes.Contains(value))
     {
         return(false);
     }
     if (!CheckNodeRelation(value))//要添加的节点是本届点的父节点
     {
         return(false);
     }
     else
     {
         if (value.Parent)
         {
             value.Parent.Remove(value);
         }
         ChildNodes.Add(value);
         value.Parent = this;
         IsExpand     = _isExpand;
         if (StateChangedHandle != null)
         {
             StateChangedHandle();
         }
         return(true);
     }
 }
예제 #4
0
 private void AddChild(NodeControl node)
 {
     if (!ChildNodes.Contains(node))
     {
         ChildNodes.Add(node);
     }
 }
 public void AppendChild(StreamGraphNode node)
 {
     if (!ChildNodes.Contains(node))
     {
         ChildNodes.Add(node);
         node.ParentNodes.Add(this);
     }
 }
예제 #6
0
 /// <summary>
 /// 判断是否存在该子节点
 /// </summary>
 /// <param name="value"></param>
 /// <returns></returns>
 public bool Contains(UITreeNode value)
 {
     if (!CheckNodeSafe(value))
     {
         return(false);
     }
     return(ChildNodes.Contains(value));
 }
 internal void RemoveItem(MSBuildItem item)
 {
     AssertCanModify();
     if (ChildNodes.Contains(item))
     {
         item.RemoveIndent();
         ChildNodes = ChildNodes.Remove(item);
         NotifyChanged();
     }
 }
예제 #8
0
 /// <summary>
 ///   Adds the child tree to this node.
 /// </summary>
 /// <param name="child"> The child tree to add. </param>
 public void Add(GeneralTree <T> child)
 {
     if (child.Parent != null)
     {
         child.Parent.Remove(child);
     }
     if (!ChildNodes.Contains(child))
     {
         ChildNodes.Add(child);
         child.Parent = this;
     }
 }
예제 #9
0
        public void AddChild(TreeNode <TData> node)
        {
            if (node == null)
            {
                return;
            }
            if (ChildNodes.Contains(node))
            {
                return;
            }

            ChildNodes.Add(node);
        }
예제 #10
0
        public void Delete(INode a_nodeToDelete)
        {
            if (ChildNodes != null)
            {
                foreach (INode node in ChildNodes)
                {
                    node.Delete(a_nodeToDelete);
                }
            }

            if (ChildNodes != null && ChildNodes.Contains(a_nodeToDelete))
            {
                ChildNodes.Remove(a_nodeToDelete);
            }
        }
 // Use this for initialization
 void Awake()
 {
     Instance    = this;
     depHideList = new List <DepNode>();
     //Debug.LogError("FactoryDepManager_Awake");
     depType = DepType.Factory;
     DepController[] DepControllers = GameObject.FindObjectsOfType <DepController>();
     foreach (DepController dep in DepControllers)
     {
         if (!ChildNodes.Contains(dep))
         {
             ChildNodes.Add(dep);
         }
     }
     //colliders = GetComponentsInChildren<Collider>().ToList();
 }
예제 #12
0
 public bool Contains(IDomElement <TDependencyObject, TDependencyProperty> otherNode, SelectorType type)
 {
     return(type == SelectorType.VisualTree ? ChildNodes.Contains(otherNode) : LogicalChildNodes.Contains(otherNode));
 }
예제 #13
0
 public bool Contains(INode otherNode)
 {
     return(ChildNodes.Contains(otherNode));
 }
예제 #14
0
 public bool ContainsField(string fieldName)
 {
     return(ChildNodes.Contains(fieldName));
 }
예제 #15
0
 public bool Contains(IDomElement <TDependencyObject> otherNode)
 {
     return(ChildNodes.Contains(otherNode));
 }