public void ContextMenuSelect(string contextMenuItem) { GUI.Log("ContextMenuSelect is deprecated, please use GetContextMenu().SingleClickItem instead", LogItemType.Warning); GUIContextMenuStrip contextMenu = new GUIContextMenuStrip(Identity.ParentHandle, Description + " conext menu", null); contextMenu.SingleClickItem(contextMenuItem); }
/// <summary> /// Gets the currently displayed context menu of the control /// </summary> /// <returns>The context menu</returns> public GUIContextMenu GetContextMenu() { //TODO implement support for ContextMenu and native context menus (as well as the ContextMenuStrip thats currently implemented) for (int loop = 0; loop < 10; loop++) { if (GUIContextMenuStrip.ContextMenuExists(Identity.ParentHandle)) { GUIContextMenuStrip contextMenu = new GUIContextMenuStrip(Identity.ParentHandle, Description + " context menu", null); return(contextMenu); } Thread.Sleep(50); } throw GUI.ApeException("Failed to find context menu"); }