private void button1_Click(object sender, EventArgs e) { if (!File.Exists("FlyingBird.exe")) { MessageBox.Show("FlyingBird.exe konnte nicht gefunden werden.", "FlyingBird Launcher", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } LaunchParameters parameters = LaunchParameters.CreateParameters(new[] { new LaunchParameter("Resolution", comboBox2.Text), new LaunchParameter("Device", comboBox1.Text) }); var process = new Process(); process.StartInfo.Arguments = parameters.ToString(); process.StartInfo.FileName = "FlyingBird.exe"; process.StartInfo.UseShellExecute = true; process.Start(); Application.Exit(); }
/// <summary> /// Restarts the Game with the specified LaunchParameters. /// </summary> /// <param name="launchParameters">The LaunchParameters.</param> public void Restart(LaunchParameters launchParameters) { SGL.Restart(launchParameters.ToString()); }