Beispiel #1
0
 public CreateProfileViewModel(INavigationService navigation, ISeparatedCommandHandler <CreateProfileCommand> createProfileHandler)
 {
     _navigation           = navigation;
     _createProfileHandler = createProfileHandler;
     SaveCommand           = new DelegateCommand(SaveCommandExecuted, SaveCommandCanExecute);
     CancelCommand         = new DelegateCommand(CancelCommandExecuted);
 }
        public EditProfileViewModel(INavigationService navigation, ISeparatedCommandHandler <UpdateProfileCommand> updateProfileHandler)
        {
            _navigation           = navigation;
            _updateProfileHandler = updateProfileHandler;
            UpdateCommand         = new DelegateCommand(UpdateCommand_Execute, UpdateCommand_CanExecute);
            CancelCommand         = new DelegateCommand(CancelCommand_Execute);

            _dto      = _navigation.GetNavigationArgument(GetType()) as ProfileDTO;
            _id       = _dto.ID;
            _profile  = _dto.Profile;
            _account  = _dto.Account;
            _password = _dto.Password;
        }
 public ProfileListViewModel(
     INavigationService navigation,
     ISeparatedQueryHandler <GetAllProfilesQuery, GetAllProfilesResult> getAllProfilesHandler,
     ISeparatedQueryHandler <GetProfilesByNameQuery, GetProfilesByNameResult> getProfilesByNameHandler,
     ISeparatedCommandHandler <LoadProfileDetailsCommand> updateProfileDetailsHandler,
     ISeparatedCommandHandler <DeleteProfileCommand> deleteProfileHandler,
     ProfileDetailViewModel profileDetailViewModel
     )
 {
     _navigation                  = navigation;
     _getAllProfilesHandler       = getAllProfilesHandler;
     _getProfilesByNameHandler    = getProfilesByNameHandler;
     _updateProfileDetailsHandler = updateProfileDetailsHandler;
     _profileDetailViewModel      = profileDetailViewModel;
     _deleteProfileHandler        = deleteProfileHandler;
     CreateProfileCommand         = new DelegateCommand(CreateProfileCommandExecute);
     DeleteProfileCommand         = new DelegateCommand <int>(DeleteProfileCommandExecute);
     RefreshProfiles();
 }
Beispiel #4
0
 public MasterPasswordCreateViewModel(INavigationService navigation, ISeparatedCommandHandler <CreateMasterPasswordCommand> createMasterPasswordHandler)
 {
     _navigation = navigation;
     _createMasterPasswordHandler = createMasterPasswordHandler;
     CreateMasterPasswordCommand  = new DelegateCommand(CreateMasterPassword, CreateMasterPasswordCheck);
 }