Пример #1
0
        public static bool IsDragThresholdReached(this IUIInput input, IUIInput input2)
        {
            var minDragDist = getMiniumDragDistance(input.InputType);

            return
                (input.IsSameSource(input2) && input.IsValidPositionForLisView(true) &&
                 (
                     Math.Abs(input.Position.X - input2.Position.X) > minDragDist.Width ||
                     Math.Abs(input.Position.Y - input2.Position.Y) > minDragDist.Height
                 ));
        }
Пример #2
0
        public static bool IsWithin(this IUIInput input, IUIInput input2, double x, double y)
        {
            return
                (input.IsSameSource(input2) && input.IsValidPositionForLisView(true) &&

                 (
                     Math.Abs(input.Position.X - input2.Position.X) < x &&
                     Math.Abs(input.Position.Y - input2.Position.Y) < y
                 )
                );
        }
Пример #3
0
        public void UpdatInputReleased(IUIInput input)
        {
            //Console.WriteLine("UpdatInputReleased -" + input.ToString());
            if (input.IsSameSource(_startInput))
            {
                if (_isDragging && _dragState == DragState.Dragging)
                {
                    DragStoppedFunc(input);
                }
                _isDragging = false;
                _dragState  = DragState.Released;
            }

            //Console.WriteLine(String.Format("UpdatInputReleased - {0}", _dragState));
        }