Esempio n. 1
0
        /// <summary>
        /// Handles clicking on a show and setting the listbox to the episodes for the show.
        /// </summary>
        /// <returns>The name of the selected show</returns>
        public override void ClickDisplayedShow(int selectedIndex)
        {
            WebRequest  reqTematicasJs = HttpWebRequest.Create("http://www.rtve.es/api/tematicas/" + value.infoBuscador[selectedIndex].id + "/videos.json");
            WebResponse resTematicasJs = reqTematicasJs.GetResponse();

            using (StreamReader srjs = new StreamReader(resTematicasJs.GetResponseStream(), Encoding.UTF8))
            {
                string jsonjs            = srjs.ReadToEnd();
                JavaScriptSerializer jss = new JavaScriptSerializer();
                episodesClan            = jss.Deserialize <EpisodesClan>(jsonjs);
                episodesClan.page.items = episodesClan.page.items.OrderBy(x => x.publicationDate).ToList();
            }
            resTematicasJs.Close();
        }
Esempio n. 2
0
 /// <summary>
 /// Handles Clearing the episode list and reseting it back to the show list
 /// </summary>
 public override void CleanEpisodes()
 {
     episodesClan = null;
 }