// Update password for the selected user async Task ChangePassword() { try { var user = SelectedUser; if (user == null) { return; } userPasswordDialog.BindToUser(user); if (userPasswordDialog.ShowDialog() == DialogResult.OK) { var response = await InfluxDbClient.SetPasswordAsync(user.Name, userPasswordDialog.Password); // Select the user and refresh the window if (!response.Success) { AppForm.DisplayError(response.Body); } } } catch (Exception ex) { AppForm.DisplayException(ex); } }