public override void ShowContextMenu(ISpatialDisplay where, IPosition p) { ContextMenuStrip menu = null; if (m_Command != null) { menu = m_Command.CreateContextMenu(); } if (menu == null) { menu = m_Main.CreateContextMenu(this.SpatialSelection); } if (menu != null) { where.ShowContextMenu(p, menu); } }
/// <summary> /// Creates a context menu by getting the application's main window to display a /// context menu that is appropriate for the current selection (if any). /// This overrides the do-nothing implementation provided by <c>SpatialController</c>. /// </summary> /// <param name="where">The display where the context menu should appear</param> /// <param name="p">The preferred position for the menu (may not be honoured if /// the context menu would be obscured)</param> public override void ShowContextMenu(ISpatialDisplay where, IPosition p) { ContextMenuStrip menu = m_Main.CreateContextMenu(SpatialSelection); where.ShowContextMenu(p, menu); }
public override void ShowContextMenu(ISpatialDisplay where, IPosition p) { ContextMenuStrip menu = null; if (m_Command != null) menu = m_Command.CreateContextMenu(); if (menu==null) menu = m_Main.CreateContextMenu(this.SpatialSelection); if (menu!=null) where.ShowContextMenu(p, menu); }