Ejemplo n.º 1
0
        private void UpdatePassword()
        {
            UserInformation.Instance.Refresh();

            if (!UserInformation.Instance.UserExists)
            {
                MessageBox.Show("Couldn't fetch user information from the server." + Environment.NewLine + "Please verify that you have an existing user and that your user name and password is correct. ", "HeuristicLab Access Service", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            else
            {
                bool result = AccessClient.CallAccessService <bool>(x => x.ChangePassword(UserInformation.Instance.User.Id, oldPasswordTextBox.Text, newPasswordTextBox.Text));
                if (result)
                {
                    MessageBox.Show("Password change successfull.", "HeuristicLab Access Service", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    SaveNewUserPasswordConfig();
                    Close();
                }
                else
                {
                    MessageBox.Show("Password change failed. " + Environment.NewLine + "Please check the entered passwords to conform with the passwords standards.", "HeuristicLab Access Service", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
        }
 private void storeButton_Click(object sender, EventArgs e)
 {
     AccessClient.Instance.ExecuteActionAsync(new Action(delegate {
         AccessClient.CallAccessService(x => x.UpdateLightweightUser(UserInformation.Instance.User));
     }), HeuristicLab.PluginInfrastructure.ErrorHandling.ShowErrorDialog);
 }
 private void AddClient()
 {
     AccessClient.CallAccessService(x => x.AddClient(clientView.Content));
 }