private void AddToGameDbBtn_Click(object sender, EventArgs e) { using var picker = new RomStatusPicker(); var result = picker.ShowDialog(); if (result.IsOk()) { var gameDbEntry = Emulator.AsGameDBEntryGenerator().GenerateGameDbEntry(); gameDbEntry.Status = picker.PickedStatus; Database.SaveDatabaseEntry(gameDbEntry); MainForm.UpdateDumpInfo(gameDbEntry.Status); HideShowGameDbButton(); } }
private void AddToGameDbBtn_Click(object sender, EventArgs e) { using var picker = new RomStatusPicker(); var result = picker.ShowDialog(); if (result.IsOk()) { var gameDbEntry = Emulator.AsGameDBEntryGenerator().GenerateGameDbEntry(); gameDbEntry.Status = picker.PickedStatus; Database.SaveDatabaseEntry(Path.Combine(PathUtils.ExeDirectoryPath, "gamedb", "gamedb_user.txt"), gameDbEntry); //TODO read-only in Nix builds MainForm.UpdateDumpInfo(gameDbEntry.Status); HideShowGameDbButton(); } }
private void AddToGameDbBtn_Click(object sender, EventArgs e) { using var picker = new RomStatusPicker(); var result = picker.ShowDialog(); if (result.IsOk()) { var gameDbEntry = Emulator.AsGameDBEntryGenerator().GenerateGameDbEntry(); var userDb = Path.Combine(PathManager.GetExeDirectoryAbsolute(), "gamedb", "gamedb_user.txt"); Global.Game.Status = gameDbEntry.Status = picker.PickedStatus; Database.SaveDatabaseEntry(userDb, gameDbEntry); MainForm.UpdateDumpIcon(); HideShowGameDbButton(); } }
private void AddToGameDbBtn_Click(object sender, EventArgs e) { var picker = new RomStatusPicker(); var result = picker.ShowDialog(); if (result == DialogResult.OK) { var entryObj = (CompactGameInfo)Global.Emulator.InvokeMethod("GenerateGameDbEntry", null); var userDb = Path.Combine(PathManager.GetExeDirectoryAbsolute(), "gamedb", "gamedb_user.txt"); Global.Game.Status = entryObj.Status = picker.PickedStatus; Database.SaveDatabaseEntry(userDb, entryObj); GlobalWin.MainForm.UpdateDumpIcon(); HideShowGameDbButton(); } }