コード例 #1
0
        public PagedFilmsViewModel(string url)
        {
            Title = "Films";
            var filmsApi = ConnectToApi.GetDatasFromUrlAsync <PagedFilms>(url).Result;

            SetIsVisible(filmsApi);
            PreviousUrl = filmsApi.PreviousPage;
            NextUrl     = filmsApi.NextPage;
            PagedFilms  = new ObservableCollection <Film>(filmsApi.Films);
        }
コード例 #2
0
        public PagedSpeciesViewModel(string url)
        {
            Title = "Species";
            var speciesApi = ConnectToApi.GetDatasFromUrlAsync <PagedSpecies>(url).Result;

            SetIsVisible(speciesApi);
            PreviousUrl  = speciesApi.PreviousPage;
            NextUrl      = speciesApi.NextPage;
            PagedSpecies = new ObservableCollection <Specie>(speciesApi.Species);
        }
コード例 #3
0
        public PagedPlanetsViewModel(string url)
        {
            Title = "Planets";
            var planetsApi = ConnectToApi.GetDatasFromUrlAsync <PagedPlanets>(url).Result;

            SetIsVisible(planetsApi);
            PreviousUrl  = planetsApi.PreviousPage;
            NextUrl      = planetsApi.NextPage;
            PagedPlanets = new ObservableCollection <Planet>(planetsApi.Planets);
        }
コード例 #4
0
        public PagedStarshipsViewModel(string url)
        {
            Title = "Starships";
            var starshipsApi = ConnectToApi.GetDatasFromUrlAsync <PagedStarships>(url).Result;

            SetIsVisible(starshipsApi);
            PreviousUrl    = starshipsApi.PreviousPage;
            NextUrl        = starshipsApi.NextPage;
            PagedStarships = new ObservableCollection <Starship>(starshipsApi.Starships);
        }
コード例 #5
0
        public PagedVehiclesViewModel(string url)
        {
            Title = "Vehicles";
            var vehiclesApi = ConnectToApi.GetDatasFromUrlAsync <PagedVehicles>(url).Result;

            SetIsVisible(vehiclesApi);
            PreviousUrl   = vehiclesApi.PreviousPage;
            NextUrl       = vehiclesApi.NextPage;
            PagedVehicles = new ObservableCollection <Vehicle>(vehiclesApi.Vehicles);
        }
コード例 #6
0
        public PagedPeopleViewModel(string url)
        {
            Title = "People";
            var peopleApi = ConnectToApi.GetDatasFromUrlAsync <PagedPeople>(url).Result;

            SetIsVisible(peopleApi);
            PreviousUrl = peopleApi.PreviousPage;
            NextUrl     = peopleApi.NextPage;
            PagedPeople = new ObservableCollection <People>(peopleApi.People);
        }