void movies_getCompleted(MoviePhotos sender) { if (sender.fotolar.Count == 0) { MessageBox.Show("Filme ait fotoğraf albümü mevcut değil."); NavigationService.GoBack(); return; } fotolar = sender.fotolar.Take(20).ToList(); foreach (string item in fotolar) { PivotItem NewPivotItem = new PivotItem(); NewPivotItem.HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch; NewPivotItem.VerticalAlignment = System.Windows.VerticalAlignment.Stretch; NewPivotItem.Margin = new Thickness(0); asyncImage IMG = new asyncImage(); IMG.HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch; IMG.VerticalAlignment = System.Windows.VerticalAlignment.Stretch; IMG.Margin = new Thickness(0); NewPivotItem.Content = IMG; PhotoPivot.Items.Add(NewPivotItem); IMG.Tag = item; } asyncImage FirstOne = ((asyncImage)((PivotItem)PhotoPivot.Items[0]).Content); FirstOne.FullURL = FirstOne.Tag as string; myProgress.IsIndeterminate = false; }
void movies_getFailed(MoviePhotos sender) { myProgress.IsIndeterminate = false; myProgress.Value = 0; myProgress.Opacity = 0; NavigationService.GoBack(); }
protected override void OnNavigatedTo(NavigationEventArgs e) { myProgress.Opacity = 1; myProgress.IsIndeterminate = true; //artist string Type = NavigationContext.QueryString["type"]; if (Type == "artist") { ArtistPhotos photos = new ArtistPhotos(); photos.getFailed += photos_getFailed; photos.getCompleted += photos_getCompleted; photos.get(NavigationContext.QueryString["ID"]); } else if (Type == "movie") { MoviePhotos movies = new MoviePhotos(); movies.getFailed += movies_getFailed; movies.getCompleted += movies_getCompleted; movies.get(NavigationContext.QueryString["ID"]); } base.OnNavigatedTo(e); }
void birFilm_getCompleted(Film.RootObject data) { loader.IsIndeterminate = false; PanoramaRoot.Title = data.movie.name; film_hakkinda.DataContext = data.movie; listOyuncular.ItemsSource = data.artists; listYorumlar.ItemsSource = data.comments; var Url = data.movie.trailerUrl; if (Url != "False") { ((ApplicationBarIconButton)this.ApplicationBar.Buttons[0]).IsEnabled = true; } else { ((ApplicationBarIconButton)this.ApplicationBar.Buttons[0]).IsEnabled = false; } MoviePhotos moviePhotos = new MoviePhotos(); moviePhotos.getCompleted += moviePhotos_getCompleted; moviePhotos.get(data.movie.id); }
void moviePhotos_getCompleted(MoviePhotos sender) { if (sender.fotolar.Count > 0) { ((ApplicationBarIconButton)this.ApplicationBar.Buttons[1]).IsEnabled = true; } else { ((ApplicationBarIconButton)this.ApplicationBar.Buttons[1]).IsEnabled = false; } }