// Send message to user. private void SandMessage() { if (string.IsNullOrWhiteSpace(Message)) { return; } MessageBlock += ChatMessageFormatter.Format(Message, ClientUserManager.CurrentUser); _chatManager.InvokeSendMessage(Message); Message = ""; }
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 }
// Recive message from user. private void ReciveMessage(string message, string senderName) { MessageBlock += ChatMessageFormatter.Format(message, senderName); }
private void ChatServiceProxy_OnMessageSentEvent(object sender, OnMessageSentEventArgs e) { MessagesLog += ChatMessageFormatter.Format(e.Message, e.UserName); }