示例#1
0
        /// <summary>
        /// Method which deserializes the download XML schedule
        /// </summary>
        /// <param name="rawXML"></param>
        /// <returns></returns>
        private schedule DeserializeToSchedule(string rawXML)
        {
            XmlSerializer serializer   = new XmlSerializer(typeof(schedule));
            XDocument     document     = XDocument.Parse(rawXML);
            schedule      tempschedule = (schedule)serializer.Deserialize(document.CreateReader());

            tempschedule.Clean();
            return(tempschedule);
        }
示例#2
0
        public void OnFirstStart()
        {
            // Load locally stored schedule
            XmlSerializer serializer   = new XmlSerializer(typeof(schedule));
            XDocument     document     = XDocument.Load("scheduleModel/schedule.en.xml");
            schedule      tempschedule = (schedule)serializer.Deserialize(document.CreateReader());

            tempschedule.Clean();
            IsolatedStorageFileHandler isfh = new IsolatedStorageFileHandler();

            isfh.SaveSchedule(tempschedule);
            AppSettings.ScheduleVersionDownloaded = tempschedule.Version;
            AppSettings.FirstStart = false;
        }