예제 #1
0
 public TreeViewItemCatalogUI(TreeViewItemCatalogData category, ITreeViewItemUI parent)
 {
     this.data   = category;
     this.parent = parent;
     this.Depth  = parent == null ? 0 : (parent.Depth + 1);
     foreach (var d in this.Data.Leafs)
     {
         this.Children.Add(new TreeViewItemLeafUI(d, this));
     }
     foreach (TreeViewItemCatalogData c in this.data.Catagory)
     {
         this.Children.Add(new TreeViewItemCatalogUI(c, this));
     }
 }
예제 #2
0
 public TreeViewItemLeafUI(TreeViewItemData data, ITreeViewItemUI parent)
 {
     this.parent = parent;
     this.data   = data;
     this.Depth  = parent == null ? 0 : (parent.Depth + 1);
 }