protected void SetAttributeIf(bool condition, TrackMediaAttributes attr) { if (condition) { MediaAttributes |= attr; } }
public void LoadImage(TrackMediaAttributes attr, string artwork_id) { if (Pixbuf != null) { Pixbuf.Dispose(); } Pixbuf = ServiceManager.Get <ArtworkManager> ().LookupScalePixbuf(artwork_id, HeightRequest) ?? IconThemeUtils.LoadIcon("audiobook", HeightRequest); }
protected void LoadImage(TrackMediaAttributes attr, string artwork_id, bool force) { if (current_artwork_id != artwork_id || force) { current_artwork_id = artwork_id; if (current_image != incoming_image) { Unref(ref incoming_image); } incoming_image = artwork_manager.LookupScaleSurface(artwork_id, ArtworkSizeRequest); } if (incoming_image == null) { incoming_image = MissingImage((attr & TrackMediaAttributes.VideoStream) != 0); } }
protected void LoadImage(TrackMediaAttributes attr, string artwork_id, bool force) { if (current_artwork_id != artwork_id || force) { current_artwork_id = artwork_id; if (incoming_image != null && current_image != incoming_image && !IsMissingImage (incoming_image)) { ((IDisposable)incoming_image).Dispose (); } incoming_image = artwork_manager.LookupScaleSurface (artwork_id, ArtworkSizeRequest); } if (incoming_image == null) { incoming_image = MissingImage ((attr & TrackMediaAttributes.VideoStream) != 0); } }
public bool HasAttribute(TrackMediaAttributes attr) { return((MediaAttributes & attr) != 0); }
public bool HasAttribute(TrackMediaAttributes attr) { return (MediaAttributes & attr) != 0; }