Esempio n. 1
0
 public void StartDownload()
 {
     base.ExecuteMethod("StartDownload", delegate()
     {
         if (!string.IsNullOrEmpty(this.NewUrl))
         {
             _recentOperation = SDWebImageManager.SharedManager.Download(
                 new NSUrl(this.NewUrl),
                 0,
                 delegate(nint receivedSize, nint expectedSize) {
             },
                 this.CompleteDownload
                 );
         }
     });
 }
Esempio n. 2
0
        protected void CompleteDownload(UIImage image, NSError error, SDImageCacheType cacheType, bool finished, NSUrl imageUrl)
        {
            base.ExecuteMethod("CompleteDownload", delegate()
            {
                if (!finished)
                {
                    return;
                }
                if (imageUrl.ToString() == this.NewUrl)
                {
                    this.ImageView.Image = image;
                    _recentOperation     = null;
                    this.CurrentUrl      = imageUrl.ToString();

                    if (this.AfterImageDownloaded != null)
                    {
                        this.AfterImageDownloaded();
                    }
                }
            });
        }