在主 窗体 添加导出地图菜单


代码 如下:
using System;using System.Drawing;using System.Runtime.InteropServices;using ESRI.ArcGIS.ADF.BaseClasses;using ESRI.ArcGIS.ADF.CATIDs;using ESRI.ArcGIS.Controls; namespace Farm{ /// <summary> /// Command that works in ArcMap/Map/PageLayout /// </summary> [Guid("f3437c39-362b-438f-b703-e987ebf78814")] [ClassInterface(ClassInterfaceType.None)] [ProgId("FarmManager.统计分析.ExportMapCmd")] public sealed class ExportMapCmd : BaseCommand { #region COM Registration Function(s) [ComRegisterFunction()] [ComVisible(false)] static void RegisterFunction(Type registerType) { // Required for ArcGIS Component Category Registrar support ArcGISCategoryRegistration(registerType); // // TODO: Add any COM registration code here // } [ComUnregisterFunction()] [ComVisible(false)] static void UnregisterFunction(Type registerType) { // Required for ArcGIS Component Category Registrar support ArcGISCategoryUnregistration(registerType); // // TODO: Add any COM unregistration code here // } #region ArcGIS Component Category Registrar generated code /// <summary> /// Required method for ArcGIS Component Category registration - /// Do not modify the contents of this method with the code editor. /// </summary> private static void ArcGISCategoryRegistration(Type registerType) { string regKey = string.Format("HKEY_CLASSES_ROOT\\CLSID\\{ { {0}}}", registerType.GUID); MxCommands.Register(regKey); ControlsCommands.Register(regKey); } /// <summary> /// Required method for ArcGIS Component Category unregistration - /// Do not modify the contents of this method with the code editor. /// </summary> private static void ArcGISCategoryUnregistration(Type registerType)
免责声明:本文系网络转载或改编,未找到原创作者,版权归原作者所有。如涉及版权,请联系删