public static RijksDataModel LoadData() { RijksDataModel model = IsolatedStorageCacheManager <RijksDataModel> .Retrieve("RijksDataModel.xml"); if (model == null || (DateTime.Now.Date - model.ReadDate.Date) >= new TimeSpan(2, 0, 0)) { UpdateData(); } return(model); }
public static AppInfo GetAppInfo() { AppInfo info = IsolatedStorageCacheManager <AppInfo> .Retrieve("AppInfo.xml"); if (info == null) { info = new AppInfo(); } return(info); }
public static ClientInfo GetClientInfo() { ClientInfo info = IsolatedStorageCacheManager <ClientInfo> .Retrieve("ClientInfo.xml"); if (info == null) { info = new ClientInfo(); } return(info); }
public static List <SearchWord> GetHistory() { List <SearchWord> info = IsolatedStorageCacheManager <List <SearchWord> > .Retrieve("History.xml"); if (info == null) { info = new List <SearchWord>(); } return(info); }
public void Load() { //Load from Isolated Storage ObservableCollection <Server> loadList = IsolatedStorageCacheManager <ObservableCollection <Server> > .Retrieve("servercollection.xml"); this.Clear(); if (loadList != null) { foreach (var item in loadList) { this.Add(item); } } }
public async static Task <List <SearchWord> > GetHistory() { try { List <SearchWord> info = await IsolatedStorageCacheManager.LoadData <List <SearchWord> >("History.xml"); if (info == null) { info = new List <SearchWord>(); } return(info); } catch { return(new List <SearchWord>()); } }
private static void SaveHistory(List <SearchWord> info) { IsolatedStorageCacheManager <List <SearchWord> > .Store("History.xml", info); }
public static void SaveData(RijksDataModel model) { IsolatedStorageCacheManager <RijksDataModel> .Store("RijksDataModel.xml", model); }
public void Save() { //Save to Isolated Storage IsolatedStorageCacheManager <ObservableCollection <Server> > .Store("servercollection.xml", this); }
private static async Task SaveHistory(List <SearchWord> info) { await IsolatedStorageCacheManager.SaveData("History.xml", info); }
public static void SaveAppInfo(AppInfo appInfo) { IsolatedStorageCacheManager <AppInfo> .Store("AppInfo.xml", appInfo); }
public static void SaveClientInfo(ClientInfo clientInfo) { IsolatedStorageCacheManager <ClientInfo> .Store("ClientInfo.xml", clientInfo); }