예제 #1
0
        public MIMCDemo()
        {
            leijun = new MIMCUser(appAccount1);
            leijun.RegisterMIMCTokenFetcher(new MIMCCaseTokenFetcher(appId, appKey, appSecret, url, appAccount1));
            leijun.stateChangeEvent                  += HandleStatusChange;
            leijun.messageEvent                      += HandleMessage;
            leijun.messageTimeOutEvent               += HandleMessageTimeout;
            leijun.groupMessageEvent                 += HandleGroupMessage;
            leijun.groupMessageTimeoutEvent          += HandleGroupMessageTimeout;
            leijun.serverACKEvent                    += HandleServerACK;
            leijun.unlimitedGroupMessageEvent        += HandleUnlimitedGroupMessage;
            leijun.unlimitedGroupMessageTimeoutEvent += HandleUnlimitedGroupMessageTimeout;
            leijun.joinUnlimitedGroupEvent           += HandleJoinUnlimitedGroup;
            leijun.quitUnlimitedGroupEvent           += HandleQuitUnlimitedGroup;
            leijun.dismissUnlimitedGroupEvent        += HandleDismissUnlimitedGroup;

            linbin = new MIMCUser(appAccount2);
            linbin.RegisterMIMCTokenFetcher(new MIMCCaseTokenFetcher(appId, appKey, appSecret, url, appAccount2));
            linbin.stateChangeEvent                  += HandleStatusChange;
            linbin.messageEvent                      += HandleMessage;
            linbin.messageTimeOutEvent               += HandleMessageTimeout;
            linbin.groupMessageEvent                 += HandleGroupMessage;
            linbin.groupMessageTimeoutEvent          += HandleGroupMessageTimeout;
            linbin.serverACKEvent                    += HandleServerACK;
            linbin.unlimitedGroupMessageEvent        += HandleUnlimitedGroupMessage;
            linbin.unlimitedGroupMessageTimeoutEvent += HandleUnlimitedGroupMessageTimeout;
            linbin.joinUnlimitedGroupEvent           += HandleJoinUnlimitedGroup;
            linbin.quitUnlimitedGroupEvent           += HandleQuitUnlimitedGroup;
            linbin.dismissUnlimitedGroupEvent        += HandleDismissUnlimitedGroup;
        }
예제 #2
0
        public MIMCDemo()
        {
            user5566 = new MIMCUser(appAccount1);
            user5566.RegisterMIMCTokenFetcher(new MIMCCaseTokenFetcher(appId, appKey, appSecret, url, appAccount1));
            user5566.stateChangeEvent                  += HandleStatusChange;
            user5566.messageEvent                      += HandleMessage;
            user5566.messageTimeOutEvent               += HandleMessageTimeout;
            user5566.groupMessageEvent                 += HandleGroupMessage;
            user5566.groupMessageTimeoutEvent          += HandleGroupMessageTimeout;
            user5566.serverACKEvent                    += HandleServerACK;
            user5566.unlimitedGroupMessageEvent        += HandleUnlimitedGroupMessage;
            user5566.unlimitedGroupMessageTimeoutEvent += HandleUnlimitedGroupMessageTimeout;
            user5566.joinUnlimitedGroupEvent           += HandleJoinUnlimitedGroup;
            user5566.quitUnlimitedGroupEvent           += HandleQuitUnlimitedGroup;
            user5566.dismissUnlimitedGroupEvent        += HandleDismissUnlimitedGroup;

            user9527 = new MIMCUser(appAccount2);
            user9527.RegisterMIMCTokenFetcher(new MIMCCaseTokenFetcher(appId, appKey, appSecret, url, appAccount2));
            user9527.stateChangeEvent                  += HandleStatusChange;
            user9527.messageEvent                      += HandleMessage;
            user9527.messageTimeOutEvent               += HandleMessageTimeout;
            user9527.groupMessageEvent                 += HandleGroupMessage;
            user9527.groupMessageTimeoutEvent          += HandleGroupMessageTimeout;
            user9527.serverACKEvent                    += HandleServerACK;
            user9527.unlimitedGroupMessageEvent        += HandleUnlimitedGroupMessage;
            user9527.unlimitedGroupMessageTimeoutEvent += HandleUnlimitedGroupMessageTimeout;
            user9527.joinUnlimitedGroupEvent           += HandleJoinUnlimitedGroup;
            user9527.quitUnlimitedGroupEvent           += HandleQuitUnlimitedGroup;
            user9527.dismissUnlimitedGroupEvent        += HandleDismissUnlimitedGroup;
        }