void fileServer_ImageLoaded(object sender, TileLoadResultEventArgs e)
 {
     if (e.Result == TileLoadResult.Success)
         ReportSuccess(e.Image, e.ID);
     else
         ReportFailure(e.ID);
 }
        private void sourceServer_ImageLoaded(object sender, TileLoadResultEventArgs e)
        {
            pendingImages.Remove(e.ID);

			if (e.Result == TileLoadResult.Failure)
				errorsCount++;
			else
				errorsCount = 0;

			if (errorsCount > errorsCountToSwitchToOffline && autoSwitchToOffline)
				Mode = TileSystemMode.CacheOnly;

            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. 3
0
        private void sourceServer_ImageLoaded(object sender, TileLoadResultEventArgs e)
        {
            pendingImages.Remove(e.ID);

            if (e.Result == TileLoadResult.Failure)
            {
                errorsCount++;
            }
            else
            {
                errorsCount = 0;
            }

            if (errorsCount > errorsCountToSwitchToOffline && autoSwitchToOffline)
            {
                Mode = TileSystemMode.CacheOnly;
            }

            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. 4
0
 protected override void OnTileLoaded(object sender, TileLoadResultEventArgs e)
 {
     if (e.Result == TileLoadResult.Success)
     {
         BeginInvalidateVisual();
     }
 }
        private void networkServer_ImageLoaded(object sender, TileLoadResultEventArgs e)
        {
            pendingImages.Remove(e.ID);

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

            if (saveToFileCache && e.Result == TileLoadResult.Success)
            {
                BeginSaveImage(e.ID, e.Image);
            }
            if (e.Result == TileLoadResult.Success)
            {
                networkFailures = 0;
                memoryServer.BeginSaveImage(e.ID, e.Image);
            }
            else
            {
                networkFailures++;
                if (autoSwitchToOffline && (networkFailures > maxConsequentNetworkFailuresToSwitchToOffline))
                {
                    Mode = TileSystemMode.CacheOnly;
                }
            }
            ImageLoaded.Raise(this, e);
        }
 protected override 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. 8
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);
        }
        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. 10
0
        protected virtual void OnTileLoaded(object sender, TileLoadResultEventArgs e)
        {
            if (e.Result == TileLoadResult.Success)
            {
                DataRect tileBounds = tileProvider.GetTileBounds(e.ID);

                bool intersectsWithVisible = visibleBounds.IntersectsWith(tileBounds);
                if (intersectsWithVisible && !invalidatePending && e.ID.Level <= tileProvider.Level)
                {
                    BeginInvalidateVisual();
                }
            }
        }
Esempio n. 11
0
		protected virtual void OnTileLoaded(object sender, TileLoadResultEventArgs e)
		{
			if (e.Result == TileLoadResult.Success)
			{
				Rect tileBounds = tileProvider.GetBounds(e.ID);

				bool intersectsWithVisible = visibleBounds.IntersectsWith(tileBounds);
				if (intersectsWithVisible && !invalidatePending && e.ID.Level <= tileProvider.Level)
				{
					BeginInvalidateVisual();
				}
			}
		}
Esempio n. 12
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. 13
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);
                }
            }
        }
        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);
        }
        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);
        }
		private void networkServer_ImageLoaded(object sender, TileLoadResultEventArgs e)
		{
			pendingImages.Remove(e.ID);

			bool saveToFileCache = !networkServer.CanLoadFast(e.ID) && saveToCache;
			if (saveToFileCache && e.Result == TileLoadResult.Success)
			{
				BeginSaveImage(e.ID, e.Image);
			}
			if (e.Result == TileLoadResult.Success)
			{
				networkFailures = 0;
				memoryServer.BeginSaveImage(e.ID, e.Image);
			}
			else
			{
				networkFailures++;
				if (autoSwitchToOffline && (networkFailures > maxConsequentNetworkFailuresToSwitchToOffline))
				{
					Mode = TileSystemMode.CacheOnly;
				}
			}
			ImageLoaded.Raise(this, e);
		}
Esempio n. 17
0
 private void memoryServer_ImageLoaded(object sender, TileLoadResultEventArgs e)
 {
     pendingImages.Remove(e.ID);
 }
 private void memoryServer_ImageLoaded(object sender, TileLoadResultEventArgs e)
 {
     pendingImages.Remove(e.ID);
 }
Esempio n. 19
0
		private void RaiseDataLoaded(TileLoadResultEventArgs args)
		{
			ImageLoaded.Raise(this, args);
		}
 private void RaiseDataLoaded(TileLoadResultEventArgs args)
 {
     ImageLoaded.Raise(this, args);
 }
Esempio n. 21
0
		private void RaiseImageLoaded(TileLoadResultEventArgs args)
		{
			if (ImageLoaded == null) { }

			ImageLoaded.Raise(this, args);
		}