public void Update(RadioStation station) { Station = station; Label.StringValue = station?.Name ?? ""; ImageView.LoadFromItem(station); }
public void Update(Album album) { Album = album; Label.TopLabel.StringValue = album?.Name ?? ""; Label.BottomLabel.StringValue = album?.DetailText ?? ""; ImageView.LoadFromItem(album); }
public async void Update(Song song) { textView.TopLabel.StringValue = song?.Name ?? ""; textView.BottomLabel.StringValue = song?.DetailText ?? ""; textView.ResizeSubviewsWithOldSize(CGSize.Empty); SetThumbsState(song); //TODO: default album art; await AlbumArt.LoadFromItem(song); }
public static Task LoadFromItem(this NSImageView imageView, MediaItemBase item, NSImage defaultImage = null) { var width = (float)imageView.Bounds.Width; return(imageView.LoadFromItem(item, width, defaultImage)); }