static void stateManager_ClientInitialized(object sender, CometClientEventArgs args) { // ok, write a message saying we have timed out Debug.WriteLine("Client Initialized: " + args.CometClient.DisplayName); // send a chat message ChatMessage cm = new ChatMessage(); cm.From = "系统消息"; cm.Message = args.CometClient.DisplayName + " 进入了聊天室"; stateManager.SendMessage("SysMessage", cm); GetMemberList(); GetMemberNum(); }
static void stateManager_ClientSubscribed(object sender, CometClientEventArgs args) { // ok, write a message saying we have timed out Debug.WriteLine("Client Subscribed: " + args.CometClient.DisplayName); }