public void superMouseDown(object sender, MouseEventArgs e, DRAWForm drawForm) { this.setDownPoint(new Point(e.X, e.Y)); this.setOldDragPoint(new Point(e.X, e.Y)); this.setNewDragPoint(new Point(e.X, e.Y)); this.mouseDown(sender, e, drawForm); }
public override void mouseDown(object sender, MouseEventArgs e, DRAWForm drawForm) { catchPointIndex = -1; if (this.getOperShape() != null) { this.getOperShape().setUnSelected(); } ArrayList allShapes = this.getRefDRAWPanel().getCurrentShapes(); int catchPoint = -1; int i = 0; for (; i < allShapes.Count; i++) { catchPoint = ((BaseShape)allShapes[i]).catchShapePoint(this.getOldDragPoint()); if (catchPoint > -1) { break; } } if (catchPoint > -1) { catchPointIndex = catchPoint; ((BaseShape)allShapes[i]).setSelected(); this.setOperShape(((BaseShape)allShapes[i])); } this.getRefDRAWPanel().Refresh(); }
public override void mouseDown(object sender, MouseEventArgs e, DRAWForm drawForm) { this.setOperShape(new EllipseShape()); this.getOperShape().setP1(this.getDownPoint()); this.getOperShape().penColor = drawForm.clr; this.getOperShape().penWidth = drawForm.lineWidth; this.getRefDRAWPanel().getCurrentShapes().Add(this.getOperShape()); }
public override void mouseDown(object sender, MouseEventArgs e, DRAWForm drawForm) { this.setOperShape(new ArcShape()); //新建一个线型对象 this.getOperShape().setP1(this.getDownPoint()); //设置起始点 this.getOperShape().penColor = drawForm.clr; //设置颜色 this.getOperShape().penWidth = drawForm.lineWidth; //设置线条宽度 /*在当前图形集合中添加这条图形*/ getRefDRAWPanel().getCurrentShapes().Add(this.getOperShape()); }
public void setRefDRAWPanel(DRAWForm refDRAWPanel) { this.refDRAWPanel = refDRAWPanel; }
public abstract void mouseDown(object sender, MouseEventArgs e, DRAWForm drawForm);