示例#1
0
 void mainView_ChangeStatusEvent(string status)
 {
     AMessageData messageData = new StatusMessageData(this.currentUserName, status);
     Common.Protocol.Message changeStatusMessage = new Common.Protocol.Message(new MessageHeader(Common.ServiceTypes.STATUS), messageData);
     this.outputMessageQueue.Enqueue(changeStatusMessage);
 }
示例#2
0
 private void HandleStatusMessage(StatusMessageData messageData)
 {
     StatusMessageData statusData = (StatusMessageData)messageData;
     if(_onlineContacts.ContainsKey(statusData.UserName))
     {
         UserListEntry contact = _onlineContacts[statusData.UserName];
         contact.Status = statusData.Status;
     }
 }