protected virtual void OnCallTipClick(CallTipClickEventArgs e) { if (Events[_callTipClickEventKey] != null) ((EventHandler<CallTipClickEventArgs>)Events[_callTipClickEventKey])(this, e); }
internal void FireCallTipClick(int arrow) { CallTipArrow a = (CallTipArrow)arrow; OverloadList ol = CallTip.OverloadList; CallTipClickEventArgs e; if (ol == null) { e = new CallTipClickEventArgs(a, -1, -1, null, CallTip.HighlightStart, CallTip.HighlightEnd); } else { int newIndex = ol.CurrentIndex; if (a == CallTipArrow.Down) { if (ol.CurrentIndex == ol.Count - 1) newIndex = 0; else newIndex++; } else if (a == CallTipArrow.Up) { if (ol.CurrentIndex == 0) newIndex = ol.Count - 1; else newIndex--; } e = new CallTipClickEventArgs(a, ol.CurrentIndex, newIndex, ol, CallTip.HighlightStart, CallTip.HighlightEnd); } OnCallTipClick(e); if (e.Cancel) { CallTip.Cancel(); } else { if (ol != null) { // We allow them to alse replace the list entirely or just // manipulate the New Index CallTip.OverloadList = e.OverloadList; CallTip.OverloadList.CurrentIndex = e.NewIndex; CallTip.ShowOverloadInternal(); } CallTip.HighlightStart = e.HighlightStart; CallTip.HighlightEnd = e.HighlightEnd; } }