public AddEditPageViewModel(IFileStoringService fileStoringService, IContactRepositoryService contactRepositoryService) { repositoryService = contactRepositoryService; storingService = fileStoringService; _goBackSaved = new DelegateCommand(GoBackSavedExecute); _goBackUnsaved = new DelegateCommand(GoBackUnsavedExecute); _removeImage = new DelegateCommand(RemoveImageExecute, CanRemoveImageExecute); IsEnabled = false; }
public MasterDetailPageViewModel(IFileStoringService fileStoringService, IContactRepositoryService contactRepositoryService) { _contactRepository = contactRepositoryService; _storingService = fileStoringService; _addContact = new DelegateCommand(AddExecute); _makeFavoriteCommand = new DelegateCommand(MakeFavoriteExecute, CanMakeFavoriteExcute); _deleteContactCommand = new DelegateCommand(DeleteExecute, CanDeleteExecute); _goToSettingsCommand = new DelegateCommand(GoToSettingsExecute); _editContactCommand = new DelegateCommand(ExecuteEdit, CanEditExecute); }