private void __add(BookmarkObject bo, string currentPath) { if (string.IsNullOrEmpty(currentPath)) { _bookmarks.Add(bo.ToString()); } else { string nextPath = string.Empty; string nextFolder = string.Empty; nextFolder = __getNextFolder(currentPath); nextPath = __getNextPath(currentPath); FolderObject fo = __getFolder(nextFolder); fo.Parent = this; fo.__add(bo, nextPath); } }
public void Add(BookmarkObject bo) { if (bo.Parent == this._name) { _bookmarks.Add(bo.ToString()); } else { string nextPath = string.Empty; string nextFolder = string.Empty; string tmpPath = string.Empty; tmpPath = __getNextPath(bo.Path); nextFolder = __getNextFolder(tmpPath); nextPath = __getNextPath(tmpPath); FolderObject fo = __getFolder(nextFolder); fo.Parent = this; fo.__add(bo, nextPath); } }
private object[] __processBookmark(XElement x) { //shown: icon | title | path | good/bad | url | addDate //hidden: lastmodified string iconString = (x.Attribute(_icon) == null) ? string.Empty : x.Attribute(_icon).Value; Image icon = BookmarkObject.Base64ToImage(iconString); string title = x.Value; log.AddText(string.Format("Processing title:{0}", title)); string path = __getPath(x, string.Empty); string url = (x.Attribute(_href) == null) ? string.Empty : x.Attribute(_href).Value; string addDate = (x.Attribute(_addDate) == null) ? string.Empty : x.Attribute(_addDate).Value; string lastModified = (x.Attribute(_lastModified) == null) ? string.Empty : x.Attribute(_lastModified).Value; return(new object[] { icon, title, path, string.Empty, url, addDate, lastModified }); }