//public static void DispatchUIEvent<T>(string UIName, string ComponentName, string parm) where T : InputUIEventBase, new()
        //{
        //    //只有允许输入时才派发事件
        //    if (IsActive)
        //    {
        //        T eventTmp = GetUIEvent<T>(UIName, ComponentName, parm);
        //        InputManager.Dispatch<T>(eventTmp);
        //    }
        //}

        public static void DispatchOnClickEvent(string UIName, string ComponentName, string parm)
        {
            //只有允许输入时才派发事件
            if (IsActive)
            {
                InputUIOnClickEvent e = GetUIEvent <InputUIOnClickEvent>(UIName, ComponentName, parm);
                InputMessageManager.Dispatch("InputUIOnClickEvent", e);
            }
        }
        public static InputButtonClickRegisterInfo GetOnClickListener(Button button, string UIName, string ComponentName, string parm, InputEventHandle <InputUIOnClickEvent> callback)
        {
            InputButtonClickRegisterInfo info = HeapObjectPool <InputButtonClickRegisterInfo> .GetObject();

            info.eventKey  = InputUIOnClickEvent.GetEventKey(UIName, ComponentName, parm);
            info.callBack  = callback;
            info.m_button  = button;
            info.m_OnClick = () =>
            {
                DispatchOnClickEvent(UIName, ComponentName, parm);
            };

            return(info);
        }