internal static void Set_GamesPaths(string platformName) { IGame[] iPlatformGames = new IGame[7]; MvGame cosmic = new MvGame() { Id = "0", Title = "CosmicFantasy2", ApplicationPath = $@"..\..\Plateformes\Games\{platformName}\Cosmic Fantasy 2 (USA)\Cosmic_Fantasy_2_(NTSC-U)_[WTG990301].cue" }; iPlatformGames[0] = cosmic; MvAdditionnalApplication app1 = new MvAdditionnalApplication() { Id = "AddAppCosmic1", GameId = "1", ApplicationPath = @$ "..\..\Plateformes\Games\{platformName}\Cosmic Fantasy 2 (USA)\Cosmic_Fantasy_2_(FR)_[WTG990301].cue" }; cosmic.AddNewAdditionalApplication(app1); //--- MvGame exile2 = new MvGame() { Id = "1", Title = "Exile 2", ApplicationPath = @$ "..\..\Plateformes\Games\{platformName}\Exile 2\Exile_2_-_Wicked_Phenomenon_(NTSC-U)_[WTG990102].cue", ManualPath = @$ "..\..\Plateformes\Manuals\{platformName}\Exile.pdf",
/// <summary> /// Rempli chaque flowlayout d'un jeu avec les informations relatives aux paths /// </summary> /// <param name="sender"></param> private void DeroulBand(GameBandeauV sender) { if (_BandActif != null && _BandActif != sender) { _BandActif.Collapse_Fl(); } boxLog.Text += $"Bandactif: {sender.Name}" + Environment.NewLine; toolStripStatusLabel1.Text = $"Bandeau unrolled"; _BandActif = sender; if (sender.flp1.Controls.Count == 0) { MvGame game = (MvGame)sender.Objet; GeneratePaths(sender, game); boxLog.Text += $"Generate graphical elements for '{game.Title}'" + Environment.NewLine; } if (sender.Width > ContUnrolledWidth) { ContUnrolledWidth = sender.Width; } else { sender.Width = ContUnrolledWidth; } // sender.Resize_Me(); // flpGames.Width = sender.flp1.Width + 50; StyleMainFLP(ContUnrolledWidth); SetMainWindow(); }
/// <summary> /// Genère les bandeaux de paths /// </summary> /// <param name="folders"></param> /// <returns></returns> private async Task GeneratePaths(GameBandeauV gameBand, MvGame game) { Debug.WriteLine($"[GeneratePaths] Creation of the banner for {game.Title}"); boxLog.Text += $"Creation of the banner for { game.Title}" + Environment.NewLine; //int largeurBandeau = AnalyseVPrinciple(game.GetPaths); //largeurBandeau = 850; foreach (var pathO in game.GetPaths) { Debug.WriteLine($"[GeneratePaths] Path {pathO.Type}: {pathO.Original_RLink}"); if (string.IsNullOrEmpty(pathO.Original_RLink)) { continue; } DualBandV dbV = StylePaths(pathO.Type, PathsWidth); gameBand.flp1.Controls.Add(dbV); dbV.ucPaths21.RelatPath = pathO.Original_RLink; dbV.ucPaths21.FullPath = pathO.Original_HLink; dbV.ucPaths22.RelatPath = pathO.Destination_RLink; dbV.ucPaths22.FullPath = pathO.Destination_HLink; } gameBand.Resize_Me(); // games.Add(bdTmp); }
/// <summary> /// Envoie les paramètres aux originaux /// </summary> /// <remarks>n'utilise pas la partie graphique</remarks> private void DematrioChka(MvGame game) { Debug.WriteLine($"[GamePaths] [DematrioChka] {game.Title}"); Debug.Indent(); // Cherchez dans tous les IGames IGame originalGame = null; foreach (IGame igame in _IPGames) { if (igame.Id.Equals(game.Id)) { originalGame = igame; break; } } if (originalGame == null) { return; } // Passer tous les folders des mvGames dans IPGames foreach (var collecOPaths in game.EnumGetPaths) { switch (collecOPaths.Type) { case "ApplicationPath": originalGame.ApplicationPath = collecOPaths.Destination_RLink; break; case "ManualPath": originalGame.ManualPath = collecOPaths.Destination_RLink; break; case "MusicPath": originalGame.MusicPath = collecOPaths.Destination_RLink; break; case "VideoPath": originalGame.VideoPath = collecOPaths.Destination_RLink; break; } collecOPaths.Original_RLink = collecOPaths.Destination_RLink; collecOPaths.Original_HLink = collecOPaths.Destination_HLink; collecOPaths.Destination_HLink = collecOPaths.Destination_RLink = Lang.Waiting; } Debug.Unindent(); }
/// <summary> /// Récupère les jeux et met en forme /// </summary> private async void GetGames() { // Récupération des jeux avec tri _IPGames = _PlatformObject.GetAllGames(cbHidden.Checked, true)//(false, false) .OrderBy(x => x.Title).ToArray(); // Conversion to MvGame _AmVGames = MvGame.Convert(_IPGames, AppPath); //AnalyseProps(aMvGames); // Taille généralisée de la portion des chemins PathsWidth = AnalyseVPrinciple(_AmVGames); await GenerateTitles(_AmVGames); }
/// <summary> /// regarde si le dossier correspond /// </summary> /// <param name="mvGame"></param> /// <returns></returns> private bool CheckGame(MvGame mvGame) { bool valide = true; foreach (var pathO in mvGame.EnumGetPaths) { if (String.IsNullOrEmpty(pathO.Original_RLink)) { continue; } Debug.WriteLine($"[CheckGame] {pathO.Type}: {pathO.Original_RLink}"); switch (pathO.Type) { case "ApplicationPath": Debug.WriteLine($"[CheckGame] Dico[Application]: {dicSystemPaths["Application"]}"); valide &= pathO.Original_RLink.Contains(dicSystemPaths["Application"]); break; case "ManualPath": Debug.WriteLine($"[CheckGame] Dico[Manual]: {dicSystemPaths["Manual"]}"); valide &= pathO.Original_RLink.Contains(dicSystemPaths["Manual"]); break; case "MusicPath": Debug.WriteLine($"[CheckGame] Dico[Music]: {dicSystemPaths["Music"]}"); valide &= pathO.Original_RLink.Contains(dicSystemPaths["Music"]); break; case "VideoPath": Debug.WriteLine($"[CheckGame] Dico[Video]: {dicSystemPaths["Video"]}"); valide &= pathO.Original_RLink.Contains(dicSystemPaths["Video"]); break; } // valide &= pathO.Original_RLink.Contains(tboxROldPath.Text); } return(valide); }
/// <summary> /// Attibue les modifications de la simulation aux originaux /// </summary> /// <remarks>n'utilise pas la partie graphique</remarks> private void DematrioChka(MvGame game) { Debug.WriteLine($"[GamePaths] [DematrioChka] {game.Title}"); Debug.Indent(); // Cherchez dans tous les IGames IGame originalGame = null; foreach (IGame igame in _IPGames) { if (igame.Id.Equals(game.Id)) { originalGame = igame; break; } } if (originalGame == null) { return; } // Passer tous les dossiers cibles des mvGames dans IPGames foreach (PathsCollec collecOPaths in game.EnumGetPaths) { switch (collecOPaths.Type) { case EnumPathType.ApplicationPath: originalGame.ApplicationPath = collecOPaths.Destination_RLink; break; case EnumPathType.ManualPath: originalGame.ManualPath = collecOPaths.Destination_RLink; break; case EnumPathType.MusicPath: originalGame.MusicPath = collecOPaths.Destination_RLink; break; case EnumPathType.VideoPath: originalGame.VideoPath = collecOPaths.Destination_RLink; break; } // réinitialisation collecOPaths.Original_RLink = collecOPaths.Destination_RLink; collecOPaths.Original_HLink = collecOPaths.Destination_HLink; collecOPaths.Destination_HLink = collecOPaths.Destination_RLink = Lang.Waiting; } #region 2020 Prise en charge des mixed roms // Uniquement si la box est cochée if (cbAddAppPaths.Checked == true) { foreach (IAdditionalApplication oMixedRoms in originalGame.GetAllAdditionalApplications()) { // Récupération des informations des chemins pour la mixes rom AAppPath paths = game.AddiRomPaths.FirstOrDefault(x => x.ID == oMixedRoms.Id); //MessageBox.Show($"{paths.ID} {paths.Destination_HLink} - {paths.Destination_RLink}"); // oMixedRoms.ApplicationPath = paths.Destination_RLink; } } #endregion Debug.Unindent(); }
private void DebugInit() { Log = "Debug Mode Activé" + Environment.NewLine; _IPlatformGames = new IGame[7]; MvGame cosmic = new MvGame() { Title = "CosmicFantasy2", ApplicationPath = @"..\..\Plateformes\Games\NEC TurboGrafx-CD\Cosmic Fantasy 2 (USA)\Cosmic_Fantasy_2_(NTSC-U)_[WTG990301].cue" }; _IPlatformGames[0] = cosmic; MvAdditionnalApplication app1 = new MvAdditionnalApplication() { }; cosmic.AddNewAdditionalApplication(app1); //--- MvGame exile2 = new MvGame() { Title = "Exile 2", ApplicationPath = @"..\..\Plateformes\Games\NEC TurboGrafx-CD\Exile 2\Exile_2_-_Wicked_Phenomenon_(NTSC-U)_[WTG990102].cue", ManualPath = @"..\..\Plateformes\Manuals\NEC TurboGrafx-CD\Exile.pdf", MusicPath = @"..\..\Plateformes\Musics\NEC TurboGrafx-CD\Exile.mp3" }; _IPlatformGames[1] = exile2; //--- _IPlatformGames[2] = new MvGame() { Title = "Gate of Thunder", ApplicationPath = @"..\..\Plateformes\Games\NEC TurboGrafx-CD\Gate Of Thunder\Gate of Thunder (J).cue", ManualPath = @"..\..\Plateformes\Manuals\NEC TurboGrafx-CD\Gate_of_Thunder_-_Manual_-_T16.pdf", MusicPath = @"..\..\Plateformes\Musics\NEC TurboGrafx-CD\Gate of Thunder - Intro Music.mp3" }; //--- _IPlatformGames[3] = new MvGame() { Title = "Lords of Thunder", }; // --- _IPlatformGames[4] = new MvGame() { Title = "Toe Jam and Earl", }; // --- _IPlatformGames[5] = new MvGame() { Title = "Flashback", }; // --- _IPlatformGames[6] = new MvGame() { Title = "Sonic", }; }