private void rating1_RatingChanged(object sender, EventArgs e) { if (currentID == "") { rating1.rating = 0; return; } // Update entry if (MyNesDB.IsDatabaseLoaded) { MyNesDB.UpdateEntry(currentID, rating1.rating); } if (RatingChanged != null) { RatingChanged(rating1, new EventArgs()); } }
private void ApplyRom(string gameName, string gameID, Game game) { if (_db_rename_rom_using_title) { MyNesDB.UpdateEntry(gameID, game.Title); Trace.WriteLine(string.Format("->Rom renamed from {0} to {1}", gameName, game.Title), "Detect And Download From TheGamesDB.net"); } // Overview if (_db_add_overview_as_tab) { AddOverviewConentToGame("Overview", _db_overview_folder, game.Overview, gameID); } #region Banners if (_db_add_banners_as_tab) { if (game.Images.Banners != null) { if (game.Images.Banners.Count > 0) { // Download the tabs for it ! List <string> links = new List <string>(); for (int i = 0; i < game.Images.Banners.Count; i++) { links.Add(GamesDB.BaseImgURL + game.Images.Banners[i].Path); if (_db_banners_ic_limitdownload) { break;// one link added so far. } } AddTabConentFilesToRom("Banners", _db_banners_folder, links, gameID, _db_banners_is_cover ? "COVERS" : "SNAPS"); } } } #endregion #region Screenshots if (_db_add_screenshots_as_tab) { if (game.Images.Screenshots != null) { if (game.Images.Screenshots.Count > 0) { // Download the tabs for it ! List <string> links = new List <string>(); for (int i = 0; i < game.Images.Screenshots.Count; i++) { links.Add(GamesDB.BaseImgURL + game.Images.Screenshots[i].Path); if (_db_screenshots_ic_limitdownload) { break;// one link added so far. } } // Download for it ! AddTabConentFilesToRom("Screenshots", _db_screenshots_folder, links, gameID, _db_screenshots_is_cover ? "COVERS" : "SNAPS"); } } } #endregion #region Fanart if (_db_add_fanart_as_tab) { if (game.Images.Fanart != null) { if (game.Images.Fanart.Count > 0) { // Download the tabs for it ! List <string> links = new List <string>(); for (int i = 0; i < game.Images.Fanart.Count; i++) { links.Add(GamesDB.BaseImgURL + game.Images.Fanart[i].Path); if (_db_fanart_ic_limitdownload) { break;// one link added so far. } } // Download the tabs for it ! AddTabConentFilesToRom("Fanart", _db_fanart_folder, links, gameID, _db_fanart_is_cover ? "COVERS" : "SNAPS"); } } } #endregion #region Boxart back if (_db_add_boxart_back_as_tab) { if (game.Images.BoxartBack != null) { // Download the tabs for it ! List <string> links = new List <string>(); links.Add(GamesDB.BaseImgURL + game.Images.BoxartBack.Path); // Download the tabs for it ! AddTabConentFilesToRom("Boxart Back", _db_boxart_back_folder, links, gameID, _db_boxart_back_is_cover ? "COVERS" : "SNAPS"); } } #endregion #region Boxart Front if (_db_add_boxart_front_as_tab) { if (game.Images.BoxartFront != null) { // Download the tabs for it ! List <string> links = new List <string>(); links.Add(GamesDB.BaseImgURL + game.Images.BoxartFront.Path); // Download the tabs for it ! AddTabConentFilesToRom("Boxart Front", _db_boxart_front_folder, links, gameID, _db_boxart_front_is_cover ? "COVERS" : "SNAPS"); } } #endregion }