public void RunCommand(string exec, string args) { btnClosed.Text = "取消运行"; runLogs.Text = ""; // 清理控制台 shellRun.RunShell(exec, args, new DataReceivedEventHandler(OutputEventHandler), new EventHandler(ExitEventHander)); this.ShowDialog(); // 启动窗口 }