private static bool IsScrollPoint(WinApi.POINT point) { var windowUnderCursor = WinApi.WindowFromPoint(point); return((_jsonConfig.Rectangles.Count > 0 && CheckPoint(point)) || (_jsonConfig.DesktopScroll && windowUnderCursor == _desktopWindow) || (_jsonConfig.TaskViewScroll && _taskViewButtons.Contains(windowUnderCursor))); }
private static bool CheckPoint(WinApi.POINT point) { return(_jsonConfig.Rectangles.Any(rectangle => point.x > rectangle.Left && point.x < rectangle.Right && point.y > rectangle.Top && point.y < rectangle.Bottom)); }