Ejemplo n.º 1
0
            //
            // Mouse Down event handler
            //
            protected override void OnMouseDown(MouseEventArgs e)
            {
                base.OnMouseDown(e);

                var location = GetAbsolutePoint(e.Location);

                var args = new InternalPictureBoxMouseEventArgs(e.Button, e.Clicks, e.X, e.Y, location.X, location.Y, e.Delta);

                InterceptableMouseDown?.Invoke(this, args);

                // Event was handled
                if (args.Handled)
                {
                    return;
                }

                var findForm = FindForm();

                if (findForm != null)
                {
                    findForm.ActiveControl = this;
                }

                if (EditingEnabled && !AllowDrag)
                {
                    if (Image != null)
                    {
                        _currentPaintTool.MouseDown(e);
                    }
                }

                _mouseDown = true;
            }