Exemplo n.º 1
0
        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;
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
        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();
        }