public void AppendMessage(ChatMessage c) { ChatField.Invoke(new MethodInvoker(delegate() { ChatField.AppendText(String.Format("{0} - {1}: {2}{3}", c.Timestamp.ToShortTimeString(), c.User.Name, c.Text, Environment.NewLine)); })); }
private void sendChannelMessage(String channel, string text) { ChatMessage message = new ChatMessage(currentUser, text); message.Channel = channel; lobby.Send(message); messageTextBox.Text = ""; messageTextBox.Focus(); }
private void sendBroadcastMessage(String text) { ChatMessage message = new ChatMessage(currentUser, text); lobby.Send(message); messageTextBox.Text = ""; messageTextBox.Focus(); }
private void processChatMessage(ChatMessage msg) { if (msg.Channel == null) { updateChannelUsers(tabPageAll.Channel, msg.User); tabPageAll.ChatField.Invoke((MethodInvoker)delegate() { tabPageAll.AppendMessage(msg); }); } else { ChatTabPage t = joinChannel(msg.Channel); updateChannelUsers(msg.Channel, msg.User); t.AppendMessage(msg); } }