# CmdBox_Dotnet **Repository Path**: lee8871/cmd-box_-dotnet ## Basic Information - **Project Name**: CmdBox_Dotnet - **Description**: 一个简陋的命令输入窗体,用于Dotnet8 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-07-07 - **Last Updated**: 2025-07-07 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README CmdBox project is a text box control used to handle command input, inherited from `TextBox`, suitable for C# language and .NET development environment. It provides several enhanced features, such as command history and sending functionality. ## Features - Supports handling keyboard input through the `OnKeyDown` method, allowing users to use historical commands. - Provides a `send` method to send the currently entered command. - Supports clearing the command input box using the `Clear` method. - Includes a `cmd_queue` queue to store command history. - Features an `inputCmd` delegate for command validation. - Supports setting the `Is_Cmd_Send_clean` property to control whether to clear the input box after sending a command. ## Use Cases This control can be used in graphical user interfaces that require command-line interaction, such as debugging tools, terminal emulators, etc. ## Installation and Configuration You need to add `CmdBox.cs` to your C# project and ensure that the `CmdBox.projitems` and `CmdBox.shproj` files are referenced. ## Example ```csharp CmdBox cmdBox = new CmdBox(); cmdBox.inputCmd = (cmd) => { Console.WriteLine("Command entered: " + cmd); return true; // Return true indicates the command is valid }; cmdBox.Is_Cmd_Send_clean = true; // Clear input box after sending command ``` ## Contributions Code contributions and suggestions to enhance this control are welcome. Please follow the project's coding standards and test your changes before submission.