コード例 #1
0
        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();
            }
        }
コード例 #2
0
        public void Save()
        {
            var xml = _serializer.Serialize(ProgramSettings);

            _isolatedStorageIo.Write(IsolatedStorageFileNameFactory.Create(), xml);
        }