Crystal icon indicating copy to clipboard operation
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.

Open zhaokai1982 opened this issue 6 months ago • 4 comments

  1. The interface of the client login program is misaligned, and the interface has been fixed.

  2. 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.

  3. 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)
     {
    
     }
    

zhaokai1982 avatar Jun 07 '25 11:06 zhaokai1982