protected override void OnClick(EventArgs e) { TToolButtonActionLink actionlink = (TToolButtonActionLink)TActionList.GetActionLink(this); TBasicAction action = actionlink != null ? actionlink.Action : null; EventHandler clickhandler = this.GetClickEvent(); // Following code based on D4's TControl.Click // Call OnClick if assigned and not equal to associated action's OnExecute. // If associated action's OnExecute assigned then call it, otherwise, call // OnClick. if (DesignMode || actionlink == null || action == null || !Extensions.AreIntersectingOrBothEmpty(clickhandler, action.ExecuteDelegate)) { base.OnClick(e); } else { // Following code based on D6's TMenuItem.Click if (CheckOnClick && (actionlink == null || !actionlink.IsAutoCheckLinked)) { Checked = !Checked; } actionlink.OnExecute(this, EventArgs.Empty); } }
internal void SetActionList(TActionList actionList) { this.actionList = actionList; }
protected TActionLink(Component client, TActionList owner) : base(client, owner) { }
public TToolButtonActionLink(Component client, TActionList owner) : base(client, owner) { }
public TToolControlActionLink(Component client, TActionList owner) : base(client, owner) { }
public TContainedActionCollection(TActionList owner) { this.owner = owner; }
public TBasicActionLink(Component client, TActionList owner) { Owner = owner; AssignClient(client); }
public TMenuActionLink(Component client, TActionList owner) : base(client, owner) { }