Esempio n. 1
0
        public void MoveTo(CategoryConfiguration category)
        {
            if (ParentCategory != null)
            {
                ParentCategory.Remove(this);
            }

            ParentCategory.Add(this);
        }
Esempio n. 2
0
        public void Add(CategoryConfiguration category)
        {
            category.ParentCategory = this;

            if (!Categories.Contains(category))
            {
                Categories.Add(category);
            }
        }
Esempio n. 3
0
        private void Link(CategoryConfiguration categoryConfiguration)
        {
            categoryConfiguration.RootConfiguration = this;

            foreach (var subCategoryConfiguration in categoryConfiguration.Categories)
            {
                Link(subCategoryConfiguration);
            }

            foreach (var projectConfiguration in categoryConfiguration.Projects)
            {
                projectConfiguration.RootConfiguration = this;

                projectConfiguration.ParentCategory = categoryConfiguration;
            }
        }
Esempio n. 4
0
 public void Remove(CategoryConfiguration category)
 {
     category.ParentCategory = null;
     Categories.Remove(category);
 }