private void btnLunchKSP_Click(object sender, EventArgs e) { string fullpath = KSPPathHelper.GetPath(KSPPaths.KSPExe); string fullpath64 = KSPPathHelper.GetPath(KSPPaths.KSPX64Exe); try { if (File.Exists(fullpath64) && cbUse64Bit.Checked) { fullpath = fullpath64; } if (File.Exists(fullpath)) { WriteKSPSettings(); EventDistributor.InvokeStartingKSP(this); Messenger.AddInfo(Messages.MSG_STARTING_KSP); System.Diagnostics.Process kspexe = new System.Diagnostics.Process(); #if __MonoCS__ kspexe.StartInfo.UseShellExecute = false; kspexe.StartInfo.EnvironmentVariables.Add("LC_ALL", "C"); #endif kspexe.StartInfo.FileName = fullpath; kspexe.StartInfo.WorkingDirectory = Path.GetDirectoryName(fullpath); if (rbWindowed.Checked && cbBorderlessWin.Checked) { kspexe.StartInfo.Arguments = PARAM_POPUPWINDOW; } if (cbForceOpenGL.Checked) { kspexe.StartInfo.Arguments += " " + PARAM_FORCE_OPENGL; } kspexe.Start(); } else { Messenger.AddError(Messages.MSG_CANT_FIND_KSP_EXE); } } catch (Exception ex) { Messenger.AddError(Messages.MSG_KSP_LAUNCH_FAILED, ex); } }