private void AppendMessage(MessageVO message) { if (message.FromUser.Id == toUser.Id) { ConversationRTB.SelectionColor = toUserColor; } else { ConversationRTB.SelectionColor = currentUserColor; } ConversationRTB.SelectedText = message.FromUser + ": " + message.Body + "\n"; ConversationRTB.AppendText(ConversationRTB.SelectedText); }
void control_UserClicked(object sender, UserUserControl.UserEventArgs e) { toUser = e.User; TypingTB.Enabled = true; ButtonSend.Enabled = true; timer1.Enabled = true; label1.Enabled = true; label1.Text = e.User.Username; ConversationRTB.Clear(); List <MessageVO> all = messageManager.GetChat(e.User, ConfigurationManager.currUser); foreach (MessageVO m in all) { AppendMessage(m); } }