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 ); } }); }
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(); } } }); }