private void OfferToLoadCd(string cdDirectory)
        {
            var msg      = string.Format("A new Audio CD ({0}) has been detected, would you like to play it?", cdDirectory);
            var response = MessageBox.Show(msg, "Audio CD Detected", MessageBoxButton.YesNo, MessageBoxImage.Information);

            if (response == MessageBoxResult.Yes)
            {
                _audioPlaylist.LoadPlaylistFromList(Tracks);

                SendNotificationMessage(NotificationMessages.AudioPlaylistLoadedNewTracks);
            }
        }
        private void DoLoadTrack(ITrack track)
        {
            _audioPlaylist.LoadPlaylistFromList(_tracks, false);
            _audioPlaylist.SkipToTrack(track);

            SendNotificationMessage(NotificationMessages.AudioPlaylistLoadedNewTracks);
        }
예제 #3
0
        private void DoPlayFile()
        {
            var dialogResult = _selectFileDialog.ShowDialog();

            if (dialogResult != DialogResult.OK)
            {
                return;
            }

            var fileName = _selectFileDialog.FileName;
            var track = Track.BuildTrackInstance(fileName);

            _audioPlaylist.LoadPlaylistFromList(new List<ITrack> { track });

            SendNotificationMessage(NotificationMessages.AudioPlaylistLoadedNewTracks);
        }
예제 #4
0
        private void DoLoadArtist(Artist artist)
        {
            var tracks = _musicLibrary.GetTracksForArtist(artist);

            _audioPlaylist.LoadPlaylistFromList(tracks);

            SendNotificationMessage(NotificationMessages.AudioPlaylistLoadedNewTracks);
        }
예제 #5
0
        private void DoLoadAlbum(Album album)
        {
            var tracks = _musicLibrary.GetTracksForAlbum((LibraryAlbum)album.Data);

            _audioPlaylist.LoadPlaylistFromList(tracks);

            SendNotificationMessage(NotificationMessages.AudioPlaylistLoadedNewTracks);
        }
예제 #6
0
        private void DoPlayAudioCd()
        {
            var audioCdDrive = BrowseForAudioCdDrive();

            if (string.IsNullOrEmpty(audioCdDrive))
            {
                return;
            }

            var tracks = _musicLibrary.GetTracksForDirectory(audioCdDrive, false);

            _audioPlaylist.LoadPlaylistFromList(tracks);

            SendNotificationMessage(NotificationMessages.AudioPlaylistLoadedNewTracks);
        }