private void saveButton_Click(object sender, EventArgs e) { if (global == true) { Facade.Save(this); Facade.Load(this); } else { Facade.Save(this, MainForm.rom); Facade.Load(this, MainForm.rom); } Facade.ShowMessageBox(this, "Settings saved"); }
private void Launch() { if (mainDataGridView.CurrentCell is null) { MessageBox.Show("No game selected"); return; } string directory = System.Environment.CurrentDirectory + "\\Supermodel.exe"; string romName = GetRomName(); string rom = System.Environment.CurrentDirectory + "\\" + romName + ".zip"; //does rom exist in directory? bool exists = File.Exists(rom); if (!exists) { Facade.ShowMessageBox(this, "Rom not found"); } else { ProcessStartInfo startInfo = new ProcessStartInfo(); // Stop the process from opening a new window startInfo.RedirectStandardOutput = true; startInfo.UseShellExecute = false; startInfo.CreateNoWindow = true; string arguments = romName + ".zip"; if (fullScreenCheckBox.Checked == true) { arguments = arguments + " -fullscreen"; } startInfo.Arguments = arguments; startInfo.FileName = directory; using (Process proc = Process.Start(startInfo)) { Cursor.Current = Cursors.WaitCursor; proc.WaitForExit(); } } }
private void saveButton_Click(object sender, EventArgs e) { Facade.Save(this, "Global", controlSettings); Facade.ShowMessageBox(this, "Settings saved"); }