Esempio n. 1
0
        private void 进行选择ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ICommand pCommand;

            pCommand = new ESRI.ArcGIS.Controls.ControlsSelectFeaturesToolClass();
            if (tabControl1.SelectedTab == tabPage1)
            {
                pCommand.OnCreate(axMapControl1.Object);
            }
            axMapControl1.CurrentTool = pCommand as ESRI.ArcGIS.SystemUI.ITool;
        }
Esempio n. 2
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            TOCControl.SetBuddyControl(MainMap);
            TOCControl.EnableLayerDragDrop = true;

            ContextMenuStrip tocContextMenuStrip = new System.Windows.Forms.ContextMenuStrip();

            TOCControl.ContextMenuStrip = tocContextMenuStrip;

            TOCControl.ContextMenuStrip.Items.Add("缩放到图层", null, TOCContextMenuItem_ZoomToLayer);
            TOCControl.ContextMenuStrip.Items.Add("删除图层", null, TOCContextMenuItem_RemoveLayer);

            m_selectTool.OnCreate(MainMap.Object);
        }
Esempio n. 3
0
 private void 进行选择ToolStripMenuItem_Click(object sender, EventArgs e)
 {
     ICommand pCommand;
     pCommand = new ESRI.ArcGIS.Controls.ControlsSelectFeaturesToolClass();
     if (tabControl1.SelectedTab == tabPage1)
         pCommand.OnCreate(axMapControl1.Object);
     axMapControl1.CurrentTool = pCommand as ESRI.ArcGIS.SystemUI.ITool;
 }