Exemple #1
0
 public List<AdInfo> GetScreenAds()
 {
     List<AdInfo> ads = new List<AdInfo>();
     var nodes = doc.SelectSingleNode("config/ads/screen");
     if(nodes == null)
     {
         return ads;
     }
     foreach(XmlNode node in nodes)
     {
         AdInfo ad = new AdInfo()
         {
             ImageUrl = node.Attributes["imgUrl"].Value,
             ClickUrl = node.Attributes["clickUrl"].Value
         };
         ads.Add(ad);
     }
     return ads;
 }
Exemple #2
0
 public List<AdInfo> GetBottomAds()
 {
     List<AdInfo> ads = new List<AdInfo>();
     var nodes = doc.SelectSingleNode("config/ads/statusbar");
     if(nodes == null)
     {
         return ads;
     }
     foreach(XmlNode node in nodes)
     {
         AdInfo ad = new AdInfo()
         {
             Text = node.Attributes["text"].Value,
             ClickUrl = node.Attributes["clickUrl"].Value
         };
         ads.Add(ad);
     }
     return ads;
 }