Esempio n. 1
0
        public static PlayniteSettings LoadSettings()
        {
            if (File.Exists(PlaynitePaths.ConfigFilePath))
            {
                var settings = JsonConvert.DeserializeObject <PlayniteSettings>(File.ReadAllText(PlaynitePaths.ConfigFilePath));
                instance = settings;
            }

            return(Instance);
        }
Esempio n. 2
0
        public void BeginEdit()
        {
            if (isEditing)
            {
                return;
            }

            isEditing    = true;
            EditedFields = new List <string>();
            editingCopy  = this.CloneJson();
        }
Esempio n. 3
0
        public static PlayniteSettings LoadSettings()
        {
            try
            {
                if (File.Exists(PlaynitePaths.ConfigFilePath))
                {
                    var settings = JsonConvert.DeserializeObject <PlayniteSettings>(File.ReadAllText(PlaynitePaths.ConfigFilePath));
                    instance = settings;
                }
            }
            catch (Exception e)
            {
                logger.Error(e, "Failed to load application settings.");
                instance = new PlayniteSettings();
            }

            return(Instance);
        }