Exemplo n.º 1
0
        protected override void OnParentMouseDown(object sender, MouseButtonEventArgs e)
        {
            if (e.LeftButton != MouseButtonState.Pressed)
            {
                return;
            }

            _startPoint = e.GetPosition(this);
            _lastPoint  = _startPoint;

            if (!BlockConverter.CanConvert(PointOutBlock))
            {
                return;
            }

            _canMove = PointOutBlock != null && !BlockConverter.GetLocked(PointOutBlock);

            if (_canMove)
            {
                StartMouseMovementTracking();
                var date    = AxisXConverter.ScreenToData(0);
                var newDate = date.Add(StepMin);
                _stepMinDistance = AxisXConverter.DataToScreen(newDate);
            }
        }
Exemplo n.º 2
0
        private bool CanScale()
        {
            if (PointOutBlock == null)
            {
                return(false);
            }

            return(BlockConverter.CanConvert(PointOutBlock) && !BlockConverter.GetLocked(PointOutBlock));
        }