【发布时间】:2015-08-15 15:41:54
【问题描述】:
每当服务器接收到新的char 时,我都会尝试写入新控制台进程的标准输入。这是我的代码:
var process = Process.Start(
new ProcessStartInfo("cmd.exe")
{
RedirectStandardError = true,
RedirectStandardInput = true,
RedirectStandardOutput = true,
UseShellExecute = false
});
Server.CharReceived += (sender, e) => { process.StandardInput.Write(e.Char); }
我希望它写入控制台窗口的内部文本,但它却写入标题:
如何让它写入窗口的内部文本?
【问题讨论】: