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 )); }
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 ) ); }
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)); }