public GetPictureForSystemViewModel(Systeme title, string themename, ScraperType scraperType)
        {
            Title         = $"Rechercher de {scraperType.ToString()} pour {title.Name}";
            ScraperType   = scraperType;
            dialogService = App.ServiceProvider.GetRequiredService <IDialogService>();
            themeService  = App.ServiceProvider.GetRequiredService <IThemeService>();
            var img = themeService.GetBckForTheme(title.Shortname, themename);

            if (img != null)
            {
                ImgPath = img;
            }
        }
Exemple #2
0
 private void ReloadData()
 {
     Systemes = new ObservableCollection <SystemeViewModel>();
     foreach (var sys in _databaseService.GetSystemes().OrderBy(x => x.Name))
     {
         var sysvm = new SystemeViewModel(sys);
         sysvm.Bck = _themeService.GetBckForTheme(sys.Shortname, _fileJSONService.GetCurrentTheme());
         var logopath = _themeService.GetLogoForTheme(sys.Shortname);
         if (File.Exists(logopath))
         {
             sysvm.Logo    = logopath;
             sysvm.HasLogo = true;
         }
         sysvm.NBEmu  = $"{_databaseService.GetNbEmulatorForSysteme(sys.SystemeID)} Emulateurs";
         sysvm.NBGame = $"{_databaseService.GetNbGamesForPlateforme(sys.SystemeID)} Jeux";
         Systemes.Add(sysvm);
     }
     Systemes = new ObservableCollection <SystemeViewModel>(Systemes.OrderBy(x => x.Name));
     AddLastPlayed();
     AddMostPlayed();
     AddFavoriteGame();
     AddAllGames();
     //Systemes = new ObservableCollection<SystemeViewModel>(Systemes.OrderBy(x => x.Systeme.Type).ThenBy(x => x.Name));
 }
 public string ChargeBck(string foldername)
 {
     return(_themeService.GetBckForTheme(ShortName, foldername));
 }