/** * Initializes the process runner */ public void InitializeProcessRunner() { this.processRunner = new ProcessRunner(); this.processRunner.Output += new LineOutputHandler(ProcessOutput); this.processRunner.Error += new LineOutputHandler(ProcessError); this.processRunner.ProcessEnded += new ProcessEndedHandler(ProcessEnded); }
/// <summary> /// Stop background processes /// </summary> public void Stop() { if (ascRunner != null && ascRunner.IsRunning) ascRunner.KillProcess(); ascRunner = null; }
/// <summary> /// Start background process /// </summary> private void StartAscRunner(string ascPath, string fileName) { string cmd = "-jar \"" + ascPath + "\" -p \"" + fileName + "\""; TraceManager.Add("Running: java " + cmd, -1); // run asc shell ascRunner = new ProcessRunner(); ascRunner.Run("java", cmd, true); ascRunner.Output += new LineOutputHandler(ascRunner_Output); ascRunner.Error += new LineOutputHandler(ascRunner_Error); errorState = 0; }
private void Explore() { string toolsPath = Path.Combine(Application.StartupPath, "tools"); string swfOpDir = Path.Combine(toolsPath, "swfop"); string swfOpPath = Path.Combine(swfOpDir, "swfop.exe"); exports = new ArrayList(); runner = new ProcessRunner(); runner.Output += new LineOutputHandler(runner_Output); runner.ProcessEnded += new ProcessEndedHandler(runner_ProcessEnded); runner.Run(swfOpPath,"\"" + BackingPath + "\""); explored = true; }