Example #1
0
 protected void CreateSubMenuCtrl(int addNum)
 {
     for (int i = 0; i < addNum; i++)
     {
         //TODO 这里有问题   想办法处理子菜单类型
         var ctrls = new MenuControlBase();
         _subMenuCtrls.Add(ctrls);
     }
 }
Example #2
0
        public bool Equals(MenuControlBase other)
        {
            bool result = false;

            if (_helper != null && other._helper != null)
            {
                result = GetDataHash() == other.GetDataHash();
            }

            return(result);
        }
Example #3
0
        protected virtual void OnSubMenuChange(MenuControlBase activeMenu)
        {
            if (CurActiveMenu != null &&
                (CurActiveMenu.Helper.InteractType & MenuInteractType.Exclusive) > 0)
            {
                CurActiveMenu.Disable();
                CurActiveMenuHash = null;
            }

            CurActiveMenu = activeMenu;

            if (CurActiveMenu != null)
            {
                CurActiveMenu.Enable();
                CurActiveMenuHash = CurActiveMenu.GetDataHash();
            }
        }