Exemplo n.º 1
0
        void Process_Exited(object sender, System.EventArgs e)
        {
            if (Process.ExitCode != 0)
            {
                ErrorData.Insert(0, string.Format("Exit code: {0}\n", Process.ExitCode));
            }

            ExitedDelegate ExitedHandler = Exited;

            if (ExitedHandler != null)
            {
                EditorMainThread.Run(() => {
                    ExitedHandler(Process.ExitCode, OutputData.ToString().Trim(), ErrorData.ToString().Trim());
                });
            }

            if (nextProcess != null)
            {
                if (Process.ExitCode == 0 || !nextStopOnError)
                {
                    nextProcess.Start();
                }
            }
        }