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());
            }
        }
Exemple #3
0
        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());
            }
        }
Exemple #4
0
        private DoomInfo GetDoomInfo()
        {
            var directory = Directory.GetCurrentDirectory() + @"\Content\DoomLevels.json";

            return(JsonFileHelper.ReadAsObject <DoomInfo>(directory));
        }