public void AddPlaylist() { string m_newPlaylist = "Playlist " + (PlayLists.Count + 1); PlayLists.Add(new PlaylistViewModel { Title = m_newPlaylist }); }
public void LoadPlaylists() { PlayLists.Clear(); foreach (var playlist in MusicManager.Instance.PlayLists) { PlayLists.Add(playlist); } }
private void AddPlayList() { var newPlayList = "PlayList" + (PlayLists.Count + 1); PlayLists.Add(new PlayListViewModel { Title = newPlayList }); }
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]]); }
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(); }
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); })); }
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(); }