public CategoryItem AddCategory(Category category)
 {
     if (!this.categories.Keys.Contains(category.Id)) {
         var categoryItem = new CategoryItem();
         categoryItem.Category = category;
         categoryItem.SelectedPublisherChanged += new SelectedPublisherChangedEventHandler(category_SelectedPublisherChanged);
         categories.Add(category.Id, categoryItem);
         this.categoryList.Children.Add(categoryItem);
         return categoryItem;
     } else {
         return this.categories[category.Id];
     }
 }
 public CategoryItemMenuMediator(CategoryItem categoryItem)
 {
     this.categoryItem = categoryItem;
     this.categoryItem.menu.subscribeMenuItem.Click += new System.Windows.RoutedEventHandler(subscribeMenuItem_Click);
 }
 private void category_SelectedPublisherChanged(CategoryItem obj, Publisher sndr)
 {
     if (SelectionChanged != null)
         SelectionChanged(obj, sndr);
 }