protected XbelIdentifiedItem(XbelFolder parent) : base(parent) { infos = new XbelMetadataCollection(); }
public XbelSeparator(XbelFolder Parent) : base(Parent) { }
public XbelAlias(XbelFolder Parent) : base(Parent) { }
public XbelBookmark(XbelFolder Parent) : base(Parent) { Init(); }
public XbelFolder(XbelFolder parent) : base(parent) { Init(); }
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); } } }
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); } } }
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); } } }