예제 #1
0
 public void LoadData <T>(T root, bool onlyBuilding = false, bool showCheckBox = false) where T : ITreeNode <T>
 {
     AreaNodeDict.Clear();
     if (root == null)
     {
         ShowTree <T>(TreeView1, null, showCheckBox);
     }
     else
     {
         if (onlyBuilding)
         {
             ShowTree(TreeView1, root.GetAllChildren((int)AreaTypes.大楼), showCheckBox);
         }
         else
         {
             ShowTree(TreeView1, root.Children, showCheckBox);
         }
     }
 }
예제 #2
0
 public void LoadDataEx <TD, TF>(TD root, bool onlyBuilding = false) where TD : ITreeNodeEx <TD, TF>
 {
     AreaNodeDict.Clear();
     if (root == null)
     {
         ShowTreeEx <TD, TF>(TreeView1, null);
     }
     else
     {
         if (onlyBuilding)
         {
             ShowTreeEx <TD, TF>(TreeView1, root.GetAllChildren((int)AreaTypes.大楼));
         }
         else
         {
             ShowTreeEx <TD, TF>(TreeView1, root.Children);
         }
     }
 }
예제 #3
0
 public void LoadDataEx <TD, TF>(TD root, bool onlyBuilding = false) where TD : ITreeNodeEx <TD, TF> where TF : IId
 {
     AreaNodeDict.Clear();
     DevNodeDict.Clear();
     if (root == null)
     {
         ShowTreeEx <TD, TF>(TreeView1, null);
     }
     else
     {
         if (onlyBuilding)
         {
             ShowTreeEx <TD, TF>(TreeView1, root.GetAllChildren((int)AreaTypes.大楼));
         }
         else
         {
             ShowTreeEx <TD, TF>(TreeView1, root.Children);
         }
     }
     TreeViewDragDropManager dragdrop = new TreeViewDragDropManager(TreeView1);
 }