private void btn_copyLaunchOptions_Click(object sender, EventArgs e) { PrepareLaunch = new LaunchCore(chb_noLogs.Checked, chb_noPause.Checked, chb_noSplash.Checked, chb_noCB.Checked, chb_enableHT.Checked, chb_skipIntro.Checked, chb_window.Checked, chb_showScriptErrors.Checked, chb_noBenchmark.Checked, chb_world.Checked, txtb_world.Text, chb_maxMem.Checked, txtb_maxMem.Text, chb_malloc.Checked, txtb_malloc.Text, chb_maxVRAM.Checked, txtb_maxVRAM.Text, chb_exThreads.Checked, txtb_exThreads.Text, chb_cpuCount.Checked, txtb_cpuCount.Text); string Arguments = PrepareLaunch.GetArguments(); if (Arguments != "" && Arguments != null) { Clipboard.SetText(Arguments); MessageBox.Show("This is on your clipboard:\n" + Arguments, "Launch options copied", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { MessageBox.Show("Select any option before trying to copy", "Launch options copy failed", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void launchProcess() { if ((Directory.Exists(TSFolder) && (File.Exists(TSFolder + "ts3client_win64.exe") || File.Exists(TSFolder + "ts3client_win32.exe")) || GlobalVar.isServer)) { if (Directory.Exists(GameFolder) && ((File.Exists(GameFolder + GlobalVar.gameArtifact) && !GlobalVar.isServer) || (File.Exists(GameFolder + "arma3server.exe") && GlobalVar.isServer))) { if (Directory.Exists(AddonsFolder)) { updateCurrentPack(false); btn_Launch.Enabled = false; PrepareLaunch = new LaunchCore(chb_noLogs.Checked, chb_noPause.Checked, chb_noSplash.Checked, chb_noCB.Checked, chb_enableHT.Checked, chb_skipIntro.Checked, chb_window.Checked, chb_showScriptErrors.Checked, chb_noBenchmark.Checked, chb_world.Checked, txtb_world.Text, chb_maxMem.Checked, txtb_maxMem.Text, chb_malloc.Checked, txtb_malloc.Text, chb_maxVRAM.Checked, txtb_maxVRAM.Text, chb_exThreads.Checked, txtb_exThreads.Text, chb_cpuCount.Checked, txtb_cpuCount.Text, chb_dragonfyre.Checked, dragonfyreName, dragonfyrerhsName, chb_blastcore.Checked, blastcoreName, lstb_activeAddons, modsName); Arguments = PrepareLaunch.GetArguments(); SaveSettings(); if (activePack == "arma3" || PrepareLaunch.isModPackInstalled(modsName, modsUrl)) runGame(); else { if (!GlobalVar.isDownloading && !GlobalVar.isInstalling) downloader.beginDownload(modsUrl, true, activePack, cfgUrl.Split('!')[1]); else MessageBox.Show("There's a download already in progress. Please wait for it to finish.", "Download already in progress", MessageBoxButtons.OK, MessageBoxIcon.Error); } } else { MessageBox.Show("Addons directory doesn't exist. Please check your Addons directory and try again.", "Missing directory", MessageBoxButtons.OK, MessageBoxIcon.Error); this.browseAddonsFolder(); } } else { MessageBox.Show("Game directory doesn't exist or executable not there. Please check your Arma 3 directory and try again.", "Missing directory or file", MessageBoxButtons.OK, MessageBoxIcon.Error); this.browseGameFolder(); } } else { MessageBox.Show("TeamSpeak directory doesn't exist or executable not there. Please check your TeamSpeak directory and try again.", "Missing directory or file", MessageBoxButtons.OK, MessageBoxIcon.Error); this.browseTSFolder(); } }