示例#1
0
        public override void Init()
        {
            UP  = GetCom <UserPort>();
            QRC = GetCom <QuestionnaireResultContainer>();

            UP.OnMessage("SubmitQuestionnaireResult", OnSubmitQuestionnaireResult);
        }
示例#2
0
        public override void Init()
        {
            UP  = GetCom <UserPort>();
            QRC = GetCom <QuestionnaireResultContainer>();

            //LoadAllQuestionnaire();

            UP.OnRequest("GetQuestionnaire", OnGetQuestionnaire);
        }
示例#3
0
        // 初始化
        public override void Init()
        {
            SC = GetCom <SessionContainer>();
            UP = GetCom <UserPort>();
            UC = GetCom <UserContainer>();
            var nc = GetCom <NetCore>();

            nc.OnDisconnected += OnDisconnected;

            UP.OnRequest("Login", OnUserLoginMsg);

            // 登录日志
            SrvLogger = GetCom <ServerBusinessLogger <LoginInfo> >();

            //  问卷
            QRC = GetCom <QuestionnaireResultContainer>();
        }
示例#4
0
        public static void BuildQuestionnaire(GameServer srv)
        {
            BC <QuestionnaireMgr>();       // 问卷调查
            BC <QuestionnaireResultMgr>(); // 问卷调查

            var qrc = new QuestionnaireResultContainer(new MySqlDbPersistence <QuestionnaireResult, string>(
                                                           "scm_qr", "127.0.0.1", "root", "123456",
                                                           @"Qa", "CREATE TABLE Qa(ID VARCHAR(100) BINARY, Data MediumBlob,"
                                                           + "PRIMARY KEY(ID ASC));", null, (da) =>
            {
                var buff = new WriteBuffer();
                da.Serialize(buff);
                return(buff.Data);
            }, (data) =>
            {
                var rb = new RingBuffer(data);
                var qr = new QuestionnaireResult();
                qr.Deserialize(rb);
                return(qr);
            }, null));

            srv.Add("QuestionnaireResultContainer", qrc);
        }