Example #1
0
 private void Instance_OnBookmarksUpdate(object sender, BookmarkUpdatedEventArgs e)
 {
     if ((e.BookmarkAction & (BookmarkActions.CreatedBookmark | BookmarkActions.DeletedBookmark)) != 0)
     {
         ReLoadBookmarks();
     }
     else if ((e.BookmarkAction & (BookmarkActions.CreatedBookmarkFolder | BookmarkActions.DeletedBookmarkFolder)) != 0)
     {
         _treeViewDataContext.BindData();
         _treeViewDataContext.ExpandNode(_bookmarkManager.RootFolder);
     }
 }
        private void InitTreeView()
        {
            _treeViewDataContext = new TreeViewDataContext(bookmarksTree, _bookmarkManager.RootFolder);
            _treeViewDataContext.BindData();
            bookmarksTree.AfterSelect += BookmarksTree_AfterSelect;

            if (!_bookmarkManager.LoadedFromFile)
            {
                _bookmarkService.OpenBookmarks();
            }

            InitBookmarksDataSource();
        }
Example #3
0
 private void InitBookmarksDataSource()
 {
     _treeViewDataContext = new TreeViewDataContext(bookmarksTree, _bookmarkManager.RootFolder);
     _treeViewDataContext.BindData();
 }