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);
                    }
                }
            }
        }
Beispiel #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();
        }