frmmapcontrol.cs

来自「ArcGIS Engine ControlsCommands CSharp的一个」· CS 代码 · 共 48 行

CS
48
字号
// Copyright 2006 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 use restrictions at /arcgis/developerkit/userestrictions.

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using ESRI.ArcGIS.SystemUI;

namespace ContextHelpEngine
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            //Buddy the ToolbarControl to the MapControl
            axToolbarControl1.SetBuddyControl(axMapControl1);

            //Add Open, Save As and Map Navigation Commands to the ToolbarControl
            axToolbarControl1.AddItem("esriControls.ControlsOpenDocCommand", 0, -1, false, 0, esriCommandStyles.esriCommandStyleIconOnly);
            axToolbarControl1.AddItem("esriControls.ControlsSaveAsDocCommand", 0, -1, false, 0, esriCommandStyles.esriCommandStyleIconOnly);
            axToolbarControl1.AddItem("esriControls.ControlsMapNavigationToolbar", 0, -1, true, 0, esriCommandStyles.esriCommandStyleIconOnly);

            //Add custom command to the ToolbarControl
            axToolbarControl1.AddItem("CSharpMyFullExtent.MyFullExtentCommand", 0, -1, true, 0, esriCommandStyles.esriCommandStyleIconOnly);

            //Add the Context Help command to the ToolbarControl
            axToolbarControl1.AddItem("esriControls.ControlsContextHelpCommand", 0, -1, false, 0, esriCommandStyles.esriCommandStyleIconOnly);

        }
    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?