コード例 #1
0
 protected XbelIdentifiedItem(XbelFolder parent)
     : base(parent)
 {
     infos = new XbelMetadataCollection();
 }
コード例 #2
0
 public XbelSeparator(XbelFolder Parent)
     : base(Parent)
 {
 }
コード例 #3
0
 public XbelAlias(XbelFolder Parent)
     : base(Parent)
 {
 }
コード例 #4
0
 public XbelBookmark(XbelFolder Parent)
     : base(Parent)
 {
     Init();
 }
コード例 #5
0
 public XbelFolder(XbelFolder parent)
     : base(parent)
 {
     Init();
 }
コード例 #6
0
        private void LoadChildsFromXmlNode(XmlNode node)
        {
            Clear();
            foreach(XmlNode ChildNode in node.ChildNodes) {
                XbelItem Item = null;

                if (ChildNode.Name == "folder") {
                    Item = new XbelFolder(this);
                } else if (ChildNode.Name == "bookmark") {
                    Item = new XbelBookmark(this);
                } else if (ChildNode.Name == "alias") {
                    Item = new XbelAlias(this);
                } else if (ChildNode.Name == "separator") {
                    Item = new XbelSeparator(this);
                }

                if (Item != null) {
                    Add(Item);
                    Item.LoadFromXmlNode(ChildNode);
                }
            }
        }
コード例 #7
0
 private void CleanAliases(XbelFolder folder)
 {
     foreach (XbelItem item in folder) {
         if (item is XbelAlias) {
             XbelAlias alias = item as XbelAlias;
             if ((alias.IdRef == "") || (Document.IdTable[alias.IdRef] == null)) {
                 folder.Remove(item);
             }
         } else if (item is XbelFolder) {
             CleanAliases(item as XbelFolder);
         }
     }
 }
コード例 #8
0
        private void BuildIdTableForFolder(XbelFolder folder,
            XbelIdentifiedItemHashtable idTable)
        {
            foreach(XbelItem item in folder) {
                if (item is XbelIdentifiedItem) {
                    XbelIdentifiedItem identItem = item as XbelIdentifiedItem;

                    if (identItem.Id != "") {
                        idTable.Add(identItem);
                    }
                }
                if (item is XbelFolder) {
                    BuildIdTableForFolder((item as XbelFolder), idTable);
                }
            }
        }