/// <summary> /// Handle the event wiring and scheme update for the new categories. /// </summary> /// <param name="categories">The category collection to update</param> protected virtual void OnIncludeCategories(LineCategoryCollection categories) { if (categories == null) { return; } categories.Scheme = this; categories.ItemChanged += CategoriesItemChanged; categories.SelectFeatures += OnSelectFeatures; categories.DeselectFeatures += OnDeselectFeatures; }
/// <summary> /// Overrides the default OnCopy behavior to remove the duplicte SelectFeatures event handler /// </summary> /// <param name="copy"></param> protected override void OnCopy(CopyList <ILineCategory> copy) { LineCategoryCollection lcc = copy as LineCategoryCollection; if (lcc != null && lcc.SelectFeatures != null) { foreach (var handler in lcc.SelectFeatures.GetInvocationList()) { lcc.SelectFeatures -= (EventHandler <ExpressionEventArgs>)handler; } } base.OnCopy(copy); }
private void Configure() { _categories = new LineCategoryCollection(); InitializeCategories(); }