Beispiel #1
0
        public void AddPlaylist()
        {
            string m_newPlaylist = "Playlist " + (PlayLists.Count + 1);

            PlayLists.Add(new PlaylistViewModel {
                Title = m_newPlaylist
            });
        }
Beispiel #2
0
 public void LoadPlaylists()
 {
     PlayLists.Clear();
     foreach (var playlist in MusicManager.Instance.PlayLists)
     {
         PlayLists.Add(playlist);
     }
 }
Beispiel #3
0
        private void AddPlayList()
        {
            var newPlayList = "PlayList" + (PlayLists.Count + 1);

            PlayLists.Add(new PlayListViewModel {
                Title = newPlayList
            });
        }
Beispiel #4
0
        public async void GetPlayListsAndTracks()
        {
            PlayLists.Clear();
            PlayListsAndTracks = new Dictionary <ExtendedPlayList, List <ExtendedTrack> >();
            PlayListsAndTracks = await _userPlayListService.GetPlayLists();

            foreach (var playlist in PlayListsAndTracks.Keys)
            {
                PlayLists.Add(playlist);
            }
            AddTracks(PlayListsAndTracks[PlayLists[0]]);
        }
Beispiel #5
0
        private void AddImagePlaylist(object param)
        {
            string name = InputPlaylistName();

            Library.PlayList tmp = new Library.PlayList();
            tmp.Icon      = this.mediaPlayer.LibIcons[Media.MediaTypes.Image];
            tmp.Name      = name;
            tmp.Type      = Library.LibraryType.PlayList;
            tmp.MediaType = Media.MediaTypes.Image;
            PlayLists.Add(tmp);
            Console.WriteLine("New Playlist: " + tmp);
            this.mediaPlayer.Playlists.Add(tmp);
            this.mediaPlayer.SerializePlaylists();
        }
Beispiel #6
0
 private void UpdatePlayList()
 {
     SongInfo = new Song(
         DateTime.Now.ToString("HH:mm"),
         tagInfo.artist,
         tagInfo.title,
         tagInfo.album,
         tagInfo.comment,
         tagInfo.genre,
         tagInfo.year,
         tagInfo.artist + " - " + tagInfo.title);
     mainWindow.Dispatcher.BeginInvoke(DispatcherPriority.Normal, new Action(delegate()
     {
         PlayLists.Add(SongInfo);
     }));
 }
Beispiel #7
0
        private void AddMusicPlaylist(object param)
        {
            string name = InputPlaylistName();

            Library.PlayList tmp = new Library.PlayList();
            tmp.Icon      = this.mediaPlayer.LibIcons[Media.MediaTypes.Music];
            tmp.Name      = name;
            tmp.Type      = Library.LibraryType.PlayList;
            tmp.MediaType = Media.MediaTypes.Music;
            tmp.Content   = new List <Media.Media>();
            tmp.Content.Add(mediaPlayer.AudioList.Content[0].List[0]);
            MusicPlayList.Add(tmp);
            OnPropertyChanged("MusicPlayList");
            PlayLists.Add(tmp);
            Console.WriteLine("New Playlist: " + tmp);
            this.mediaPlayer.Playlists.Add(tmp);
            this.mediaPlayer.SerializePlaylists();
        }