Esempio n. 1
0
        private void btn_SelectElement_Click(object sender, EventArgs e)
        {
            ICommand cmd = new ControlsSelectToolClass();

            cmd.OnCreate(m_controlsSynchronizer.ActiveControl);
            m_controlsSynchronizer.ActiveControlCurrentTool = (ITool)cmd;
        }
Esempio n. 2
0
        //设置当前工具(选择元素)
        private void SetCurrentTool()
        {
            ICommand pSelect = new ControlsSelectToolClass();

            pSelect.OnCreate(m_pageLayoutControl.Object);
            m_pageLayoutControl.CurrentTool = pSelect as ITool;
        }
Esempio n. 3
0
        private void CreateESRICommand()
        {
            ICommand command = new ControlsMapDownCommandClass();

            this.m_esriCommandList.Add(command);
            command = new ControlsMapRefreshViewCommandClass();
            this.m_esriCommandList.Add(command);
            command = new ControlsMapLeftCommandClass();
            this.m_esriCommandList.Add(command);
            command = new ControlsMapRightCommandClass();
            this.m_esriCommandList.Add(command);
            command = new ControlsMapUpCommandClass();
            this.m_esriCommandList.Add(command);
            command = new ControlsMapRotateToolClass();
            this.m_esriCommandList.Add(command);
            command = new ControlsPagePanToolClass();
            this.m_esriCommandList.Add(command);
            command = new ControlsPageZoom100PercentCommandClass();
            this.m_esriCommandList.Add(command);
            command = new ControlsPageZoomInFixedCommandClass();
            this.m_esriCommandList.Add(command);
            command = new ControlsPageZoomInToolClass();
            this.m_esriCommandList.Add(command);
            command = new ControlsPageZoomOutFixedCommandClass();
            this.m_esriCommandList.Add(command);
            command = new ControlsPageZoomOutToolClass();
            this.m_esriCommandList.Add(command);
            command = new ControlsPageZoomPageToLastExtentBackCommandClass();
            this.m_esriCommandList.Add(command);
            command = new ControlsPageZoomPageToLastExtentForwardCommandClass();
            this.m_esriCommandList.Add(command);
            command = new ControlsPageZoomPageWidthCommandClass();
            this.m_esriCommandList.Add(command);
            command = new ControlsPageZoomWholePageCommandClass();
            this.m_esriCommandList.Add(command);
            command = new ControlsRotateElementToolClass();
            this.m_esriCommandList.Add(command);
            command = new ControlsRotateLeftCommandClass();
            this.m_esriCommandList.Add(command);
            command = new ControlsRotateRightCommandClass();
            this.m_esriCommandList.Add(command);
            command = new ControlsSelectToolClass();
            this.m_esriCommandList.Add(command);
            command = new ControlsSendBackwardCommandClass();
            this.m_esriCommandList.Add(command);
            command = new ControlsSendToBackCommandClass();
            this.m_esriCommandList.Add(command);
            command = new ControlsGroupCommandClass();
            this.m_esriCommandList.Add(command);
            command = new ControlsUngroupCommandClass();
            this.m_esriCommandList.Add(command);
            command = new ControlsMapClearMapRotationCommandClass();
            this.m_esriCommandList.Add(command);
            command = new ControlsBringForwardCommandClass();
            this.m_esriCommandList.Add(command);
            command = new ControlsBringToFrontCommandClass();
            this.m_esriCommandList.Add(command);
        }
Esempio n. 4
0
        private void buttonItem23_Click(object sender, EventArgs e)
        {
            ICommand pCommand = null;

            pCommand = new ControlsSelectToolClass(); //选择要素
            pCommand.OnCreate(axMapControl2.Object);  //使得PageLayoutContro中对象可以编辑
            axMapControl2.CurrentTool = (ITool)pCommand;
            MapSelectFeature();
        }
Esempio n. 5
0
        public void RunCommond()
        {
            mapControl.MousePointer = esriControlsMousePointer.esriPointerCrosshair;
            ICommand command = new ControlsSelectToolClass();

            if (command.Enabled)
            {
                mapControl.CurrentTool = command as ITool;
            }
            RegistEvent();
        }
