Esempio n. 1
0
        private void EventUpdated(object sender, EventArgsArtwork e)
        {
            iMutex.WaitOne();

            for (int i = iStartIndex; i < iStartIndex + 2 && i < iPlaylist.Count; ++i)
            {
                upnpObject upnpObject = iPlaylist[i].DidlLite[0];
                Uri        uri        = DidlLiteAdapter.ArtworkUri(upnpObject);
                if (uri.AbsoluteUri == e.Artwork.Uri.AbsoluteUri)
                {
                    Invalidate();
                }
            }

            for (int i = iStartIndex; i < iStartIndex + 2 && i < iPresets.Count; ++i)
            {
                upnpObject upnpObject = iPresets[i].DidlLite[0];
                Uri        uri        = DidlLiteAdapter.ArtworkUri(upnpObject);
                if (uri.AbsoluteUri == e.Artwork.Uri.AbsoluteUri)
                {
                    Invalidate();
                }
            }

            iMutex.ReleaseMutex();
        }
Esempio n. 2
0
        public void EventArtworkDownloaded(object obj, EventArgsArtwork e)
        {
            if (e.Artwork.Uri.AbsoluteUri == iFlagUri)
            {
                if (iArtwork.Image != null)
                {
                    iFlag = iArtwork.Image;

                    if (EventArtworkUpdated != null)
                    {
                        EventArtworkUpdated(this, EventArgs.Empty);
                    }
                }

                iSupport.ArtworkCache.EventUpdated -= EventArtworkDownloaded;
            }
        }