private void Message_Received_Event(ChatMessage message) { if(this.rtbChat.InvokeRequired) { this.rtbChat.Invoke(new ts_Message_Recieved_Event(this.Message_Received_Event), message); } else { this.rtbChat.AppendText(message.getName() + ": " + message.getMessage() + Environment.NewLine); } }
private void Message_Sent_Event(ChatMessage message) { this.rtbChat.AppendText(message.getName() + ": " + message.getMessage() + Environment.NewLine); tbMessage.Text = placeholder; }
private void printMessage(ChatMessage message) { Console.WriteLine(message.getName() + " " + message.getMessage()); }