Пример #1
0
        private void PopulateWorkItemTypeDetailsFromCategory(CategoryCollection categories, string categoryName)
        {
            if (categories.Contains(categoryName))
            {
                Category cat = categories[categoryName];
                WorkItemCategoryToDefaultType.Add(cat.ReferenceName, cat.DefaultWorkItemType.Name);

                foreach (WorkItemType workItemType in cat.WorkItemTypes)
                {
                    if (!WorkItemTypeToCategoryMapping.ContainsKey(workItemType.Name))
                    {
                        WorkItemTypeToCategoryMapping.Add(workItemType.Name, cat.ReferenceName);
                        WorkItemTypeNames.Add(workItemType.Name);
                    }
                }
            }
        }
Пример #2
0
        private void resetButton_Click(object sender, RoutedEventArgs e)
        {
            CategoryCollection coll = SourceCollectionEdited as CategoryCollection;

            if (coll != null)
            {
                coll.LoadDefaults();
                for (int i = TargetCollectionEdited.Count - 1; i >= 0; i--)
                {
                    Category category = TargetCollectionEdited[i] as Category;
                    if (!coll.Contains(category))
                    {
                        TargetCollectionEdited.RemoveAt(i);
                    }
                }
            }
            UpdateCheckBoxes();
            UpdateSelectedValues();
        }