Exemplo n.º 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
     {
     }
 }
Exemplo n.º 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);
        }