示例#1
0
 public async void SaveSettings()
 {
     try
     {
         CacheFolder folder = new CacheFolder("SeismographCache");
         IsolatedStorage <Settings> store = new IsolatedStorage <Settings>(folder);
         await store.SaveToFileAsync(SettingsFile, this);
     }
     catch
     {
     }
 }
示例#2
0
        public async static Task <Settings> LoadSettings()
        {
            CacheFolder folder = new CacheFolder("SeismographCache");
            IsolatedStorage <Settings> store = new IsolatedStorage <Settings>(folder);
            Settings settings = await store.LoadFromFileAsync(SettingsFile);

            if (settings == null)
            {
                settings = new Settings();
            }
            return(settings);
        }
示例#3
0
 public IsolatedStorage(CacheFolder cacheFolder)
 {
     this.cacheFolder = cacheFolder;
 }