adinfo.cs
来自「破解的飞信源代码」· CS 代码 · 共 89 行
CS
89 行
namespace Imps.Client.Core
{
using Imps.Utils;
using System;
using System.Collections.Generic;
using System.Xml;
public class AdInfo
{
private string _href;
private List<AdItemBase> _items = new List<AdItemBase>();
private string _title;
public void LoadXmlNode(XmlNode node)
{
this._items.Clear();
this._href = XmlHelper.ReadXmlAttributeString(node, "href");
this._title = XmlHelper.ReadXmlAttributeString(node, "title");
foreach (XmlNode node2 in node.ChildNodes)
{
AdItemBase base2;
if (node2.NodeType == XmlNodeType.Text)
{
base2 = new TextAdItem();
}
else
{
if ((node2.NodeType != XmlNodeType.Element) || (node2.Name != "img"))
{
continue;
}
base2 = new LogoAdItem();
}
base2.LoadXmlNode(node2);
this._items.Add(base2);
}
}
public string Href
{
get
{
return this._href;
}
set
{
this._href = value;
}
}
public bool IsValid
{
get
{
if (!string.IsNullOrEmpty(this._href))
{
return (this._items.get_Count() > 0);
}
return false;
}
}
public List<AdItemBase> Items
{
get
{
return this._items;
}
set
{
this._items = value;
}
}
public string Title
{
get
{
return this._title;
}
set
{
this._title = value;
}
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?