cmdNAProperties.cs
// Copyright 2012 ESRI // // All rights reserved under the copyright laws of the United States // and applicable international laws, treaties, and conventions. // // You may freely redistribute and use this sample code, with or // without modification, provided you include the original copyright // notice and use restrictions. // // See the use restrictions. // using System.Runtime.InteropServices; using System.Windows.Forms; // This command brings up the property pages for the ArcGIS Network Analyst extension environment. namespace NAEngine { [Guid("7E98FE97-DA7A-4069-BC85-091D75B1AF65")] [ClassInterface(ClassInterfaceType.None)] [ProgId("NAEngine.NAProperties")] public sealed class cmdNAProperties : ESRI.ArcGIS.ADF.BaseClasses.BaseCommand { public cmdNAProperties() { base.m_caption = "Properties..."; } public override void OnClick() { // Show the Property Page form for ArcGIS Network Analyst extension var props = new frmNAProperties(); props.ShowModal(); } public override void OnCreate(object hook) { // Since this ToolbarMenu item is on the ToolbarControl the Hook is initialized by the ToolbarControl. var toolbarControl = hook as ESRI.ArcGIS.Controls.IToolbarControl; } } }