Пример #1
0
        public EditMyPosterPageViewModel(INavigationService navigationService, IPageDialogService dialogService) : base(navigationService, dialogService)
        {
            Title = "Editar anúncio";

            PickPhotoCommand        = new DelegateCommand(PickPhotoCommandExecute);
            EditPosterCommand       = new DelegateCommand(EditPosterCommandExecute, EditPosterCommandCanExecute);
            PetTypeSelectCommand    = new DelegateCommand <string>(PetTypeSelectCommandExecute);
            DeletePetPictureCommand = new DelegateCommand <string>(DeletePetPictureCommandExecute);
            StateSelectCommand      = new DelegateCommand <string>(StateSelectCommandExecute);

            PetImages   = new ObservableCollection <PetPictureItem>();
            PetTypeList = new ObservableCollection <string>()
            {
                "Cachorro", "Gato"
            };
            StatesList = new ObservableCollection <string>(StateList.Get());
        }
        public NewPosterPageViewModel(
            INavigationService navigationService,
            IPageDialogService dialogService) : base(navigationService, dialogService)
        {
            Title = "Novo Anúncio";

            PickPhotoCommand        = new DelegateCommand(PickPhotoCommandExecute);
            CreatePosterCommand     = new DelegateCommand(CreatePosterCommandExecute, CreatePosterCommandCanExecute);
            PetTypeSelectCommand    = new DelegateCommand <string>(PetTypeSelectCommandExecute);
            DeletePetPictureCommand = new DelegateCommand <string>(DeletePetPictureCommandExecute);
            StateSelectCommand      = new DelegateCommand <string>(StateSelectCommandExecute);

            PetImages   = new ObservableCollection <PetPictureItem>();
            PetTypeList = new ObservableCollection <string>()
            {
                "Cachorro", "Gato"
            };
            IsCastrated = false;
            IsDewormed  = false;

            StatesList = new ObservableCollection <string>(StateList.Get());
        }