private void DeleteProfileCommandExecute(int parameter)
 {
     _deleteProfileHandler.Execute(new DeleteProfileCommand {
         Id = parameter
     });
     RefreshProfiles();
 }
 private void UpdateCommand_Execute()
 {
     try {
         var command = new UpdateProfileCommand {
             Id       = _id,
             Profile  = _profile,
             Account  = _account,
             Password = _password
         };
         _updateProfileHandler.Execute(command);
         _navigation.Navigate(typeof(MainViewModel), _id);
     }
     catch (Exception ex) {
         //Log.Error(string.Format("Failed to update profile details {0}", _profile), ex);
     }
 }
Beispiel #3
0
        private void CreateMasterPassword()
        {
            var command = new CreateMasterPasswordCommand {
                Password = Password
            };

            try {
                _createMasterPasswordHandler.Execute(command);
                AppSettings.MasterPassword = Password;
                _navigation.Navigate(typeof(MainViewModel));
            }
            catch (Exception ex) {
                AppSettings.MasterPassword = string.Empty;
                throw;
            }
        }
Beispiel #4
0
        private void SaveCommandExecuted()
        {
            var command = new CreateProfileCommand {
                Profile  = _profile,
                Account  = _account,
                Password = _password
            };

            try {
                _createProfileHandler.Execute(command);
                CancelCommandExecuted();
            }
            catch (Exception ex) {
                //Log.Error(ex.Message, ex);
            }
        }