Beispiel #1
0
        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;
        }
Beispiel #2
0
        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);
                }
            }
        }
Beispiel #3
0
        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);
        }
Beispiel #4
0
        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();
            }
        }
Beispiel #5
0
        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;
        }
Beispiel #6
0
        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;
        }