/* * METHOD : writeToPrivateChatTab() * * DESCRIPTION : Display message field text string to private chat text box * and relayed it to queue. * PARAMETERS : STRING : messageText * * RETURNS : N/A */ public void writeToPrivateChatTab(string messageText) { PrivateChatTab.Focus(); PrivateChatTabTextBox.AppendText("You Say: " + messageText + "\n"); //Allows text to be displayed multiline packetBuffer = userNameTextBox.Text + "," + guiPacketBuffer.MessageType + "," + Environment.MachineName + "," + messageText + "," + guiPacketBuffer.Alias; WriteToQueue(packetBuffer); //write to queue }
/* * METHOD : WriteToPrivateChatBox() * * DESCRIPTION : Append the incoming user chat to the * Private chat box. * PARAMETERS : string : chatMessage * * RETURNS : N/A */ public void WriteToPrivateChatBox(string chatMessage) { this.Dispatcher.Invoke(() => { PrivateChatTabTextBox.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; }