public void LoadData() { Software = LoadFromXml("Software.xml"); Messengers = LoadFromXml("Messengers.xml"); Entertainment = LoadFromXml("Entertainment.xml"); GamesMsc = LoadFromXml("GamesMsc.xml"); Android = LoadFromXml("Android.xml"); NewAdds = LoadFromXml("NewAdds.xml"); IsDataLoaded = true; }
public SaveSoundGroup(SoundGroup data) : this() { if (data != null) { this.Title = data.Title; this.Items = new List<SoundData>(); foreach (var group in data.Items) { this.Items.AddRange(group); } } }
private SoundGroup LoadCustomSounds() { SoundGroup data; string dataFromAppSettings; if (IsolatedStorageSettings.ApplicationSettings.TryGetValue(CustomSoundKey, out dataFromAppSettings)) { data = JsonConvert.DeserializeObject <SoundGroup>(dataFromAppSettings); } else { data = new SoundGroup(); data.Title = "mine"; } return(data); }
private void SaveToXml(SoundGroup group, string xmlName) { if (group != null) { Stream fileStream; fileStream = IsolatedStorageFile.GetUserStoreForApplication().CreateFile(xmlName); XmlSerializer serializer = new XmlSerializer(typeof(SaveSoundGroup)); serializer.Serialize(fileStream, new SaveSoundGroup(group)); fileStream.Close(); fileStream.Dispose(); } }
private SoundGroup LoadCustomSounds() { SoundGroup data; string dataFromAppSettings; if (IsolatedStorageSettings.ApplicationSettings.TryGetValue(CustomSoundKey, out dataFromAppSettings)) { data = JsonConvert.DeserializeObject<SoundGroup>(dataFromAppSettings); } else { data = new SoundGroup(); data.Title = "mine"; } return data; }
public void LoadData() { Walter = LoadFromXml("Walter.xml"); Jesse = LoadFromXml("Jesse.xml"); Saul = LoadFromXml("Saul.xml"); Gus = LoadFromXml("Gus.xml"); Jr = LoadFromXml("Jr.xml"); Mike = LoadFromXml("Mike.xml"); Sky = LoadFromXml("Sky.xml"); IsDataLoaded = true; }