Exemple #1
0
        private void BasicCad_Form_MouseDown(object sender, MouseEventArgs e)
        {
            PointF cursPos = this.PointToClient(Cursor.Position);

            if (e.Button == MouseButtons.Left && tool_MoveDim.Checked)
            {
                if (!ShapeSystem.ActivateShapeUnderPoint <LinearDimension>(cursPos))
                {
                    ShapeSystem.DeselectActiveShapes();
                }
            }
            else if (e.Button == MouseButtons.Left)
            {
                if (!ShapeSystem.ActivateShapeUnderPoint(cursPos))
                {
                    ShapeSystem.DeselectActiveShapes();
                }
            }
            else if (e.Button == MouseButtons.Middle)
            {
                if (global_mousePan == null)
                {
                    this.Cursor     = Cursors.NoMove2D;
                    global_mousePan = mousePan.mousePanGrid(cursPos);
                }
            }
        }
Exemple #2
0
        private void BasicCad_Form_MouseUp(object sender, MouseEventArgs e)
        {
            PointF cursPos = this.PointToClient(Cursor.Position);

            if (global_mousePan != null)
            {
                global_mousePan.end = cursPos;
                global_mousePan     = null;
                this.Cursor         = Cursors.Default;
            }
            Invalidate();
        }