Ejemplo n.º 1
0
        static public void SaveSettings()
        {
            var directory = Directory.GetCurrentDirectory() + @"..\..\..\Games.json";

            try
            {
                JsonFileHelper.CreateFileFromObject(directory, Settings);
            }
            catch
            {
            }
        }
Ejemplo n.º 2
0
        private static void LoadAppSettings()
        {
            var directory = Directory.GetCurrentDirectory() + @"\Settings.json";

            try
            {
                _settings = JsonFileHelper.ReadAsObject <ApplicationSettings>(directory);
            }
            catch (FileNotFoundException)
            {
                JsonFileHelper.CreateFileFromObject(directory, new ApplicationSettings());
            }
        }
Ejemplo n.º 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());
            }
        }