Exemplo n.º 1
0
        public object BuildItem(object caller, Codon codon, System.Collections.ArrayList subItems)
        {
            IMsgReceiver receiver = MsgMonitor.GetReceiver(codon.ID);

            if (receiver == null)
            {
                receiver = new GameConnecter(codon.ID);
            }

            return(receiver);
        }
Exemplo n.º 2
0
        public static void Start()
        {
            string sender = typeof(GameGloba).Name;

            MsgMonitor.CreateAndSendMsg(MsgGloba.SetSocketType,
                                        sender,
                                        new string[] { ServiceGloba.Center_ListenServiceID, ServiceGloba.ConnecterID },
                                        typeof(Server));

            MsgMonitor.CreateAndSendMsg(MsgGloba.Listen,
                                        sender,
                                        new string[] { ServiceGloba.Center_ListenServiceID },
                                        2212);

            //MsgMonitor.CreateAndSendMsg(MsgGloba.Connect,
            //                            sender,
            //                            new string[] { ServiceGloba.ConnecterID },
            //                            "192.168.16.119",
            //                            7810);
        }
Exemplo n.º 3
0
        public static Module CreateModule(ModuleInfo moduleInfo)
        {
            Module module;

            Assembly assembly = Assembly.LoadFrom(Path.Combine(moduleInfo.CurDir, moduleInfo.File));

            try
            {
                Type type = assembly.GetType(moduleInfo.CLS);

                module = Activator.CreateInstance(type, moduleInfo) as Module;

                ModuleMonitor.RegisteModule(module);

                MsgMonitor.RegisteReceiver(module);
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(module);
        }