public override void OnMouseDown(MouseEventArgs e) { base.OnMouseDown(e); CC.ID = CC.GetNewID(); DrawText w = new DrawText(e.X, e.Y, CC.textInfo.text, CC.textInfo.color, CC.ID); AddNewObject(w); isNewObjectAdded = true; }
public override DrawObject Clone() { DrawText w = new DrawText(); w.font = this.font; w.text = this.text; w.startPoint = this.startPoint; w.endPoint = this.endPoint; w.angle = this.angle; return(w); }
public override void OnMouseMove(MouseEventArgs e) { if (isNewObjectAdded == false) { return; } Point point = new Point(e.X, e.Y); int index = CC.FindObjectIndex(CC.ID); if (e.Button == MouseButtons.Left) { DrawText w = (DrawText)CC.graphicsList[index]; w.MoveHandleTo(point, 2); } CC.panel.Refresh(); }