コード例 #1
0
 void fileServer_ImageLoaded(object sender, TileLoadResultEventArgs e)
 {
     if (e.Result == TileLoadResult.Success)
         ReportSuccess(e.Image, e.ID);
     else
         ReportFailure(e.ID);
 }
コード例 #2
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);
        }
コード例 #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);
        }
コード例 #4
0
 protected override void OnTileLoaded(object sender, TileLoadResultEventArgs e)
 {
     if (e.Result == TileLoadResult.Success)
     {
         BeginInvalidateVisual();
     }
 }
コード例 #5
0
        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);
        }
コード例 #6
0
 protected override void OnTileLoaded(object sender, TileLoadResultEventArgs e)
 {
     if (e.Result == TileLoadResult.Success)
     {
         BeginInvalidateVisual();
     }
 }
コード例 #7
0
        private void RaiseImageLoaded(TileLoadResultEventArgs args)
        {
            if (ImageLoaded == null)
            {
            }

            ImageLoaded.Raise(this, args);
        }
コード例 #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);
        }
コード例 #9
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);
        }
コード例 #10
0
ファイル: Map.cs プロジェクト: gr001/PeaksProcessing2
        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();
                }
            }
        }
コード例 #11
0
ファイル: Map.cs プロジェクト: elsiete/DynamicDataDisplay
		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();
				}
			}
		}
コード例 #12
0
ファイル: NewMap.cs プロジェクト: gr001/PeaksProcessing2
        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);
                }
            }
        }
コード例 #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);
                }
            }
        }
コード例 #14
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);
        }
コード例 #15
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);
        }
コード例 #16
0
		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);
		}
コード例 #17
0
 private void memoryServer_ImageLoaded(object sender, TileLoadResultEventArgs e)
 {
     pendingImages.Remove(e.ID);
 }
コード例 #18
0
 private void memoryServer_ImageLoaded(object sender, TileLoadResultEventArgs e)
 {
     pendingImages.Remove(e.ID);
 }
コード例 #19
0
		private void RaiseDataLoaded(TileLoadResultEventArgs args)
		{
			ImageLoaded.Raise(this, args);
		}
コード例 #20
0
 private void RaiseDataLoaded(TileLoadResultEventArgs args)
 {
     ImageLoaded.Raise(this, args);
 }
コード例 #21
0
		private void RaiseImageLoaded(TileLoadResultEventArgs args)
		{
			if (ImageLoaded == null) { }

			ImageLoaded.Raise(this, args);
		}