コード例 #1
0
 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;
 }
コード例 #2
0
 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);
 }