Ejemplo n.º 1
0
        protected override CityEntity[] HandleWindowOrCross()
        {
            Point    p1     = _draggingStartPoint;
            Point    p2     = _draggingEndPoint;
            Extent2D extent = new Extent2D(DisplayManager.Current.CityCoordinate(p1.X, p1.Y), DisplayManager.Current.CityCoordinate(p2.X, p2.Y));

            return(DisplayManager.Current.CityModel.CitySpots.Where(x => extent.IsPointIn(x.Position)).ToArray());
        }
 private static List <Point2D> GetPointsInExtents(IEnumerable <Point2D> points, Extent2D extents)
 {
     return(points.Where(p => extents.IsPointIn(p)).ToList());
 }