在线等。。。急急急!!!
读取*.exe的输出显示到文本:
{
...
p.StartInfo.FileName = "cmd.exe";
p.StartInfo.Arguments = "/c " + "\".....*.exe\"";
p.StartInfo.UseShellExecute = false;
p.StartInfo.RedirectStandardInput = true;
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.RedirectStandardError = true;
p.StartInfo.CreateNoWindow = true;
p.Start();
reader = p.StandardOutput;
line = reader.ReadLine();
//1秒钟执行一次
time1 = new System.Timers.Timer();
time1.Enabled = true;
time1.Interval = 1000D;
time1.Elapsed+=new System.Timers.ElapsedEventHandler(time1_Elapsed);
...
}
...
private void time1_Elapsed(object sender, ElapsedEventArgs e)
{
while ((line != " Running:\n")&& (!reader.EndOfStream))
{
printInfo.AppendText(line);
line = reader.ReadLine();
}
if (line == " Running:\n")
{
printInfo.AppendText(line);
line = reader.ReadLine();
.........
}
if (reader.EndOfStream)///////结果没有显示完就执行了这句,求解????????
{
printInfo.AppendText(line);
time1.Enabled = false;
}
}
{
...
p.StartInfo.FileName = "cmd.exe";
p.StartInfo.Arguments = "/c " + "\".....*.exe\"";
p.StartInfo.UseShellExecute = false;
p.StartInfo.RedirectStandardInput = true;
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.RedirectStandardError = true;
p.StartInfo.CreateNoWindow = true;
p.Start();
reader = p.StandardOutput;
line = reader.ReadLine();
//1秒钟执行一次
time1 = new System.Timers.Timer();
time1.Enabled = true;
time1.Interval = 1000D;
time1.Elapsed+=new System.Timers.ElapsedEventHandler(time1_Elapsed);
...
}
...
private void time1_Elapsed(object sender, ElapsedEventArgs e)
{
while ((line != " Running:\n")&& (!reader.EndOfStream))
{
printInfo.AppendText(line);
line = reader.ReadLine();
}
if (line == " Running:\n")
{
printInfo.AppendText(line);
line = reader.ReadLine();
.........
}
if (reader.EndOfStream)///////结果没有显示完就执行了这句,求解????????
{
printInfo.AppendText(line);
time1.Enabled = false;
}
}
...全文
相关推荐
c + + 计 时 器 急 急 急急 急 急急 急 急急 急 急急 急 急急 急 急急 急 急急 急 急急 急 急急 急 急
c + + 计 时 器 急 急 急急 急 急急 急 急急 急 急急 急 急急 急 急急 急 急急 急 急急 急 急急 急 急
图片试用急急急急急急急急急
图片试用急急急急急急急急急
急急急平面波matlab仿真中如何用颜色表示声压级的大小-Doc1.doc
急急急平面波matlab仿真中如何用颜色表示声压级的大小-Doc1.doc 原程序是: f=125; c0=344; k=2*f*pi./c0; r=0:0.001:0.5; p=exp; P=abs; plot; xlabel'); ylabel'); 不知程序对不对 请问怎么在平面波matlab仿真中如何用颜色表示声压级的大小,能不能帮忙把程序完整的表示出来
请教高手关于EXCEL行列转换的问题!谢谢!急急急!!!
一般的方法行不通,可能要用到宏或者编一个程序,请帮忙!
演讲急急急急急急急急急急
演讲急急急急急急急急急急


