Ejemplo n.º 1
0
        private void PlayList_PlayStateChanged(object sender, MediaPlayerHelper.PlayStateChangedEventArg e)
        {
            var curr_media = this.PlayList.CurrentlyPlayingItem;

            if (curr_media != null)
            {
                if (curr_media.MediaType == MediaPlayerHelper.MediaType.Audio && this.ShowAudioModeUI)
                {
                    this.pbAudioDisplay.Enabled = true;
                    this.pbAudioDisplay.Visible = true;
                    this.pbAudioDisplay.Invalidate();
                }
                else
                {
                    this.pbAudioDisplay.Enabled = false;
                    this.pbAudioDisplay.Visible = false;
                }
            }
        }
Ejemplo n.º 2
0
        private void PlayList_PlayStateChanged(object sender, MediaPlayerHelper.PlayStateChangedEventArg e)
        {
            string media_title = this.GetCurrentMediaTitle();

            if (e.NewPlayState == MediaPlayerHelper.State.Playing)
            {
                this.SetHighlights($"Now Playing:{media_title}", Brushes.Green);
            }
            else if (e.NewPlayState == MediaPlayerHelper.State.Paused)
            {
                this.SetHighlights($"Paused:{media_title}", Brushes.Yellow);
            }
            else if (e.NewPlayState == MediaPlayerHelper.State.Stopped)
            {
                this.SetHighlights($"Stopped:{media_title}", Brushes.Red);
            }
            else
            {
                this.SetHighlights(null, Brushes.Red);
            }
        }
Ejemplo n.º 3
0
 private void MPlayList_PlayStateChanged(object sender, MediaPlayerHelper.PlayStateChangedEventArg e)
 {
     this.UpdateMediaItemsColor();
 }