コード例 #1
0
ファイル: FolderObject.cs プロジェクト: xb013/BookmarkManager
 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);
     }
 }
コード例 #2
0
ファイル: FolderObject.cs プロジェクト: xb013/BookmarkManager
 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);
     }
 }