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); }
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); }
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); }
private void RaiseImageLoaded(TileLoadResultEventArgs args) { if (ImageLoaded == null) { } ImageLoaded.Raise(this, args); }
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); }
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(); } } }
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(); } } }
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 memoryServer_ImageLoaded(object sender, TileLoadResultEventArgs e) { pendingImages.Remove(e.ID); }
private void RaiseDataLoaded(TileLoadResultEventArgs args) { ImageLoaded.Raise(this, args); }