public FrontSysViewModel(IDatabaseService databaseService, IFileJSONService fileJSONService, IThemeService themeService, IEnumService enumService, INavigationService navigationService) { IsDialogDisplayOpen = false; _databaseService = databaseService; _fileJSONService = fileJSONService; _themeService = themeService; _enumService = enumService; _navigationService = navigationService; SysDisplay = _fileJSONService.appSettings.CurrentSysDisplay; SelectedIndex = 0; ReloadData(); this.SysDisplayList = _enumService.GetSysDisplays(); if (File.Exists(_fileJSONService.appSettings.DefaultBCK)) { BCKImg = _fileJSONService.appSettings.DefaultBCK; } }
public SettingsViewModel() { _enumService = App.ServiceProvider.GetRequiredService <IEnumService>(); _FileJson = App.ServiceProvider.GetRequiredService <IFileJSONService>(); themeService = App.ServiceProvider.GetRequiredService <IThemeService>(); Getthemes(); settings = _FileJson.appSettings; ScreenScraperID = settings?.ScreenScraperID; ScreenScraperPWD = settings?.ScreenScraperPWD; AppSettingsLocation = settings.AppSettingsLocation; AppSettingsFolder = settings.AppSettingsFolder; //RetroarchCMD = settings.RetroarchCMD; //RetroarchPath = settings?.RetroarchPath; SGDBKey = settings?.SGDBKey; SysDisplay = settings.CurrentSysDisplay; RomDisplay = settings.CurrentGameDisplay; ShowAll = settings.ShowAll; ShowFav = settings.ShowFav; ShowLastPlay = settings.ShowLastPlayed; ShowMostPlay = settings.ShowMostPlayed; this.SysDisplayList = _enumService.GetSysDisplays(); this.RomDisplayList = _enumService.GetRomDisplays(); }