/* * METHOD : writeToGroupChatTab() * * DESCRIPTION : Display message field text string to group chat text box * and relayed it to queue. * * PARAMETERS : STRING : messageText * * RETURNS : N/A */ public void writeToGroupChatTab(string messageText) { GroupChatTab.Focus(); GroupChatTabTextBox.AppendText("You Say: " + messageText + "\n"); packetBuffer = userNameTextBox.Text + "," + guiPacketBuffer.MessageType + "," + Environment.MachineName + "," + messageText + "," + guiPacketBuffer.RequestToChat; WriteToQueue(packetBuffer); }
/* * METHOD : WriteToGroupChatBox() * * DESCRIPTION : Write incoming group chat message to the textbox in the * groupchatbox tab. * PARAMETERS : string : chatMessage * * RETURNS : N/A */ public void WriteToGroupChatBox(string chatMessage) { this.Dispatcher.Invoke(() => { GroupChatTabTextBox.AppendText(chatMessage); }); }