/// <summary> /// 卸载右键菜单 /// </summary> public static void RemoveContextMenu() { try { if (m_ContextMenu != null) { Application.RemoveObjectContextMenuExtension(RXObject.GetClass(typeof(Entity)), m_ContextMenu); m_ContextMenu.Dispose(); } } catch { PublicMethod.Instance.ShowMessage("卸载右键菜单失败!"); } }
/// <summary> /// 卸载右键菜单 /// </summary> private void RemoveContextMenu() { try { if (m_ContextMenu != null) { Autodesk.AutoCAD.ApplicationServices.Application.RemoveObjectContextMenuExtension(RXObject.GetClass(typeof (Entity)),m_ContextMenu); m_ContextMenu.Dispose(); m_ContextMenu = null; } } catch(CADException ex) { PublicMethod.Instance.ShowMessage(ex.Message); } }