public override void Initialize(System.ComponentModel.IComponent component) { base.Initialize(component); //Record instance of control we're designing Parent = (StatusList)component; //Hook up events ISelectionService s = (ISelectionService)GetService(typeof(ISelectionService)); IComponentChangeService c = (IComponentChangeService)GetService(typeof(IComponentChangeService)); s.SelectionChanged += OnSelectionChanged; c.ComponentRemoving += OnComponentRemoving; }
// Constructor internal StatusCollection(StatusList Parent) { // the status label control associated with this collection this.Parent = Parent; }
public StatusItem() { // Declare a new StatusLabel control for this item Parent = new StatusList(); }