Exemplo n.º 1
0
 private void InvokeEveryCom(string methodName, object[] param = null)
 {
     if (!string.IsNullOrEmpty(methodName))
     {
         for (int i = 0; i < this.listGlobalComServer.Count; i++)
         {
             IGlobalComServer globalComServer = this.listGlobalComServer[i];
             Type             type            = globalComServer.GetType();
             MethodInfo       method          = type.GetMethod(methodName);
             if (method != null)
             {
                 method.Invoke(globalComServer, param);
             }
         }
     }
 }
Exemplo n.º 2
0
        public void OnAwake()
        {
            Array values = Enum.GetValues(typeof(MobaMasterCode));

            foreach (object current in values)
            {
                MobaMessageManager.RegistMessage((MobaMasterCode)((byte)current), new MobaMessageFunc(MVC_MessageManager.OnGetMsg));
            }
            Array values2 = Enum.GetValues(typeof(MobaGameCode));

            foreach (object current2 in values2)
            {
                MobaMessageManager.RegistMessage((MobaGameCode)((byte)current2), new MobaMessageFunc(MVC_MessageManager.OnGetMsg));
            }
            Array values3 = Enum.GetValues(typeof(MobaGateCode));

            foreach (object current3 in values3)
            {
                MobaMessageManager.RegistMessage((MobaGateCode)((byte)current3), new MobaMessageFunc(MVC_MessageManager.OnGetMsg));
            }
            Array values4 = Enum.GetValues(typeof(MobaFriendCode));

            foreach (object current4 in values4)
            {
                MobaMessageManager.RegistMessage((MobaFriendCode)((byte)current4), new MobaMessageFunc(MVC_MessageManager.OnGetMsg));
            }
            Array values5 = Enum.GetValues(typeof(MobaTeamRoomCode));

            foreach (object current5 in values5)
            {
                MobaMessageManager.RegistMessage((MobaTeamRoomCode)((byte)current5), new MobaMessageFunc(MVC_MessageManager.OnGetMsg));
            }
            Array values6 = Enum.GetValues(typeof(MobaUserDataCode));

            foreach (object current6 in values5)
            {
                MobaMessageManager.RegistMessage((MobaUserDataCode)((byte)current6), new MobaMessageFunc(MVC_MessageManager.OnGetMsg));
            }
            MsgPreHandlerMng instance = MsgPreHandlerMng.Instance;

            this.m_waitViewMsg = new WaitingViewMng();
            this.m_waitViewMsg.OnAwake();
            this.m_waitViewMsg.Enable(true);
            this.m_popViewMng = new PopViewMng();
            this.m_popViewMng.OnAwake();
            this.m_popViewMng.Enable(true);
        }