示例#1
0
        public int GetDepth(MyTreeNodeElem e)
        {
            int jumps = 0;
            var node  = e;

            while (node.ParentID != null)
            {
                node = Nodes.Where(r => r.ID == node.ParentID).FirstOrDefault();
                jumps++;
            }
            return(jumps);
        }
示例#2
0
 public Point CenterOfNode(MyTreeNodeElem e)
 {
     return(new Point(e.Location.X + LEFT_OFFSET, e.Location.Y + e.Height / 2));
 }
示例#3
0
 public void AddNode(MyTreeNodeElem node)
 {
     Nodes.Add(node);
 }