Esempio n. 1
0
 protected virtual void OnTileLoaded(object sender, TileLoadResultEventArgs e)
 {
     if (e.Result == TileLoadResult.Success)
     {
         BeginInvalidateVisual();
     }
 }
        private void RaiseImageLoaded(TileLoadResultEventArgs args)
        {
            if (ImageLoaded == null)
            {
            }

            ImageLoaded.Raise(this, args);
        }
Esempio n. 3
0
        private void fileServer_ImageLoaded(object sender, TileLoadResultEventArgs e)
        {
            pendingImages.Remove(e.ID);

            if (e.Result == TileLoadResult.Success)
            {
                memoryServer.BeginSaveImage(e.ID, e.Image, e.Stream);
            }

            ImageLoaded.Raise(this, e);
        }
Esempio n. 4
0
        protected virtual void OnTileLoaded(object sender, TileLoadResultEventArgs e)
        {
            if (e.Result == TileLoadResult.Success)
            {
                DataRect tileBounds = tileProvider.GetTileBounds(e.ID);

                bool containsInDrawn = drawnBounds.Contains(tileBounds) || drawnBounds.IsEmpty;
                bool shouldDraw      = containsInDrawn && !invalidatePending && e.ID.Level <= tileProvider.Level;
                if (shouldDraw)
                {
                    DrawImage(e.Image, tileBounds, e.ID);
                }
            }
        }
Esempio n. 5
0
        private void sourceServer_ImageLoaded(object sender, TileLoadResultEventArgs e)
        {
            pendingImages.Remove(e.ID);

            bool saveToFileCache = !sourceServer.CanLoadFast(e.ID) && saveToCache;

            if (saveToFileCache && e.Result == TileLoadResult.Success)
            {
                BeginSaveImage(e.ID, e.Image, e.Stream);
            }
            if (e.Result == TileLoadResult.Success)
            {
                memoryServer.BeginSaveImage(e.ID, e.Image, e.Stream);
            }
            else
            {
                latestFailuredId = e.ID;
            }
            ImageLoaded.Raise(this, e);
        }
Esempio n. 6
0
 private void memoryServer_ImageLoaded(object sender, TileLoadResultEventArgs e)
 {
     pendingImages.Remove(e.ID);
 }