protected BookmarkCategoryTreeViewItemViewModel(string path, SmartSetBrowserViewModel browser)
 {
     NameValidator.ValidateCategoryPath(path);
     this.categoryName = new CategoryName(path);
     this.Target       = path;
     this.Owner        = browser;
 }
        public SmartSetCategoryTreeViewItemViewModel(ISmartSetCategory category, SmartSetBrowserViewModel browser)
        {
            this.category = category;
            this.browser  = browser;
            this.Target   = category;

            foreach (var item in category.Categories)
            {
                this.AddViewModel(item);
            }

            foreach (var item in category.Items)
            {
                this.AddViewModel(item);
            }

            this.category.Renamed += Category_Renamed;
            this.category.Items.CollectionChanged      += Category_ItemsChanged;
            this.category.Categories.CollectionChanged += Category_CategoriesChanged;
        }
예제 #3
0
 public SmartSetContextTreeViewItemViewModel(ISmartSetCategory category, SmartSetBrowserViewModel browser)
     : base(category, browser)
 {
 }
예제 #4
0
 public abstract BookmarkCategoryTreeViewItemViewModel CreateInstance(string path, SmartSetBrowserViewModel browser);
예제 #5
0
 protected BookmarkRootTreeViewItemViewModel(SmartSetBrowserViewModel browser)
 {
     this.Owner = browser ?? throw new ArgumentNullException(nameof(browser));
 }