public static ApplicationSettings Load() { var settings = new ApplicationSettings(); using (var store = IsolatedStorageFile.GetUserStoreForApplication()) { if (!store.FileExists(FileName)) return settings; using (var isoStream = store.OpenFile(FileName, FileMode.Open)) { var s = new XmlSerializer(typeof(ApplicationSettings)); using (var rd = new StreamReader(isoStream)) { settings = (ApplicationSettings)s.Deserialize(rd); } return settings; } } }
public static void Reload() { _instance = Load(); }