Esempio n. 1
0
 public PetDetailsViewModel(IPetsInLoveApiService petsInLoveApiService, Pet Pet)
 {
     this.Pet       = Pet;
     CallCommand    = new Command(ExecuteCallCommand);
     EmailCommand   = new Command(ExecuteEmailCommand);
     OpenMapCommand = new Command(ExecuteOpenMapCommand);
 }
Esempio n. 2
0
        public MainViewModel(IPetsInLoveApiService petsInLoveApiService)
        {
            _petsInLoveApiService = petsInLoveApiService;
            Pets = new ObservableCollection <Pet>();

            RefreshCommand    = new Command(() => LoadPets(null)); // Sempre atualizar
            AboutCommand      = new Command(ExecuteAboutCommand);
            SearchCommand     = new Command(ExecuteSearchCommand);
            AddCommand        = new Command(ExecuteAddCommand);
            PetDetailsCommand = new Command <Pet>(ExecutePetDetailsCommand);

            LoadPets(null);

            Title = "Pets In Love";
        }
Esempio n. 3
0
 public AddPetViewModel(IPetsInLoveApiService petsInLoveApiService)
 {
     _petsInLoveApiService = petsInLoveApiService;
     this.Pet        = new Pet();
     RegisterCommand = new Command(ExecuteRegisterCommand);
 }
Esempio n. 4
0
 public AboutViewModel(IPetsInLoveApiService petsInLoveApiService)
 {
     _petsInLoveApiService = petsInLoveApiService;
 }
Esempio n. 5
0
 public SearchViewModel(IPetsInLoveApiService petsInLoveApiService)
 {
     _petsInLoveApiService = petsInLoveApiService;
     SearchCommand         = new Command(ExecuteSearchCommand);
 }