示例#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 ();
 }