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); } } }
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); } } }
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); }