示例#1
0
        private async Task <AlphaTab.Model.Score> GetPopularScore()
        {
            var scoreService = new ScoreServiceManager();
            var list         = await scoreService.FetchSongsMostViewed();

            var firstSong = list.First();

            var songDetails = await scoreService.FetchSongDetailsAsync(firstSong.ID);

            var score = await scoreService.FetchSongScore(songDetails, true);

            return(score);
        }
示例#2
0
        public TabBrowser()
        {
            InitializeComponent();

            _scoreService = new ScoreServiceManager();

            Items = new ObservableCollection <Models.SongListItem>();

            ResultList.ItemsSource = Items;

            //load popular tracks
            Device.BeginInvokeOnMainThread(async() =>
            {
                var list = await _scoreService.FetchSongsMostViewed();
                Items    = new ObservableCollection <Models.SongListItem>(list);
                ResultList.ItemsSource = Items;
            });
        }