Beispiel #1
0
        public void Initialize(MediaPlayer playerInstance = null)
        {
            pI          = (playerInstance != null) ? playerInstance : new MediaPlayer();
            pI.AutoPlay = true;
            repeatState  rState = repeatState.noRepeat;
            shuffleState sState = shuffleState.noShuffle;

            //pI.Source = testSong;
            currItemUpdater     = pI.SystemMediaTransportControls.DisplayUpdater;
            playlistItemUpdater = pI.SystemMediaTransportControls.DisplayUpdater;
        }
Beispiel #2
0
        public void ToggleOption(Option o)
        {
            switch (o)
            {
            case Option.Repeat: rState++; if ((int)rState > (Enum.GetNames(typeof(repeatState)).Length))
                {
                    rState = 0;
                }
                ; break;

            case Option.Shuffle: sState++; if ((int)sState > (Enum.GetNames(typeof(shuffleState)).Length))
                {
                    sState = 0;
                }
                ; break;

            default: throw new Exception("Invalid option is toggled");
            }
        }