示例#1
0
 protected void SetAttributeIf(bool condition, TrackMediaAttributes attr)
 {
     if (condition)
     {
         MediaAttributes |= attr;
     }
 }
示例#2
0
        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);
        }
示例#3
0
        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);
            }
        }
示例#4
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);
            }
        }
示例#5
0
 public bool HasAttribute(TrackMediaAttributes attr)
 {
     return((MediaAttributes & attr) != 0);
 }
示例#6
0
 protected void SetAttributeIf(bool condition, TrackMediaAttributes attr)
 {
     if (condition) {
         MediaAttributes |= attr;
     }
 }
示例#7
0
 public bool HasAttribute(TrackMediaAttributes attr)
 {
     return (MediaAttributes & attr) != 0;
 }