/* * METHOD : writeToBroadcastChatTab() * * DESCRIPTION : Display message field text string to broadcast chat text box * and relayed it to queue. * * PARAMETERS : STRING : messageText * * RETURNS : N/A */ public void writeToBroadcastChatTab(string messageText) { BroadcastChatTab.Focus(); BroadcastTabTextBox.AppendText("You Say: " + messageText + "\n"); packetBuffer = userNameTextBox.Text + "," + guiPacketBuffer.MessageType + "," + Environment.MachineName + "," + messageText + "," + guiPacketBuffer.RequestToChat; WriteToQueue(packetBuffer); }
/* * METHOD : WriteToBroadChatBox() * * DESCRIPTION : Write incoming group chat message to the textbox in the * broadchatbox tab. * * PARAMETERS : string : chatMessage * * RETURNS : N/A */ public void WriteToBroadChatBox(string chatMessage) { this.Dispatcher.Invoke(() => { BroadcastTabTextBox.AppendText(chatMessage); }); }
/* * METHOD : connectionServerTabFormattingEvents() * * DESCRIPTION : A series of formating events for the chat tabs are triggerd * which update GUI for user status of connection. * * PARAMETERS : * * RETURNS : N/A */ public void connectionServerTabFormattingEvents() { ///Clear all chat text in message terminal PrivateChatTabTextBox.Clear(); GroupChatTabTextBox.Clear(); BroadcastTabTextBox.Clear(); tabConnectionStatusOnline(); ///Tab Formatting Colour fonts Events PrivateChatTab.Foreground = Brushes.Black; GroupChatTab.Foreground = Brushes.Black; BroadcastChatTab.Foreground = Brushes.Black; }