Example #1
0
 protected BookmarkCategoryTreeViewItemViewModel(string path, SmartSetBrowserViewModel browser)
 {
     NameValidator.ValidateCategoryPath(path);
     this.categoryName = new CategoryName(path);
     this.Target       = path;
     this.Owner        = browser;
 }
Example #2
0
        public SmartSetTreeViewItemViewModel(ISmartSet smartSet, SmartSetBrowserViewModel browser)
        {
            this.smartSet = smartSet;
            this.browser  = browser;
            this.Target   = smartSet;

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

            if (this.smartSet.Items is INotifyCollectionChanged)
            {
                (this.smartSet.Items as INotifyCollectionChanged).CollectionChanged += Items_CollectionChanged;
            }
            this.smartSet.Renamed += SmartSet_Renamed;
        }
Example #3
0
        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;
        }
Example #4
0
 public override BookmarkCategoryTreeViewItemViewModel CreateInstance(string path, SmartSetBrowserViewModel browser)
 {
     return(new BookmarkTypeCategoryTreeViewItemViewModel(path, browser as TypeSmartSetBrowserViewModel));
 }
 public abstract BookmarkCategoryTreeViewItemViewModel CreateInstance(string path, SmartSetBrowserViewModel browser);
 protected BookmarkRootTreeViewItemViewModel(SmartSetBrowserViewModel browser)
 {
     this.Owner = browser ?? throw new ArgumentNullException(nameof(browser));
 }
 public SmartSetContextTreeViewItemViewModel(ISmartSetCategory category, SmartSetBrowserViewModel browser)
     : base(category, browser)
 {
 }