Esempio n. 1
0
        private bool StartResizeOperation(MouseEventArgs e)
        {
            if (_resizeSource != null)
            {
                if (_resizeSource.CanResize(this))
                {
                    if (_resizeSource.StartResizeOperation(this, ref _boundary))
                    {
                        // Reset the last rectangle draw
                        _lastRect = Rectangle.Empty;

                        // Record the starting screen position
                        _pointStart = PointToScreen(new Point(e.X, e.Y));

                        // Record the current position being drawn
                        _pointCurrent = _pointStart;

                        // Draw the starting position
                        DrawResizeIndicator(_pointCurrent);

                        return(true);
                    }
                }
            }

            return(false);
        }