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));
     }));
 }
Exemple #2
0
 private void sendChannelMessage(String channel, string text)
 {
     ChatMessage message = new ChatMessage(currentUser, text);
     message.Channel = channel;
     lobby.Send(message);
     messageTextBox.Text = "";
     messageTextBox.Focus();
 }
Exemple #3
0
 private void sendBroadcastMessage(String text)
 {
     ChatMessage message = new ChatMessage(currentUser, text);
     lobby.Send(message);
     messageTextBox.Text = "";
     messageTextBox.Focus();
 }
Exemple #4
0
 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);
     }
 }