Пример #1
0
 public string GetFullPath(PathTreeNodeData iNode)
 {
     string fullPath = iNode.Path;
     while (null != iNode.Parent)
     {
         iNode = iNode.Parent;
         fullPath = iNode.Path + "\\" + fullPath;
     }
     return fullPath;
 }
Пример #2
0
        public static PathTreeNodeData GetTreeNodeData()
        {
            PathTreeNodeData root = new PathTreeNodeData() { Path = "A", Parent = null };

            PathTreeNodeData child1 = new PathTreeNodeData() { Path = "-A1", Parent = root };

            child1.Children.Add(new PathTreeNodeData() { Path = "--A1.1", Parent = child1 });
            child1.Children.Add(new PathTreeNodeData() { Path = "--A1.2", Parent = child1 });

            root.Children.Add(child1);
            root.Children.Add(new PathTreeNodeData() { Path = "-A2", Parent = root });

            return root;
        }
Пример #3
0
 public bool HasChildren(PathTreeNodeData iNode)
 {
     if (0 < iNode.Children.Count)
         return true;
     return false;
 }