public static Category RegisterCategory(string name) { Category category; if (m_mapCategories.TryGetValue(name, out category)) return category; category = new Category(name); m_hshCategories.Add(category); m_mapCategories.Add(name, category); if (CategoryAdded != null) { var args = new CategoryManagerEventArgs(category); CategoryAdded(null, args); } return category; }
public static Category RegisterCategory(string name) { Category category; if (m_mapCategories.TryGetValue(name, out category)) { return(category); } category = new Category(name); m_hshCategories.Add(category); m_mapCategories.Add(name, category); if (CategoryAdded != null) { var args = new CategoryManagerEventArgs(category); CategoryAdded(null, args); } return(category); }
void CategoryManager_CategoryAdded(object sender, Assets.CategoryManagerEventArgs e) { cbCategories.Items.Add(e.Category); }