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) { }
Additional binding events need to be added in the upper part, as shown below.
The above code and the following code are added to \Crystal\Server. MirForms\SMain. cs
public SMain()
{
InitializeComponent();
AutoResize();
//Double click the event to clear the content
LogTextBox.DoubleClick += LogTextBox_DoubleClick;
DebugLogTextBox.DoubleClick += DebugLogTextBox_DoubleClick;
ChatLogTextBox.DoubleClick += ChatLogTextBox_DoubleClick;
}
If you're wanting to contribute changes to the source please create pull requests. Pasted code in issues will not be added.
I understand, but access to GIT is restricted in our country and region, and submissions always fail
But you can access this website, and you have repos on your account so you should be able to fork this repo and make edits to create a pull request. Even if access is blocked through other means.