Esempio n. 1
0
        private async void Submit_OnClick(object sender, RoutedEventArgs e)
        {
            ToggleProgressRing();
            var findFilmByTitleResponse = await _filmService.FindByTitle(Query.Text);

            FilmResults.ItemsSource = findFilmByTitleResponse.Films;
            ToggleProgressRing();
        }
Esempio n. 2
0
        private async void LoadCinemaShowings(CinemaInfo cinema)
        {
            CinamaName.Text = cinema.Name;

            var cinemaShowingsResponse = await _cinemaService.GetTimesByCinema(cinema.Identifier);

            foreach (var listing in cinemaShowingsResponse.Listings)
            {
                var film = await _filmService.FindByTitle(listing.Title);

                var possibleFilm = film.Films.FirstOrDefault();

                listing.Identifier = possibleFilm?.Identifier;
                listing.Thumbnail  = possibleFilm?.Poster;
            }

            CinemaListings.ItemsSource = cinemaShowingsResponse.Listings.Where(x => x.Thumbnail != null);
        }
Esempio n. 3
0
        private async void Submit_OnClick(object sender, RoutedEventArgs e)
        {
            ToggleProgressRing();
            var findFilmByTitleResponse = await _filmService.FindByTitle(Query.Text);

            if (findFilmByTitleResponse.HasError)
            {
                ToggleProgressRing();
                Feedback.Text           = findFilmByTitleResponse.Error.UserMessage;
                Feedback.Visibility     = Visibility.Visible;
                FilmResults.ItemsSource = new List <FilmModel>();
                return;
            }

            Feedback.Visibility     = Visibility.Collapsed;
            FilmResults.ItemsSource = findFilmByTitleResponse.Films;

            ToggleProgressRing();
        }