コード例 #1
0
 void OnDisable()
 {
     m_cCanvas.Dispose();
     m_cCanvas            = null;
     m_cToolBarBtnStyle   = null;
     m_cToolBarPopupStyle = null;
 }
コード例 #2
0
        private void Load(NETreeComposeType conposeType)
        {
            NEData neData = null;

            if (m_cRoot != null)
            {
                foreach (var item in NEConfig.arrTreeComposeData)
                {
                    if (item.rootType == m_cRoot.node.GetType())
                    {
                        if (item == conposeType)
                        {
                            neData = GetCurrentTreeNEData();
                        }
                        break;
                    }
                }
                m_cRoot = null;
            }
            NEUtil.LoadTreeComposeTypes(conposeType, out m_lstNodeType, out m_lstNodeDataType);

            //移除根节点
            List <Type> lst = new List <Type>();

            for (int i = 0; i < m_lstNodeType.Count; i++)
            {
                if (!IsRootType(m_lstNodeType[i]))
                {
                    lst.Add(m_lstNodeType[i]);
                }
            }
            if (m_cCanvas != null)
            {
                m_cCanvas.Dispose();
            }
            m_cCanvas = new NECanvas(lst, CreateNENodeByNENodeType);
            CreateTreeByTreeData(neData);
        }