Exemplo n.º 1
0
        public override void OnMouseDown(int button, int shift, int x, int y, double mapX, double mapY)
        {
            // TODO:  添加 DrawCircle3P.OnMouseDown 实现
            base.OnMouseDown(button, shift, x, y, mapX, mapY);

            m_pStatusBarService.SetStateMessage("依次指定:圆周上三点。(A:绝对XY/R:相对XY/P:平行尺/ESC:取消/ENTER:结束/+shift:修改坐标)");            //向状态栏传送提示信息

            m_CurrentLayer = ((IDFApplication)this.Hook).CurrentEditLayer;


            //内容菜单
            if (button == 2)
            {
                //记录点的坐标,用于平行尺功能
                m_BeginConstructParallelPoint = m_pAnchorPoint;

                toolbarsManagerToolsEnabledOrNot();
                m_editContextMenu.ActiveEditContextMenu("drawPopupMenuTool", WSGRI.DigitalFactory.Gui.DefaultWorkbench.ActiveForm);

                return;
            }
            //检查点是否超出地图范围
            if (CommonFunction.PointIsOutMap(m_CurrentLayer, m_pAnchorPoint) == true)
            {
                DrawCircle3PMouseDown(m_pAnchorPoint, shift);
            }
            else
            {
                MessageBox.Show("超出地图范围");
            }
        }
Exemplo n.º 2
0
        public override void OnMouseDown(int button, int shift, int x, int y, double mapX, double mapY)
        {
            // TODO:  添加 DrawBeizerCurve.OnMouseDown 实现
            base.OnMouseDown(button, shift, x, y, mapX, mapY);

            m_pStatusBarService.SetStateMessage("提示:U:回退/A:绝对XY/R:相对XY/N:左折角/O:方位角/F:长度+方向/D:长度/P:平行尺/S:直角.../C:封闭结束/Enter:结束/ESC:取消");            //向状态栏传送提示信息

            m_CurrentLayer = ((IDFApplication)this.Hook).CurrentEditLayer;

            //内容菜单
            if (button == 2)
            {
                //记录点的坐标,用于平行尺功能
                m_BeginConstructParallelPoint = m_pAnchorPoint;

                toolbarsManagerToolsEnabledOrNot();
                m_editContextMenu.ActiveEditContextMenu("drawPopupMenuTool", WSGRI.DigitalFactory.Gui.DefaultWorkbench.ActiveForm);

                return;
            }
            //检查点是否超出地图范围
            if (CommonFunction.PointIsOutMap(m_CurrentLayer, m_pAnchorPoint) == true)
            {
                DrawBezierCurveMouseDown(m_pAnchorPoint);
            }
            else
            {
                MessageBox.Show("超出地图范围");
            }
        }