Exemplo n.º 1
0
 // Send message to user.
 private void SandMessage()
 {
     if (string.IsNullOrWhiteSpace(Message))
     {
         return;
     }
     MessageBlock += ChatMessageFormatter.Format(Message, ClientUserManager.CurrentUser);
     _chatManager.InvokeSendMessage(Message);
     Message = "";
 }
Exemplo n.º 2
0
        private void SendMessage()
        {
            SendMessageResponse response = ChatServiceProxy.SendMessage(new SendMessageRequest {
                Message = messageContent, UserName = ChosenContact.UserName
            });

            if (response.IsSuccess == true)
            {
                MessagesLog += ChatMessageFormatter.Format(messageContent, AuthenticatedUser.Instance.UserName);
            }
            else
            {
                MessagesLog += ChatMessageFormatter.Format(response.Message, AuthenticatedUser.Instance.UserName);
            }
            MessageContent = string.Empty; //clear the message send box
        }
Exemplo n.º 3
0
 // Recive message from user.
 private void ReciveMessage(string message, string senderName)
 {
     MessageBlock += ChatMessageFormatter.Format(message, senderName);
 }
Exemplo n.º 4
0
 private void ChatServiceProxy_OnMessageSentEvent(object sender, OnMessageSentEventArgs e)
 {
     MessagesLog += ChatMessageFormatter.Format(e.Message, e.UserName);
 }