Esempio n. 6
0
        //选择元素
        public static void SelectElementTool(AxMapControl mapControl, AxPageLayoutControl pageLayoutControl)
        {
            ICommand pSelect1 = new ControlsSelectToolClass();

            pSelect1.OnCreate(mapControl.Object);
            mapControl.CurrentTool = pSelect1 as ITool;
            ICommand pSelect2 = new ControlsSelectToolClass();

            pSelect2.OnCreate(pageLayoutControl.Object);
            pageLayoutControl.CurrentTool = pSelect2 as ITool;
        }
Esempio n. 7
0
        private void tsbDefault_Click(object sender, EventArgs e)
        {
            ITool    pTool = new ControlsSelectToolClass();
            ICommand pCmd  = pTool as ICommand;

            pCmd.OnCreate(ucHistoryMap1.AxMapCtrlHis.Object);
            ucHistoryMap1.AxMapCtrlHis.CurrentTool = pTool;
            pTool = new ControlsSelectToolClass();
            pCmd  = pTool as ICommand;
            pCmd.OnCreate(ucHistoryMap2.AxMapCtrlHis.Object);
            ucHistoryMap2.AxMapCtrlHis.CurrentTool = pTool;
        }
Esempio n. 8
0
        // 选择
        public static void Select(AxMapControl axMapControl)
        {
            if (axMapControl == null)
            {
                return;
            }
            ICommand pCommand;

            pCommand = new ControlsSelectToolClass();
            pCommand.OnCreate(axMapControl.Object);
            axMapControl.CurrentTool = (ITool)pCommand;
        }
Esempio n. 9
0
        private void barButtonItem13_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            ICommand pCommand = new ControlsSelectToolClass();
            ITool    pTool    = pCommand as ITool;

            switch (this.xtraTabControl1.SelectedTabPageIndex)
            {
            case 0:
                pCommand.OnCreate(this.mainMapControl.Object);
                this.mainMapControl.CurrentTool = pTool;
                break;

            case 1:
                pCommand.OnCreate(this.axPageLayoutControl.Object);
                this.axPageLayoutControl.CurrentTool = pTool;
                break;
            }
        }
 // 选择
 public static void Select(AxMapControl axMapControl)
 {
     if (axMapControl == null)
     {
         return;
     }
     ICommand pCommand;
     pCommand = new ControlsSelectToolClass();
     pCommand.OnCreate(axMapControl.Object);
     axMapControl.CurrentTool = (ITool)pCommand;
 }
Esempio n. 11
0
 private void btnDrawSelectElement_Click(object sender, EventArgs e)
 {
     this.drawBarCheckOnClick(((DevComponents.DotNetBar.ButtonItem)sender).Name);
     ICommand pCommand = new ControlsSelectToolClass();
     ITool pTool = pCommand as ITool;
     switch (this.tabControl.SelectedTabIndex)
     {
         case 0:
             pCommand.OnCreate(this.mainMapControl.Object);
             this.mainMapControl.CurrentTool = pTool;
             break;
         case 1:
             pCommand.OnCreate(this.axPageLayoutControl.Object);
             this.axPageLayoutControl.CurrentTool = pTool;
             break;
     }
 }
Esempio n. 12
0
 private void bubbleBtnSelectElement_Click(object sender, DevComponents.DotNetBar.ClickEventArgs e)
 {
     ICommand pCommand = new ControlsSelectToolClass();
     ITool pTool = pCommand as ITool;
     switch (this.tabControl.SelectedTabIndex)
     {
         case 0:
             pCommand.OnCreate(this.mainMapControl.Object);
             this.mainMapControl.CurrentTool = pTool;
             break;
         case 1:
             pCommand.OnCreate(this.axPageLayoutControl.Object);
             this.axPageLayoutControl.CurrentTool = pTool;
             break;
     }
 }
Esempio n. 13
0
        private void btnPointer_Click(object sender, EventArgs e)
        {
            UncheckAllButtons(sender);

            var cmd = new ControlsSelectToolClass();
            cmd.OnCreate(axMapControl1.Object);
            axMapControl1.CurrentTool = (ITool)cmd;
        }