예제 #1
0
        public void loadConfig()
        {
            try {
                var text = File.ReadAllText (Constants.GetConfigPath);
                config = JsonConvert.DeserializeObject<Config> (text);
                runConfigConstraints();
                onSettingsChangedEventHandler (this);

            } catch (DirectoryNotFoundException) {
            } catch (FileNotFoundException) {
                Directory.CreateDirectory (Constants.GetLocalStoragePath);
                saveConfig ();
            }
        }
예제 #2
0
 public SettingsService()
 {
     config = new Config ();
 }