private async void LoadData() { try { playButton.Enabled = false; var cs = new ContentService(); this.Entries = await cs.GetEntriesByArea(Show.ID); this.listView.ReloadData(); // if (!string.IsNullOrEmpty(Show.BannerImage)) { var byteData = await ContentService.DownloadImageArrayAsync(Show.BannerImage); this.bannerImage.Image = UIImage.LoadFromData(NSData.FromArray(byteData)); UIView.Animate(1, () => { showTitleLabel.Alpha = 0; bannerImage.Alpha = 1; }, null); } // } finally { focusListView = true; SetNeedsFocusUpdate(); UpdateFocusIfNeeded(); playButton.Enabled = true; } }
private async void LoadImage() { if (!String.IsNullOrEmpty(Entry.VideoPlayerPreviewImage)) { var byteImage = await ContentService.DownloadImageArrayAsync(Entry.VideoPlayerPreviewImage); largeImage.Image = UIImage.LoadFromData(NSData.FromArray(byteImage)); } }
public async void Configure(Area show) { this.nameLabel.Text = show.DisplayName; this.dateLabel.Text = show.MostRecentEntry.ToString("dd-MM"); imageView.Image = null; var byteImage = await ContentService.DownloadImageArrayAsync(show.WidescreenThumbnailImage ?? show.ThumbnailImage); imageView.Image = UIImage.LoadFromData(NSData.FromArray(byteImage)); }
public async void Configure(Entry episode) { thumbnailImage.ClipsToBounds = true; thumbnailImage.Layer.CornerRadius = 15; // titleLabel.Text = episode.Title; summaryLabel.Text = episode.NoHTMLBody; thumbnailImage.Image = null; var byteImage = await ContentService.DownloadImageArrayAsync(episode.MediumThumbnail); thumbnailImage.Image = UIImage.LoadFromData(NSData.FromArray(byteImage)); }
public async void Configure(Session session) { titleLabel.Text = session.Title; tagsLabel.Text = session.TagsText; speakersLabel.Text = session.SpeakersText; if (!String.IsNullOrEmpty(session.FeaturedImage)) { var bytes = await ContentService.DownloadImageArrayAsync(session.FeaturedImage); thumbnailImage.Image = UIImage.LoadFromData(NSData.FromArray(bytes)); } else { thumbnailImage.Image = UIImage.FromBundle("noimage"); } }
public async void Configure(IPlayableItem featured) { labelCaption.Text = $"Rating: {featured.Rating.ToString("N2")}"; labelDescription.Text = featured.Title; // imageView.Image = null; if (String.IsNullOrEmpty(featured.ThumbnailImage)) { imageView.Image = UIImage.FromBundle("noimage"); } else { var byteImage = await ContentService.DownloadImageArrayAsync(featured.ThumbnailImage); imageView.Image = UIImage.LoadFromData(NSData.FromArray(byteImage)); } }
public async void Configure(Event evento) { // titleLabel.Text = evento.DisplayName; imageView.Image = null; var imageUrl = evento.WidescreenThumbnailImage ?? (evento.ThumbnailImage ?? evento.SmallThumbnailImage); if (String.IsNullOrEmpty(imageUrl)) { imageView.Image = UIImage.FromBundle("noimage"); } else { var byteImage = await ContentService.DownloadImageArrayAsync(imageUrl); imageView.Image = UIImage.LoadFromData(NSData.FromArray(byteImage)); } }
private async void LoadData() { titleLabel.Text = CurrentEvent.DisplayName; var cs = new ContentService(); var sessiones = await cs.GetSessions(CurrentEvent); Sessions = new List <Session>(sessiones.OrderBy(s => s.Starts)); EventDates = Sessions.Select(s => s.Starts.GetValueOrDefault().Date).Distinct().ToList(); tableView.ReloadData(); if (!string.IsNullOrEmpty(CurrentEvent.BannerImage)) { var byteData = await ContentService.DownloadImageArrayAsync(CurrentEvent.BannerImage); this.bannerImage.Image = UIImage.LoadFromData(NSData.FromArray(byteData)); UIView.Animate(1, () => { titleLabel.Alpha = 0; bannerImage.Alpha = 1; }, null); } }