Esempio n. 1
0
 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);
             }
         }
     }
 }
Esempio n. 2
0
 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);
             }
         }
     }
 }