Crystal
Crystal copied to clipboard
The content of the server message window cannot be cleared. Adding a double-click message window to clear console messages does not clear the content saved to the file.
-
The interface of the client login program is misaligned, and the interface has been fixed.
-
The content of the server message window cannot be cleared. Adding a double-click message window to clear console messages does not clear the content saved to the file. Text logs are always retained.
-
It is also necessary to add confirmation when the server program is closed, otherwise it is easy to mistakenly close the server and close the conversation without confirmation.
// Double click on the log window to clear the content (with confirmation) private void LogTextBox_DoubleClick(object sender, EventArgs e) { if (MessageBox.Show("Are you sure you want to clear the log content?", "Confirm to clear", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { LogTextBox.Clear(); } } //Double click in the debugging window to clear the content (with confirmation) private void DebugLogTextBox_DoubleClick(object sender, EventArgs e) { if (MessageBox.Show("Are you sure you want to clear the debugging content?", "Confirm to clear", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { DebugLogTextBox.Clear(); } } //Double click in chat window to clear content (with confirmation) private void ChatLogTextBox_DoubleClick(object sender, EventArgs e) { if (MessageBox.Show("Are you sure you want to clear the chat content?", "Confirm to clear", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { ChatLogTextBox.Clear(); } } private void MainMenu_ItemClicked(object sender, ToolStripItemClickedEventArgs e) { }