예제 #1
0
        public async void SelectTheChannle(object sender, ItemClickEventArgs e)
        {
            var         channel = e.ClickedItem as Channel;
            List <Song> songs   = await DoubanFMService.GetSongsFromChannel(channel);

            ViewModelLocator.Instance.Main.PlayerSession.SetPlaylist(songs, songs[0]);
        }
        private async void AssociatedObject_PointerReleased(object sender, Windows.UI.Xaml.Input.PointerRoutedEventArgs e)
        {
            Channel channel = AssociatedObject.DataContext as Channel;

            if (channel != null)
            {
                List <Song> songs = await DoubanFMService.GetSongsFromChannel(channel);

                ViewModelLocator.Instance.Main.PlayerSession.SetPlaylist(songs, songs[0]);
            }
        }
예제 #3
0
        private async void InitChannelGroup()
        {
            var channelground = await DoubanFMService.GetRecommendedChannels();

            if (channelground != null)
            {
                MyFM = channelground[0];
                //ArtistFM = channelground[1];
                //SingleSongFM = channelground[2];
                //YearsFM = channelground[3];
                //StyleSongFM = channelground[4];
                //MoodFM = channelground[5];
                //BrandFM = channelground[6];
                OthersFMs = new ObservableCollection <ChannelGroup>(channelground.Where(o => o != MyFM));
            }
            else
            {
                //TODO
            }
        }
예제 #4
0
 public async void SearchChannel()
 {
     Channels = new ObservableCollection <Channel>(await DoubanFMService.SearchChannelAsync(Query, 0, 20));
 }