private List <DepNode> CreateDeps = new List <DepNode>();//已经创建柱子的区域 /// <summary> /// 获取区域下的柱子节点 /// </summary> /// <param name="dep"></param> /// <returns></returns> private List <PhysicalTopology> TryGetRoomBlocks(DepNode dep) { List <PhysicalTopology> blockList = new List <PhysicalTopology>(); TopoTreeManager manager = TopoTreeManager.Instance; if (manager) { TreeNode <TreeViewItem> node = manager.TryGetAreaNode(dep.NodeID); if (node != null) { PhysicalTopology depPhysic = node.Item.Tag as PhysicalTopology; if (depPhysic != null) { foreach (var item in depPhysic.Children) { if (item.Name == blockName) { blockList.Add(item); } } } } } return(blockList.Count == 0 ? null : blockList);; }
TopoTreeManager FindEquipTree; //找到设备树 void Start() { FindEquipTree = TopoTreeManager.Instance; btn_ReTract = GameObject.Find("ReTract_Button").GetComponent <Button>(); btn_ReFresh = GameObject.Find("Refresh_Button").GetComponent <Button>(); Im_ReFresh = GameObject.Find("Refresh_Button/Image").GetComponent <Image>(); btn_ReTract.onClick.AddListener(ReTractTree); btn_ReFresh.onClick.AddListener(ReFreshTree); }
/// <summary> /// 缩放树窗体 /// </summary> /// <param name="isExpand">树窗体是否扩大</param> private void ScaleTreeWindow(bool isTreeExpand) { FullViewController mainPage = FullViewController.Instance; if (mainPage && mainPage.IsFullView) { Debug.Log("Is in main page..."); return; } TopoTreeManager topoTree = TopoTreeManager.Instance; if (topoTree) { topoTree.ScaleWindow(isTreeExpand); } PersonnelTreeManage personalTree = PersonnelTreeManage.Instance; if (personalTree) { personalTree.ScaleWindow(isTreeExpand); } }
void Awake() { Instance = this; }