Exemplo n.º 1
0
        private void Play(IEnumerable <MusicFile> musicFiles)
        {
            var playlistItems = musicFiles.Select(x => new PlaylistItem(x)).ToArray();

            PlaylistManager.AddAndReplaceItems(playlistItems);
            PlaylistManager.CurrentItem = playlistItems.First();
            playerService.Play();
            shellService.ShowPlaylistView();
        }
Exemplo n.º 2
0
        public void ShowDetailViewsTest()
        {
            var view = Container.GetExportedValue <MockShellView>();

            Assert.IsTrue(view.IsVisible);

            var viewModel = Container.GetExportedValue <ShellViewModel>();

            Assert.IsFalse(viewModel.IsMusicPropertiesViewVisible);
            Assert.IsTrue(viewModel.IsPlaylistViewVisible);
            Assert.IsFalse(viewModel.IsTranscodingListViewVisible);


            shellService.ShowMusicPropertiesView();
            Assert.IsTrue(viewModel.IsMusicPropertiesViewVisible);
            Assert.IsFalse(viewModel.IsPlaylistViewVisible);
            Assert.IsFalse(viewModel.IsTranscodingListViewVisible);

            shellService.ShowTranscodingListView();
            Assert.IsFalse(viewModel.IsMusicPropertiesViewVisible);
            Assert.IsFalse(viewModel.IsPlaylistViewVisible);
            Assert.IsTrue(viewModel.IsTranscodingListViewVisible);

            shellService.ShowPlaylistView();
            Assert.IsFalse(viewModel.IsMusicPropertiesViewVisible);
            Assert.IsTrue(viewModel.IsPlaylistViewVisible);
            Assert.IsFalse(viewModel.IsTranscodingListViewVisible);
        }