コード例 #1
0
        public void AddPlaylist()
        {
            string m_newPlaylist = "Playlist " + (PlayLists.Count + 1);

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

            PlayLists.Add(new PlayListViewModel {
                Title = newPlayList
            });
        }
コード例 #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]]);
        }
コード例 #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();
        }
コード例 #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);
     }));
 }
コード例 #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();
        }