Example #1
0
        public override C1GradientBrush GetBrush()
        {
            var brush  = new C1RadialBrush();
            var center = new C1.Win.Interop.Point(gceCenter.GradientCenter.X / 100d, gceCenter.GradientCenter.Y / 100d);

            brush.Center = center;
            return(brush);
        }
 private C1.Win.Map.VectorItem FindShop(C1.Win.Interop.Point point, C1.Win.Map.VectorLayer layer)
 {
     foreach (C1.Win.Map.VectorPlacemark mark in layer.Items)
     {
         var p = mark.Geometry.Center;
         if (Math.Abs(p.X - point.X) < 1 && Math.Abs(p.Y - point.Y) < 1)
         {
             return(mark);
         }
     }
     return(null);
 }
Example #3
0
        public IEnumerable <VectorItem> Request(double minZoom, double maxZoom, C1.Win.Interop.Point lowerLeft, C1.Win.Interop.Point upperRight)
        {
            if (minZoom < MinStoreZoom)
            {
                return(null);
            }

            return((from store in _dataBase.Stores
                    where store.Latitude > lowerLeft.Y &&
                    store.Longitude > lowerLeft.X &&
                    store.Latitude <= upperRight.Y &&
                    store.Longitude <= upperRight.X
                    select new C1.Win.Map.VectorPlacemark
            {
                Geometry = new GeoPoint(store.Longitude, store.Latitude),
                Marker = _marker
            }).Cast <VectorItem>().ToList());
        }