Ejemplo n.º 1
0
 public async void FetchCinemasAsync()
 {
     var pos = await GetPositionAsync();
     var cinemas = JsonConvert.DeserializeObject<GoogleLocationSearchResult>(
         await GoogleRequest("https://maps.googleapis.com/maps/api/place/search/json?" +
             "key=AIzaSyC2xB1ebU-zMok06yqdFbLY_TjSF2LztmM&sensor=true" +
             "&types=movie_theater&radius=16000&" +
             "&location=" + pos.Coordinate.Latitude.ToString() + "," + pos.Coordinate.Longitude.ToString()
             )
         );
     foreach (GoogleLocationSearchResult.Result cinema in cinemas.results)
     {
         //Debug.WriteLine(cinema.name);
         var details = await FetchCinemaDetailsAsync(cinema);
         //Debug.WriteLine(details);
         var cdc = new CinemaDataCinema(cinema, details.result);
         cdc.Items.Add(new CinemaDataFilm(cinema.name + "Item-1",
             "Item Title: 1",
             "Item Subtitle: 1",
             "Assets/DarkGray.png",
             "Item Description: Pellentesque porta, mauris quis interdum vehicula, urna sapien ultrices velit, nec venenatis dui odio in augue. Cras posuere, enim a cursus convallis, neque turpis malesuada erat, ut adipiscing neque tortor ac erat.",
             ITEM_CONTENT,
             cdc));
         cdc.Items.Add(new CinemaDataFilm(cinema.name + "Item-2",
             "Item Title: 1",
             "Item Subtitle: 1",
             "Assets/DarkGray.png",
             "Item Description: Pellentesque porta, mauris quis interdum vehicula, urna sapien ultrices velit, nec venenatis dui odio in augue. Cras posuere, enim a cursus convallis, neque turpis malesuada erat, ut adipiscing neque tortor ac erat.",
             ITEM_CONTENT,
             cdc));
         cdc.Items.Add(new CinemaDataFilm(cinema.name + "Item-3",
             "Item Title: 1",
             "Item Subtitle: 1",
             "Assets/DarkGray.png",
             "Item Description: Pellentesque porta, mauris quis interdum vehicula, urna sapien ultrices velit, nec venenatis dui odio in augue. Cras posuere, enim a cursus convallis, neque turpis malesuada erat, ut adipiscing neque tortor ac erat.",
             ITEM_CONTENT,
             cdc));
         cdc.Items.Add(new CinemaDataFilm(cinema.name + "Item-4",
             "Item Title: 1",
             "Item Subtitle: 1",
             "Assets/DarkGray.png",
             "Item Description: Pellentesque porta, mauris quis interdum vehicula, urna sapien ultrices velit, nec venenatis dui odio in augue. Cras posuere, enim a cursus convallis, neque turpis malesuada erat, ut adipiscing neque tortor ac erat.",
             ITEM_CONTENT,
             cdc));
         cdc.Items.Add(new CinemaDataFilm(cinema.name + "Item-4",
             "Item Title: 1",
             "Item Subtitle: 1",
             "Assets/DarkGray.png",
             "Item Description: Pellentesque porta, mauris quis interdum vehicula, urna sapien ultrices velit, nec venenatis dui odio in augue. Cras posuere, enim a cursus convallis, neque turpis malesuada erat, ut adipiscing neque tortor ac erat.",
             ITEM_CONTENT,
             cdc));
         cdc.Items.Add(new CinemaDataFilm(cinema.name + "Item-4",
             "Item Title: 1",
             "Item Subtitle: 1",
             "Assets/DarkGray.png",
             "Item Description: Pellentesque porta, mauris quis interdum vehicula, urna sapien ultrices velit, nec venenatis dui odio in augue. Cras posuere, enim a cursus convallis, neque turpis malesuada erat, ut adipiscing neque tortor ac erat.",
             ITEM_CONTENT,
             cdc));
         cdc.Items.Add(new CinemaDataFilm(cinema.name + "Item-4",
             "Item Title: 1",
             "Item Subtitle: 1",
             "Assets/DarkGray.png",
             "Item Description: Pellentesque porta, mauris quis interdum vehicula, urna sapien ultrices velit, nec venenatis dui odio in augue. Cras posuere, enim a cursus convallis, neque turpis malesuada erat, ut adipiscing neque tortor ac erat.",
             ITEM_CONTENT,
             cdc));
         cdc.Items.Add(new CinemaDataFilm(cinema.name + "Item-4",
             "Item Title: 1",
             "Item Subtitle: 1",
             "Assets/DarkGray.png",
             "Item Description: Pellentesque porta, mauris quis interdum vehicula, urna sapien ultrices velit, nec venenatis dui odio in augue. Cras posuere, enim a cursus convallis, neque turpis malesuada erat, ut adipiscing neque tortor ac erat.",
             ITEM_CONTENT,
             cdc));
         cdc.Items.Add(new CinemaDataFilm(cinema.name + "Item-4",
             "Item Title: 1",
             "Item Subtitle: 1",
             "Assets/DarkGray.png",
             "Item Description: Pellentesque porta, mauris quis interdum vehicula, urna sapien ultrices velit, nec venenatis dui odio in augue. Cras posuere, enim a cursus convallis, neque turpis malesuada erat, ut adipiscing neque tortor ac erat.",
             ITEM_CONTENT,
             cdc));
         this.AllCinemas.Add(cdc);
     }
 }
Ejemplo n.º 2
0
 public CinemaDataFilm(String uniqueId, String title, String subtitle, String imagePath, String description, String content, CinemaDataCinema group)
     : base(uniqueId, title, subtitle, imagePath, description)
 {
     this._content = content;
     this._group = group;
 }