public void Deserialize(XmlNode node) { foreach (XmlNode childNode in node.ChildNodes) { switch (childNode.Name) { case "ShowStation": { bool temp; if (Boolean.TryParse(childNode.InnerText, out temp)) ShowStation = temp; break; } case "ShowDescription": { bool temp; if (Boolean.TryParse(childNode.InnerText, out temp)) ShowDescription = temp; break; } case "Item": { var item = new ProgramStrategyItem(this); item.Deserialize(childNode); Items.Add(item); break; } } } }
public void Deserialize(XmlNode node) { foreach (XmlNode childNode in node.ChildNodes) { switch (childNode.Name) { case "ShowStation": { bool temp; if (Boolean.TryParse(childNode.InnerText, out temp)) { ShowStation = temp; } break; } case "ShowDescription": { bool temp; if (Boolean.TryParse(childNode.InnerText, out temp)) { ShowDescription = temp; } break; } case "Item": { var item = new ProgramStrategyItem(this); item.Deserialize(childNode); Items.Add(item); break; } } } }