protected override void LoadBaseNodes() { if (TOC != null) { Node ChildNode; foreach (var item in TOC.Elements()) { if (item.Name.LocalName == "itemref") { string idRef = item.Attribute("idref").Value; Model.Nodes.Add(new Node(idRef)); ChildNode = Model.Nodes.Last(); ChildNode.IsChecked = true; SaveInfoIntoNode(idRef, ChildNode); } } } }
protected override void LoadBaseNodes() { if (TOC != null) { Node ChildNode; foreach (var item in TOC.Elements(ns + "navPoint")) { if (item.Name.LocalName == "navPoint") { string s = item.Element(ns + "navLabel").Element(ns + "text").Value.Trim(); Model.Nodes.Add(new Node(s)); ChildNode = Model.Nodes.Last(); ChildNode.IsChecked = true; SaveInfoIntoNode(item, ChildNode); LoadChildNode(item, ChildNode); } } } }