public override void OnMouseDown(MouseEventArgs e) { if (e.Button == MouseButtons.Left) { CC.ID = CC.GetNewID(); DrawRectangle w = new DrawRectangle(e.X, e.Y, 1, 1, Color.Red, CC.ID); this.AddNewObject(w); this.isNewObjectAdded = true; } }
//鼠标按下时触发的事件 public override void OnMouseDown(MouseEventArgs e) { if (e.Button == MouseButtons.Left) { CC.ID = CC.GetNewID(); DrawImage w = new DrawImage(e.X, e.Y, 10, 10, CC.bitmap, CC.ID); this.AddNewObject(w); this.isNewObjectAdded = true; } }
public override void OnMouseDown(MouseEventArgs e) { if (e.Button == MouseButtons.Left) { this.isNewObjectAdded = true; CC.ID = CC.GetNewID(); DrawText w = new DrawText(e.X, e.Y, CC.strText, CC.color, CC.ID); this.AddNewObject(w); CC.panel.Refresh(); } }
public override void OnMouseDown(MouseEventArgs e) { if (e.Button == MouseButtons.Left) { CC.ID = CC.GetNewID(); Point p = new Point(e.X, e.Y); DrawCurve w = new DrawCurve(p, Color.Red, 2, CC.ID); this.AddNewObject(w); myLastPoint = p; this.isNewObjectAdded = true; } }