Ejemplo n.º 1
0
        public async void DownloadAsync()
        {
            Debug.WriteLine("Starting search");

            //TODO : handle HttpRequestException : Response status code does not indicate success: 503 (Service Unavailable: Back-end server is at capacity).
            SearchRequest s      = new SearchRequest();
            string        result = await s.MakeRequest(txtQuery.Text);

            List <Song> songList = new List <Song>();

            if (result != null)
            {
                songList = JSONParser.Deserialize(result);
                ResetList();
                SetList(songList);
                Debug.WriteLine(result);
            }
            else
            {
                //Do  nothing
            }
            progressBar.IsIndeterminate = false;
        }