Example #1
0
        /// <summary>
        /// 返回上级设备组
        /// </summary>
        public void backSuperNode()
        {
            MyTreeMenuItem item = treeMenu.getItem(this.currentModel);

            if (item == null)
            {
                return;
            }

            if (item.getParent() != null)
            {
                //backSuperNodeBtn.gameObject.SetActive(true);
                leafNodesClick(item.getParent().getItemVO().value, true);
                treeMenu.Locate(item.getParent().getItemVO().value, true, false);
            }
            else
            {
                backSuperNodeBtn.gameObject.SetActive(false);
                mouseFocus.ChangeCamera(false);
                treeMenu.allFold();
                this.isWalkCamea  = true;
                this.currentGroup = null;
                this.currentModel = null;
            }
        }
Example #2
0
        private string getNumberByLevel(int level, string value)
        {
            MyTreeMenuItem ob = treeMenu.getItem(value);

            if (ob.getNodeLevel() == level)
            {
                nowValue = value;
                string[] sArray = treeMenu.getItem(value).name.Split('_');
                lastNumber = sArray[sArray.Length - 1];
                return(sArray[sArray.Length - 1]);
            }
            else if (ob.getNodeLevel() >= level)
            {
                return(lastNumber);
            }
            else
            {
                return(null);
            }
        }
Example #3
0
        private int getItemLevel(string value)
        {
            MyTreeMenuItem ob = treeMenu.getItem(value);

            return(ob.getNodeLevel());
        }