//private bool _isRefreshing = false; public MovieListViewModel(INavigation navigation, List <MovieDetails> movieList) { this._service = new MovieSearchService(); this._navigation = navigation; this._movieList = movieList; this._selectedMovie = new MovieDetails(); }
public MainPageViewModel(INavigation navigation) { _service = new MovieSearchService(); this._navigation = navigation; _movieList = new List <MovieDetails>(); _searchCommand = new Command(() => SearchCommandExecute()); _isRunning = false; }
private async Task <MovieSearchResponse> ExecuteMovieSearchHelperAsync(String title) { //Execute the Move Search to load data . . . //NOTE: This can come from any source, and can be from converted JSON or Xml, etc. //NOTE: As an interesting use case here, we load the results dynamically from a Movie Search // Database REST call for JSON results, and convert to Xml dynamically to use efficiently // with our templates. var movieSearchService = new MovieSearchService(); var searchResponse = await movieSearchService.SearchAsync(title).ConfigureAwait(false); return(searchResponse); }
public async Task <ActionResult> PdfWithXslt(String title = "Star Wars") { //Execute the Move Search to load data . . . //NOTE: This can come from any source, and can be from converted JSON or Xml, etc. //NOTE: As an interesting use case here, we load the results dynamically from a Movie Search // Database REST call for JSON results, and convert to Xml dynamically to use efficiently // with our templates. var movieSearchService = new MovieSearchService(); var searchResponse = await movieSearchService.SearchAsync(title); //Initialize the appropriate Renderer based on the Parameter. // and execute the Pdf Renderer to generate the Pdf Document byte data IPdfTemplatingRenderer <MovieSearchResponse> pdfTemplatingRenderer = new XsltMoviePdfRenderer(); var pdfBytes = pdfTemplatingRenderer.RenderPdf(searchResponse); //Create the File Content Result from the Pdf byte data var fileContent = new FileContentResult(pdfBytes, "application/pdf"); return(fileContent); }
public App() { var service = new MovieSearchService(); var topViewModel = new TabsPageViewModel(service); var popularViewModel = new TabsPageViewModel(service); var MovieSearchPage = new MainPage(); var MovieSearchNavigationPage = new NavigationPage(MovieSearchPage); MovieSearchNavigationPage.Title = "Movie Search"; MovieSearchNavigationPage.Icon = ("search.png"); var TopRatedPage = new TopRatedPage(topViewModel); var TopRatedNavigationPage = new NavigationPage(TopRatedPage); TopRatedNavigationPage.Title = "Top Rated"; TopRatedNavigationPage.Icon = ("thumbsup.png"); var PopularPage = new PopularPage(popularViewModel); var PopularNavigationPage = new NavigationPage(PopularPage); PopularNavigationPage.Title = "Popular"; PopularNavigationPage.Icon = ("fireball.png"); topViewModel.setNavigation(TopRatedNavigationPage.Navigation); popularViewModel.setNavigation(PopularNavigationPage.Navigation); var tabbedPage = new TabPage(topViewModel, popularViewModel, service); tabbedPage.Children.Add(MovieSearchNavigationPage); tabbedPage.Children.Add(TopRatedNavigationPage); tabbedPage.Children.Add(PopularNavigationPage); tabbedPage.BackgroundColor = Color.FromHex("#00ffffff"); MainPage = tabbedPage; InitializeComponent(); }
public TitleInputFragment(MovieSearchService movieService) { this._movieService = movieService; this._movieList = new List <MovieDetails>();; }
public TabsPageViewModel(MovieSearchService service) { _service = service; _movieList = new List <MovieDetails>(); }
public TopRatedPageViewModel(INavigation navigation) { _service = new MovieSearchService(); _movieList = new List <MovieDetails>(); this._navigation = navigation; }
public TabPage(TabsPageViewModel top, TabsPageViewModel pop, MovieSearchService service) { this._topViewModel = top; this._popularViewModel = pop; this._service = service; }
public TopRatedFragment(MovieSearchService movieService) { this._movieService = movieService; this._movieList = new List <MovieDetails>(); }