예제 #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;
        }
예제 #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);
                }
            }
        }
예제 #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);
        }
예제 #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();
            }
        }
예제 #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;
        }
예제 #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;
        }