Example #1
0
        protected override void OnMouseUp(MouseEventArgs e)
        {
            if (!isDrawRectAreaCreated && e.Button == MouseButtons.Left)
            {
                if (this.firstStartPoint.X == e.X || this.firstStartPoint.Y == e.Y)
                {
                    return;
                }

                firstEndPoint = new Point(e.X, e.Y);
                drawRect      = new DrawAreaRectangle(firstStartPoint.X, firstStartPoint.Y, firstEndPoint.X - firstStartPoint.X, firstEndPoint.Y - firstStartPoint.Y);
                drawRect.Draw(g);
                drawRect.Selected = true;
                drawRect.DrawTracker(g);

                isDrawRectAreaCreated = true;

                this.Refresh();
            }

            if (HasDrawRectangleArea)
            {
                ResizeDrawArea();
                this.toolStripPanel.Visible = true;
                this.myColorPicker.Visible  = IsCurrentCommandNeedColorPicker();
            }

            base.OnMouseUp(e);
        }
Example #2
0
        protected override void OnMouseUp(MouseEventArgs e)
        {
            if (!isDrawRectAreaCreated && e.Button == MouseButtons.Left)
            {
                if (this.firstStartPoint.X == e.X || this.firstStartPoint.Y == e.Y)
                {
                    return;
                }

                firstEndPoint = new Point(e.X, e.Y);
                drawRect = new DrawAreaRectangle(firstStartPoint.X, firstStartPoint.Y, firstEndPoint.X - firstStartPoint.X, firstEndPoint.Y - firstStartPoint.Y);
                drawRect.Draw(g);
                drawRect.Selected = true;
                drawRect.DrawTracker(g);

                isDrawRectAreaCreated = true;

                this.Refresh();
            }

            if (HasDrawRectangleArea)
            {
                ResizeDrawArea();
                this.toolStripPanel.Visible = true;
                this.myColorPicker.Visible = IsCurrentCommandNeedColorPicker();
            }

            base.OnMouseUp(e);
        }
Example #3
0
 void DrawCropArea(Graphics g)
 {
     drawRect.Draw(g);
     drawRect.Selected = true;
     drawRect.DrawTracker(g);
 }