Ejemplo n.º 1
0
        private void promoteCandidate()
        {
            candidatePromote = Clock.NULL_ALARM;

            if (currentTrack != null && currentTrack.PreLoadImage(callback) == true)
            {
                Image = currentTrack.Cover;
            }
            else
            {
                Image = null;
            }
        }
Ejemplo n.º 2
0
        private void promoteTemporaryCandidate()
        {
            while (promotingTemporaryCandidate)
            {
                System.Threading.Thread.Sleep(0);
            }

            promotingTemporaryCandidate = true;

            if (temporaryTrackCandidate != null)
            {
                bool?res = temporaryTrackCandidate.PreLoadImage(tempCallback);

                if (res == true)
                {
                    tempCallback(temporaryTrackCandidate);
                }
                else if (res == false)
                {
                    temporaryTrack = null;
                    this.Invalidate();
                }
                else // null
                {
                    temporaryTrackCandidate.PreLoadImage(tempCallback);
                }
            }
            else if (temporaryTrack != null)
            {
                temporaryTrack = null;
                this.Invalidate();
            }
            temporaryCandidatePromote = Clock.NULL_ALARM;
            temporaryTrackCandidate   = null;

            promotingTemporaryCandidate = false;
        }