public CategorySchemeVM(CategoryScheme categoryScheme) { this.categoryScheme = categoryScheme; categories = new ObservableCollection<CategoryVM>(); foreach (Category categoryModel in categoryScheme.Categories) { CategoryVM category = new CategoryVM(categoryModel); category.Parent = this; categories.Add(category); } modelSyncher = new ModelSyncher<CategoryVM, Category>(this, categories, categoryScheme.Categories); modelSyncher.AddActionHandler = (param) => { param.CategorySchemeId = Id; }; }
public CodeVM(Code code, CategoryVM category) { this.code = code; this.Category = category; }
public CategoryVM FindCategory(string categoryId) { return(CategoryVM.Find(categories, categoryId)); }
private bool CheckRemovable(CategoryVM category) { ObservableCollection<CategoryVM> categories = new ObservableCollection<CategoryVM>(); categories.Add(category); return CheckRemovable(categories); }