internal void ShowTabPageContextMenu(Control control, Point position)
{
object menu = this.TabPageContextMenu;
if (menu == null)
return;
var contextMenuStrip = menu as ContextMenuStrip;
if (contextMenuStrip != null)
{
contextMenuStrip.Show(control, position);
return;
}
var contextMenu = menu as ContextMenu;
if (contextMenu != null)
contextMenu.Show(this, position);
}