/// <summary> /// Initialize a new instance of the KryptonLinkLabelActionList class. /// </summary> /// <param name="owner">Designer that owns this action list instance.</param> public KryptonLinkLabelActionList(KryptonLinkLabelDesigner owner) : base(owner.Component) { // Remember the link label instance _linkLabel = owner.Component as KryptonLinkLabel; // Assuming we were correctly passed an actual component... if (_linkLabel != null) { // Decide on the next action to take given the current setting _action = _linkLabel.LinkVisited ? "Link has not been visited" : "Link has been visited"; } // Cache service used to notify when a property has changed _service = (IComponentChangeService)GetService(typeof(IComponentChangeService)); }
/// <summary> /// Initialize a new instance of the KryptonLinkLabelActionList class. /// </summary> /// <param name="owner">Designer that owns this action list instance.</param> public KryptonLinkLabelActionList(KryptonLinkLabelDesigner owner) : base(owner.Component) { // Remember the link label instance _linkLabel = owner.Component as KryptonLinkLabel; // Assuming we were correctly passed an actual component... if (_linkLabel != null) { // Decide on the next action to take given the current setting if (_linkLabel.LinkVisited) _action = "Link has not been visited"; else _action = "Link has been visited"; } // Cache service used to notify when a property has changed _service = (IComponentChangeService)GetService(typeof(IComponentChangeService)); }