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 AlterTreeViewState(TreeViewFolderStateChange stateChange, BookmarkFolder folder) { if (stateChange == TreeViewFolderStateChange.FolderAdded) { _treeViewDataContext.ExpandNode(folder); } else if (stateChange == TreeViewFolderStateChange.FolderRenamed) { InitBookmarksDataSource(); _treeViewDataContext.ExpandNode(folder); } else { _treeViewDataContext.ExpandNode(bookmarksTree.TopNode.Tag as BookmarkFolder); } }