Example #1
0
        /// <summary>
        /// Occurs when this command is clicked
        /// </summary>
        public override void OnClick()
        {
            // TODO: Add MapIdentifyCommand.OnClick implementation

            CheckApplication.m_UCDataMap.CurActivityMapControl.CurrentTool = null;
            mapTool = null;
            switch (m_nsubtype)
            {
                case 1:  //identify
                    {
                        Identify identifyTool = new Identify();
                        identifyTool.OnCreate(CheckApplication.m_UCDataMap.CurActivityMapControl.Object);
                        CheckApplication.m_UCDataMap.CurActivityMapControl.CurrentTool = (ITool)identifyTool;
                        break;
                    }
                case 2:  //�Ŵ�
                    {
                        if (mapTool == null)
                        {
                            mapTool = new ControlsMapZoomInToolClass();
                            CreateTool(false);
                        }
                        break;
                    }
                case 3:  //��С
                    {
                        if (mapTool == null)
                            mapTool = new ControlsMapZoomOutToolClass();
                        CreateTool(false);
                        break;
                    }
                case 4:  //ȫͼ
                    {
                        //if (mapTool == null)
                        //    mapTool = new ControlsMapFullExtentCommand();
                        //CreateTool(true);

                        FullView();

                        break;
                    }
                case 5:  //����
                    {
                        if (mapTool == null)
                            mapTool = new ControlsMapPanToolClass();
                        CreateTool(false);
                        break;
                    }
                case 6:  //ǰһ��ͼ
                    {
                        if (mapTool == null)
                            mapTool = new ControlsMapZoomToLastExtentForwardCommandClass();
                        CreateTool(true);
                        break;
                    }
                case 7:  //��һ��ͼ
                    {
                        if (mapTool == null)
                            mapTool = new ControlsMapZoomToLastExtentBackCommandClass();
                        CreateTool(true);
                        break;
                    }
            }
        }
Example #2
0
        /// <summary>
        /// Occurs when this command is clicked
        /// </summary>
        public override void OnClick()
        {
            // TODO: Add MapIdentifyCommand.OnClick implementation

            CheckApplication.m_UCDataMap.CurActivityMapControl.CurrentTool = null;
            mapTool = null;
            switch (m_nsubtype)
            {
            case 1:      //identify
            {
                Identify identifyTool = new Identify();
                identifyTool.OnCreate(CheckApplication.m_UCDataMap.CurActivityMapControl.Object);
                CheckApplication.m_UCDataMap.CurActivityMapControl.CurrentTool = (ITool)identifyTool;
                break;
            }

            case 2:      //放大
            {
                if (mapTool == null)
                {
                    mapTool = new ControlsMapZoomInToolClass();
                    CreateTool(false);
                }
                break;
            }

            case 3:      //缩小
            {
                if (mapTool == null)
                {
                    mapTool = new ControlsMapZoomOutToolClass();
                }
                CreateTool(false);
                break;
            }

            case 4:      //全图
            {
                //if (mapTool == null)
                //    mapTool = new ControlsMapFullExtentCommand();
                //CreateTool(true);

                FullView();

                break;
            }

            case 5:      //漫游
            {
                if (mapTool == null)
                {
                    mapTool = new ControlsMapPanToolClass();
                }
                CreateTool(false);
                break;
            }

            case 6:      //前一视图
            {
                if (mapTool == null)
                {
                    mapTool = new ControlsMapZoomToLastExtentForwardCommandClass();
                }
                CreateTool(true);
                break;
            }

            case 7:      //后一视图
            {
                if (mapTool == null)
                {
                    mapTool = new ControlsMapZoomToLastExtentBackCommandClass();
                }
                CreateTool(true);
                break;
            }
            }
        }