示例#1
0
		public void Deserialize(XmlNode node)
		{
			foreach (XmlNode childNode in node.ChildNodes)
			{
				switch (childNode.Name)
				{
					case "Separator":
						Separator = childNode.InnerText;
						break;
					case "BorderLeft":
						BorderLeft = childNode.InnerText;
						break;
					case "BorderRight":
						BorderRight = childNode.InnerText;
						break;
					case "TextItem":
						{
							var textItem = new TextItem();
							textItem.Deserialize(childNode);
							Items.Add(textItem);
						}
						break;
					case "TextGroup":
						{
							var textItem = new TextGroup();
							textItem.Deserialize(childNode);
							Items.Add(textItem);
						}
						break;
				}
			}
		}
        public void Deserialize(XmlNode node)
        {
            foreach (XmlNode childNode in node.ChildNodes)
            {
                switch (childNode.Name)
                {
                case "Separator":
                    Separator = childNode.InnerText;
                    break;

                case "BorderLeft":
                    BorderLeft = childNode.InnerText;
                    break;

                case "BorderRight":
                    BorderRight = childNode.InnerText;
                    break;

                case "TextItem":
                {
                    var textItem = new TextItem();
                    textItem.Deserialize(childNode);
                    Items.Add(textItem);
                }
                break;

                case "TextGroup":
                {
                    var textItem = new TextGroup();
                    textItem.Deserialize(childNode);
                    Items.Add(textItem);
                }
                break;
                }
            }
        }