private void OnButtonClick(object sender, MouseEventArgs e)
{
bool showingContextMenu = false;
// Do we need to show a drop down menu?
if (!Splitter || (Splitter && _drawButton.SplitRectangle.Contains(e.Location)))
showingContextMenu = ShowDropDown();
else
{
// Raise the standard click event
OnClick(EventArgs.Empty);
// Raise event to indicate it was a mouse activated click
OnMouseClick(e);
}
// If not showing a context menu then perform cleanup straight away
if (!showingContextMenu)
ContextMenuClosed();
}