/// <summary> /// 初始化歌单列表 /// </summary> private void InitPlayList() { PlayLists = new List <PlayListItemViewModel>(); foreach (var item in PlayListService.GetAllPlayLists()) { PlayListItemViewModel viewModel = new PlayListItemViewModel(); viewModel.PlayList = item; PlayLists.Add(viewModel); } }
/// <summary> /// 初始化音乐列表 /// </summary> /// <param name="playList"></param> private void InitMusicList(PlayListItemViewModel playList) { MusicList = new List <MusicItemViewModel>(); playList.IsSelected = true; foreach (var item in PlayListService.GetMusicList(playList.PlayList)) { MusicItemViewModel viewModel = new MusicItemViewModel(); viewModel.Music = item; MusicList.Add(viewModel); } }