MainForm.LaunchButton_Click C# (CSharp) Method

LaunchButton_Click() public method

public LaunchButton_Click ( object sender, EventArgs e ) : void
sender object
e EventArgs
return void
	void LaunchButton_Click (object sender, EventArgs e)
	{
		string consoleApp = Path.Combine (AppDomain.CurrentDomain.BaseDirectory,
			"console.exe");

		Process p = new Process ();
		p.StartInfo.CreateNoWindow = true;
		p.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
		if (_runtimeEngine != null) {
			p.StartInfo.FileName = _runtimeEngine;
			p.StartInfo.Arguments = "\"" + consoleApp + "\"";
		} else {
			p.StartInfo.FileName = consoleApp;
		}
		p.StartInfo.UseShellExecute = false;
		p.StartInfo.RedirectStandardInput = true;
		p.StartInfo.RedirectStandardOutput = true;
		p.StartInfo.RedirectStandardError = true;
		p.Start ();

		MessageBox.Show ("Launched");

		p.Kill ();
	}
MainForm