public static void LoadDefaultSettings() { try { DefaultSettings = JsonFileHelper.ReadAsObject <DOSBoxConfigSettings>(DefaultDOSBoxConfigJson); } catch (FileNotFoundException e) { throw e; } }
private static void LoadAppSettings() { var directory = Directory.GetCurrentDirectory() + @"\Settings.json"; try { _settings = JsonFileHelper.ReadAsObject <ApplicationSettings>(directory); } catch (FileNotFoundException) { JsonFileHelper.CreateFileFromObject(directory, new ApplicationSettings()); } }
private static void LoadGameSettings() { var directory = Directory.GetCurrentDirectory() + @"..\..\..\Games.json"; var gg = AppDomain.CurrentDomain.BaseDirectory; try { _settings = JsonFileHelper.ReadAsObject <GameSettings>(directory); } catch (FileNotFoundException) { JsonFileHelper.CreateFileFromObject(directory, new GameSettings()); } }
private DoomInfo GetDoomInfo() { var directory = Directory.GetCurrentDirectory() + @"\Content\DoomLevels.json"; return(JsonFileHelper.ReadAsObject <DoomInfo>(directory)); }