1
private void MoveCmdToLast(TextBox txtCmdInput, String selCmd)//把所选中的命令移动到最下一行然后显示在文本框中
2
2
函数调用如下:
private void txtCmdInput_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Enter)
{
e.SuppressKeyPress = true; / /回车事件已经处理完不再响应了
string str = GetCmd(txtCmdInput);
MoveCmdToLast(txtCmdInput, str);
}
}