Exemple #1
0
        protected override void OnDragCancelled()
        {
            _dragging = false;

            using (DesktopGraphics graphics = new DesktopGraphics())
            {
                if (_rectangleDrag != null)
                {
                    _rectangleDrag.End(graphics);
                    _rectangleDrag.Dispose();
                    _rectangleDrag = null;
                }
            }

            SetCursor(null);

            base.OnDragCancelled();
        }
Exemple #2
0
        public Rectangle End()
        {
            Rectangle result;

            using (DesktopGraphics graphics = new DesktopGraphics())
            {
                result = _drag.End(graphics);
            }

            _drag.Dispose();
            _drag = null;

            _setCursor.Dispose();
            _setCursor = null;

            return(result);
        }