示例#1
0
        public void MoveLeft(Rect rect)
        {
            var x = rect.Left - rect.Width;

            if (!AxisXConverter.IsInDataRagne(x, true)) //AxisXConverter.ScreenToData(x) < AxisPanel.StartTime
            {
                x = 0;
            }
            _currentPoint = new Point(x + rect.Width, rect.Y);
            _startPoint   = new Point(x, _currentPoint.Y);
        }
示例#2
0
        public bool TryMoveRight(Rect rect)
        {
            var x = rect.Left + rect.Width;

            if (!AxisXConverter.IsInDataRagne(x, true))//AxisPanel.EndTime <= AxisXConverter.ScreenToData(x)
            {
                return(false);
            }
            _startPoint   = new Point(x, rect.Y);
            _currentPoint = new Point(x + rect.Width, rect.Y);
            return(true);
        }