Exemplo n.º 1
0
        private void saveToXml()
        {
            string xmlser = SeDes.ToXml(wle);

            File.WriteAllText(strDownloadPath + "\\worldleaderboardevents.xml", xmlser);

            xmlser = SeDes.ToXml(wllist);
            File.WriteAllText(strDownloadPath + "\\worldleaderboardlist.xml", xmlser);

            xmlser = SeDes.ToXml(drivers);
            File.WriteAllText(strDownloadPath + "\\drivers.xml", xmlser);
        }
Exemplo n.º 2
0
 private void loadFromXml()
 {
     if (File.Exists(strDownloadPath + "\\worldleaderboardevents.xml"))
     {
         string xml = File.ReadAllText(strDownloadPath + "\\worldleaderboardevents.xml");
         wle = (SeDes.ToObj(xml, wle) as worldLeaderboardEvents);
     }
     else
     {
         wle.Events = new List <Event>();
     }
     twle.Events = new List <Event>();
     if (File.Exists(strDownloadPath + "\\worldleaderboardlist.xml"))
     {
         string xml = File.ReadAllText(strDownloadPath + "\\worldleaderboardlist.xml");
         wllist = (SeDes.ToObj(xml, wllist) as List <worldLeaderboards>);
     }
     if (File.Exists(strDownloadPath + "\\drivers.xml"))
     {
         string xml = File.ReadAllText(strDownloadPath + "\\drivers.xml");
         drivers = (SeDes.ToObj(xml, drivers) as List <Driver>);
     }
 }