private void LoadActorsViewModel(TvView view) { var images = view.ActorItems.Take(1).Select(i => ApiClient.GetPersonImageUrl(i.Name, new ImageOptions { ImageType = i.ImageType, Tag = i.ImageTag, Height = Convert.ToInt32(TileWidth * 2), EnableImageEnhancers = false })); ActorsViewModel.AddImages(images); }
public IActionResult Actors(ActorsViewModel model) { if (model.SearchText == null) { model.TotalPages = (int)Math.Ceiling(this.actorsService.Total() / (double)pageSize); model.Actors = this.actorsService.GetActorsPerPage(model.Page, pageSize); } else { model.TotalPages = (int)Math.Ceiling(this.actorsService.TotalContainingText(model.SearchText) / (double)pageSize); model.Actors = this.actorsService.ListByContainingText(model.SearchText, model.Page, pageSize); } return(View(model)); }
public void Dispose() { if (LatestEpisodesViewModel != null) { LatestEpisodesViewModel.Dispose(); } if (NextUpViewModel != null) { NextUpViewModel.Dispose(); } if (ResumeViewModel != null) { ResumeViewModel.Dispose(); } if (MiniSpotlightsViewModel != null) { MiniSpotlightsViewModel.Dispose(); } if (MiniSpotlightsViewModel2 != null) { MiniSpotlightsViewModel2.Dispose(); } if (AllShowsViewModel != null) { AllShowsViewModel.Dispose(); } if (ActorsViewModel != null) { ActorsViewModel.Dispose(); } if (GenresViewModel != null) { GenresViewModel.Dispose(); } if (SpotlightViewModel != null) { SpotlightViewModel.Dispose(); } if (RomanticSeriesViewModel != null) { RomanticSeriesViewModel.Dispose(); } if (ComedyItemsViewModel != null) { ComedyItemsViewModel.Dispose(); } DisposeMainViewCancellationTokenSource(true); }
public void Dispose() { if (LatestTrailersViewModel != null) { LatestTrailersViewModel.Dispose(); } if (LatestMoviesViewModel != null) { LatestMoviesViewModel.Dispose(); } if (MiniSpotlightsViewModel != null) { MiniSpotlightsViewModel.Dispose(); } if (MiniSpotlightsViewModel2 != null) { MiniSpotlightsViewModel2.Dispose(); } if (SpotlightViewModel != null) { SpotlightViewModel.Dispose(); } if (GenresViewModel != null) { GenresViewModel.Dispose(); } if (AllMoviesViewModel != null) { AllMoviesViewModel.Dispose(); } if (ActorsViewModel != null) { ActorsViewModel.Dispose(); } if (BoxsetsViewModel != null) { BoxsetsViewModel.Dispose(); } if (TrailersViewModel != null) { TrailersViewModel.Dispose(); } if (HDMoviesViewModel != null) { HDMoviesViewModel.Dispose(); } if (ThreeDMoviesViewModel != null) { ThreeDMoviesViewModel.Dispose(); } if (FamilyMoviesViewModel != null) { FamilyMoviesViewModel.Dispose(); } if (ComedyItemsViewModel != null) { ComedyItemsViewModel.Dispose(); } if (RomanticMoviesViewModel != null) { RomanticMoviesViewModel.Dispose(); } if (YearsViewModel != null) { YearsViewModel.Dispose(); } DisposeMainViewCancellationTokenSource(true); }
void SetPageData() { BindingContext = new ActorsViewModel(this.Navigation); }