Ejemplo n.º 1
0
        private void ToggleMiniPlayerPlaylist(MiniPlayerType miniPlayerType, bool isPlaylistVisible)
        {
            if (isPlaylistVisible)
            {
                switch (miniPlayerType)
                {
                case MiniPlayerType.CoverPlayer:
                    this.activeMiniPlayerPlaylist = ActiveMiniPlayerPlaylist.CoverPlayer;
                    break;

                case MiniPlayerType.MicroPlayer:
                    this.activeMiniPlayerPlaylist = ActiveMiniPlayerPlaylist.MicroPlayer;
                    break;

                case MiniPlayerType.NanoPlayer:
                    this.activeMiniPlayerPlaylist = ActiveMiniPlayerPlaylist.NanoPlayer;
                    break;

                default:
                    break;
                    // Shouldn't happen
                }
            }
            else
            {
                this.activeMiniPlayerPlaylist = ActiveMiniPlayerPlaylist.None;
            }

            this.PlaylistVisibilityChangeRequested(this, new PlaylistVisibilityChangeRequestedEventArgs(isPlaylistVisible, miniPlayerType));
        }
Ejemplo n.º 2
0
        private void ToggleMiniPlayerPlaylist(MiniPlayerType miniPlayerType, bool openPlaylist)
        {
            switch (miniPlayerType)
            {
            case MiniPlayerType.CoverPlayer:
                this.activeMiniPlayerPlaylist = ActiveMiniPlayerPlaylist.CoverPlayer;
                break;

            case MiniPlayerType.MicroPlayer:
                this.activeMiniPlayerPlaylist = ActiveMiniPlayerPlaylist.MicroPlayer;
                break;

            case MiniPlayerType.NanoPlayer:
                this.activeMiniPlayerPlaylist = ActiveMiniPlayerPlaylist.NanoPlayer;
                break;

            default:
                break;
                // Shouldn't happen
            }

            if (openPlaylist)
            {
                this.miniPlayerPlaylist.Show(miniPlayerType);
            }
            else
            {
                this.miniPlayerPlaylist.Hide();
            }
        }