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; } }
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); } } }
private void bntCurve_Click(object sender, EventArgs e) { isShape = IsShape.Curve; }
private void bntRamdow(object sender, EventArgs e) { isShape = IsShape.Pen; }
private void bntPolygon_Click(object sender, EventArgs e) { isShape = IsShape.Polygon; this.Cursor = Cursors.Cross; }
private void bntSquare_Click(object sender, EventArgs e) { isShape = IsShape.Square; this.Cursor = Cursors.Cross; }
private void bntCircle_Click(object sender, EventArgs e) { isShape = IsShape.Circle; this.Cursor = Cursors.Cross; }
private void bntEllipse_Click(object sender, EventArgs e) { isShape = IsShape.Ellipes; this.Cursor = Cursors.Cross; }