Example #1
0
        private void ckbSelected_CheckedChanged(object sender, EventArgs e)
        {
            statusPaint.isStart = true;
            this.plMain.Refresh();
            this.Cursor = Cursors.Default;
            //plMain.Cursor = Cursors.Default;
            if (ckbSelected.Checked == true)
            {
                statusPaint.isNotDrawing    = true;
                statusPaint.isSelectedShape = true;
                isShape = IsShape.Non;
            }

            else

            {
                statusPaint.isNotDrawing    = false;
                statusPaint.isSelectedShape = false;
                lShape.ForEach(shape =>
                               { shape.isSelected = false; });
                this.plMain.Refresh();

                statusPaint.isStart = false;
            }
        }
Example #2
0
        private void plMain_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            if (statusPaint.isNotDrawing == false)

            {
                if (isShape == IsShape.Polygon)
                {
                    isShape = IsShape.Non;
                    Polygon temp = lShape[lShape.Count - 1] as Polygon;
                    temp.lPoint.RemoveAt(temp.lPoint.Count - 1);
                    this.plMain.Refresh();
                    statusPaint.isStart       = false;
                    statusPaint.isDrawPolygon = false;
                    this.Cursor = Cursors.Default;
                    FindRegion.setPolygonPointFirstEnd(temp);
                }

                if (isShape == IsShape.Curve)
                {
                    isShape = IsShape.Non;
                    Curve temp = lShape[lShape.Count - 1] as Curve;
                    temp.lPoint.RemoveAt(temp.lPoint.Count - 1);
                    this.plMain.Refresh();
                    statusPaint.isStart       = false;
                    statusPaint.isDrawPolygon = false;
                    this.Cursor = Cursors.Default;
                    FindRegion.setCurvePointFirstEnd(temp);
                }
            }
        }
Example #3
0
 private void bntCurve_Click(object sender, EventArgs e)
 {
     isShape = IsShape.Curve;
 }
Example #4
0
 private void bntRamdow(object sender, EventArgs e)
 {
     isShape = IsShape.Pen;
 }
Example #5
0
 private void bntPolygon_Click(object sender, EventArgs e)
 {
     isShape     = IsShape.Polygon;
     this.Cursor = Cursors.Cross;
 }
Example #6
0
 private void bntSquare_Click(object sender, EventArgs e)
 {
     isShape     = IsShape.Square;
     this.Cursor = Cursors.Cross;
 }
Example #7
0
 private void bntCircle_Click(object sender, EventArgs e)
 {
     isShape     = IsShape.Circle;
     this.Cursor = Cursors.Cross;
 }
Example #8
0
 private void bntEllipse_Click(object sender, EventArgs e)
 {
     isShape     = IsShape.Ellipes;
     this.Cursor = Cursors.Cross;
 }