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); }
private void HandleStatusMessage(StatusMessageData messageData) { StatusMessageData statusData = (StatusMessageData)messageData; if(_onlineContacts.ContainsKey(statusData.UserName)) { UserListEntry contact = _onlineContacts[statusData.UserName]; contact.Status = statusData.Status; } }