Esempio n. 1
0
        /// <summary>
        ///     Loads the JSON file located at <see cref="FilePath" />
        /// </summary>
        public void Load()
        {
            if (!File.Exists(FilePath))
            {
                Save();
                return;
            }

            _ = JsonConvert.DeserializeObject<Settings>(File.ReadAllText(FilePath));
        }
Esempio n. 2
0
 /// <summary>
 ///     Initializes the Settings singleton
 /// </summary>
 /// <param name="fileName">Name of the file.</param>
 /// <param name="folders">The folder list that the file resides in.</param>
 public static void Initialize(string fileName, params string[] folders)
 {
     _ = new Settings(Tools.AppFile(fileName, folders));
 }