예제 #1
0
        public bool HandleMouseDown(MouseEventArgs e)
        {
            var hit = _table.HitTest(e.X, e.Y);

            _currentOperation = _operations.Find(o => o.AppliesOnMouseDown(e, hit));

            if (_currentOperation == null)
            {
                return(false);
            }

            _operationAbortedOnMouseUp = true;
            return(true);
        }
예제 #2
0
        public bool HandleMouseMove(MouseEventArgs e)
        {
            if (_currentOperation == null)
            {
                return(false);
            }

            _operationAbortedOnMouseUp = !_currentOperation.OperationStarted();

            if (!_currentOperation.HandleMouseMove(e))
            {
                _currentOperation = null;
                return(false);
            }
            return(true);
        }