示例#1
0
 public void HandlerEvent()
 {
     if (tinyEvt != null)
     {
         tinyEvt.SendEvent();
     }
 }
示例#2
0
        /// <summary>
        /// 同步发事件.
        /// </summary>
        /// <typeparam name="T1"></typeparam>
        /// <typeparam name="T2"></typeparam>
        /// <typeparam name="T3"></typeparam>
        /// <typeparam name="T4"></typeparam>
        /// <param name="eventType"></param>
        /// <param name="arg1"></param>
        /// <param name="arg2"></param>
        /// <param name="arg3"></param>
        /// <param name="agr4"></param>
        public void SendEvnetSync <T1, T2, T3, T4>(EventType eventType, T1 arg1, T2 arg2, T3 arg3, T4 agr4)
        {
            ArrayList list = null;
            TinyEvent <Action <T1, T2, T3, T4> > tinyEvt = null;

            if (eventMapDic.ContainsKey(eventType))
            {
                list = eventMapDic[eventType];
                if (list != null)
                {
                    for (int i = 0; i < list.Count; i++)
                    {
                        tinyEvt = list[i] as TinyEvent <Action <T1, T2, T3, T4> >;
                        if (tinyEvt != null)
                        {
                            tinyEvt.SendEvent(arg1, arg2, arg3, agr4);
                        }
                    }
                }
            }
        }
示例#3
0
        /// <summary>
        /// 同步发事件.
        /// </summary>
        /// <param name="eventType"></param>
        public void SendEvnetSync(EventType eventType)
        {
            ArrayList          list    = null;
            TinyEvent <Action> tinyEvt = null;

            if (eventMapDic.ContainsKey(eventType))
            {
                list = eventMapDic[eventType];
                if (list != null)
                {
                    for (int i = 0; i < list.Count; i++)
                    {
                        tinyEvt = list[i] as TinyEvent <Action>;
                        if (tinyEvt != null)
                        {
                            tinyEvt.SendEvent();
                        }
                    }
                }
            }
        }