콘솔 출력이 '파도'로 반환되면 문제가 있습니다. 예를 들어, 콘솔은 매 초마다 무언가를 출력합니다. 예를 들어, 매분 60 번 (동시에 모든 이벤트)의 이벤트 트리거가 있습니다.다른 프로세스 콘솔 출력 읽기
내 코드 :
Process Proc = new Process();
Proc.StartInfo.FileName = SSMS.BinaryDir + "HldsUpdateTool.exe";
Proc.StartInfo.Arguments = "-command update -game tf -dir " + SSMS.RootDir + Key;
Proc.StartInfo.UseShellExecute = false;
Proc.StartInfo.RedirectStandardOutput = true;
Proc.StartInfo.RedirectStandardError = true;
Proc.EnableRaisingEvents = true;
Proc.StartInfo.CreateNoWindow = false;
Proc.ErrorDataReceived += new DataReceivedEventHandler(Proc_ErrorDataReceived);
Proc.OutputDataReceived += new DataReceivedEventHandler(Proc_OutputDataReceived);
Proc.Exited += new EventHandler(Proc_Exited);
Proc.Start();
Proc.BeginErrorReadLine();
Proc.BeginOutputReadLine();
내가 업데이트 도구에 문제가 있다고 의심 할 수도 있습니다. 콘솔 출력이있는 다른 프로그램도 정상적으로 작동합니다.
타임 라인에서이벤트가 트리거됩니다 : (= 아무 일도; | 이벤트 해고)
Should be: ==|==|==|==|==|==|==
Is: ========|||||||=========||||||=====
출력을 플러시해야한다고 생각합니다. 어쨌든 어떻게 될지 모르겠다. – BlackBear