private async Task LoadFilmDetails()
        {
            ConnectionProfile InternetConnectionProfile = NetworkInformation.GetInternetConnectionProfile();

            ConnectionCost InternetConnectionCost = (InternetConnectionProfile == null ? null : InternetConnectionProfile.GetConnectionCost());

            Task <YouTubeUri> tYouTube = null;

            if (InternetConnectionProfile != null &&
                InternetConnectionProfile.GetNetworkConnectivityLevel() == NetworkConnectivityLevel.InternetAccess)
            {
                if (!String.IsNullOrEmpty(SelectedFilm.YoutubeTrailer) &&
                    InternetConnectionCost != null &&
                    InternetConnectionCost.NetworkCostType == NetworkCostType.Unrestricted)
                {
                    tYouTube = MyToolkit.Multimedia.YouTube.GetVideoUriAsync(SelectedFilm.YoutubeTrailer, Config.TrailerQuality);
                }
            }

            this.DataContext = this;

            CinemaData cd = new CinemaData(App.FilmCinemas[SelectedFilm.EDI]);

            dataLetter        = cd.GroupsByLetter;
            cvsCinemas.Source = dataLetter;

            gvZoomedInCinemas.SelectionChanged -= gvZoomedIn_SelectionChanged;
            gvZoomedInCinemas.SelectedItem      = null;
            (semanticZoom.ZoomedOutView as ListViewBase).ItemsSource = cd.CinemaHeaders;
            gvZoomedInCinemas.SelectionChanged += gvZoomedIn_SelectionChanged;

            semanticZoom.ViewChangeStarted -= semanticZoom_ViewChangeStarted;
            semanticZoom.ViewChangeStarted += semanticZoom_ViewChangeStarted;

            if (tYouTube != null)
            {
                try
                {
                    this.trailerUrl = await tYouTube;
                }
                catch { }
            }

            this.btnTrailer.Visibility = btnPlay.Visibility = (trailerUrl != null ? Windows.UI.Xaml.Visibility.Visible : Windows.UI.Xaml.Visibility.Collapsed);
            this.mpTrailer.Visibility  = Windows.UI.Xaml.Visibility.Collapsed;

            //if(taskFilmReviews != null)
            //    await taskFilmReviews;
        }
Ejemplo n.º 2
0
        public ListCinemas()
        {
            this.InitializeComponent();

            CinemaData cd = new CinemaData(App.Cinemas);

            dataLetter = cd.GroupsByLetter; //cd.GetGroupsByLetter();

            cvsCinemas.Source = dataLetter;
            gvZoomedInCinemas.SelectionChanged -= gvZoomedIn_SelectionChanged;
            gvZoomedInCinemas.SelectedItem      = null;
            (semanticZoom.ZoomedOutView as ListViewBase).ItemsSource = cd.CinemaHeaders; //GetHeaderItems(dataLetter); //cvs2.View.CollectionGroups;
            gvZoomedInCinemas.SelectionChanged += gvZoomedIn_SelectionChanged;

            semanticZoom.ViewChangeStarted -= semanticZoom_ViewChangeStarted;
            semanticZoom.ViewChangeStarted += semanticZoom_ViewChangeStarted;
        }