예제 #1
0
        public string[] GetBookmarkItemPaths()
        {
            var query = from item in TreeViewItemViewModel.FamilyTree(this.BookmarkCategory)
                        select TreeViewItemViewModel.BuildRelativePath(this.BookmarkCategory, item, this.IsCategory);

            return(query.ToArray());
        }
예제 #2
0
        public string[] GetBookmarkCategoryPaths()
        {
            var query = from item in TreeViewItemViewModel.FamilyTree(this.BookmarkCategory)
                        where item is BookmarkRootTreeViewItemViewModel || item is BookmarkCategoryTreeViewItemViewModel
                        select TreeViewItemViewModel.BuildRelativePath(this.BookmarkCategory, item);

            return(query.ToArray());
        }
예제 #3
0
        internal void UpdateBookmarkItems()
        {
            var query = from item in TreeViewItemViewModel.Descendants(this.bookmarkCategory)
                        select TreeViewItemViewModel.BuildRelativePath(this.bookmarkCategory, item, IsCategory);

            this.BookmarkItems = query.ToArray();

            bool IsCategory(TreeViewItemViewModel viewModel)
            {
                return(viewModel is BookmarkRootTreeViewItemViewModel || viewModel is BookmarkCategoryTreeViewItemViewModel);
            }
        }
예제 #4
0
        public TreeViewItemViewModel GetBookmarkItem(string path)
        {
            var items = TreeViewItemViewModel.FamilyTree(this.BookmarkCategory);

            foreach (var item in items)
            {
                var itemmPath = TreeViewItemViewModel.BuildRelativePath(this.BookmarkCategory, item);
                if (path == itemmPath)
                {
                    return(item);
                }
            }

            return(null);
        }
예제 #5
0
        internal void UpdateBookmarkItems()
        {
            var query = from item in TreeViewItemViewModel.Descendants(this.BookmarkCategory)
                        select TreeViewItemViewModel.BuildRelativePath(this.BookmarkCategory, item, IsCategory);

            this.BookmarkItems = query.ToArray();