public void Load() { try { var xml = _isolatedStorageIo.Read(IsolatedStorageFileNameFactory.Create()); ProgramSettings = _serializer.Deserialize <ProgramSettings>(xml); } catch (Exception) { // If setting dont exist then load from default ProgramSettings = _programSettingsFactory.Create(); } }
public void Save() { var xml = _serializer.Serialize(ProgramSettings); _isolatedStorageIo.Write(IsolatedStorageFileNameFactory.Create(), xml); }