Beispiel #1
0
 private void AddCacheHandler(AndroidImageCache aImageCache)
 {
     lock (iLockObject)
     {
         Assert.Check(iImageCache == null);
         iImageCache = aImageCache;
         iImageCache.EventImageAdded       += ImageAddedHandler;
         iImageCache.EventRequestCancelled += RequestCancelledHandler;
         iImageCache.EventRequestFailed    += RequestFailedHandler;
     }
 }
Beispiel #2
0
 public void LoadImage(AndroidImageCache aImageCache, Uri aUri)
 {
     lock (iLockObject)
     {
         RemoveCacheHandler();
         Assert.Check(aUri != null);
         Assert.Check(aImageCache != null);
         Assert.Check(!aImageCache.Invoker.InvokeRequired);
         AddCacheHandler(aImageCache);
         iUri = aUri.OriginalString;
         IImage <Bitmap> image = aImageCache.Image(iUri);
         if (image != null && !iDisposed)
         {
             SetImage(image);
         }
     }
 }