Exemple #1
0
 private void ArchiveMessage(Common.Protocol.Message message)
 {
     TextMessageData messageData = new TextMessageData(message.Data);
     archiveManager.SaveMessage(messageData.Receiver, messageData.Text);
 }
 void conversationView_SendMessageEvent(string messageText)
 {
     AMessageData messageData = new TextMessageData(this.currentClientName, this.receiverName, messageText);
     Message toSend = new Message(new MessageHeader(Common.ServiceTypes.TEXT), messageData);
     OnSendServerMessage(toSend);
 }
Exemple #3
0
 private void RedirectTextMessageToConversationController(TextMessageData message)
 {
     string senderName = message.Sender;
     if (!_conversationControllers.ContainsKey(senderName))
     {
         OnOpenConversationEvent(senderName);
     }
     IConversationController conversationController = _conversationControllers[senderName];
     if (conversationController != null)
     {
         conversationController.ReceiveTextMessage(message);
     }
 }
 public void ReceiveTextMessage(TextMessageData messageData)
 {
     conversationView.AddMessage(messageData.Text);
 }