private void secretLabel_Click(object sender, EventArgs e) { SecretForm secretForm = new SecretForm(); secretForm.BringToFront(); secretForm.Show(); this.Hide(); secretForm.FormClosed += delegate { this.Show(); }; }
public async Task <DialogResult> ShowUpdateClientSecretDialogAsync() { var settings = await SettingsService.Instance.GetSettingsAsync(); var detail = settings.SelectedConnection; var dialog = new SecretForm(detail) { ClientId = detail.AzureAdAppId.ToString("B") }; dialog.ShowDialog(); if (dialog.DialogResult == DialogResult.OK) { detail.SetClientSecret(dialog.ClientSecret, false); if (dialog.SaveSecret) { detail.SavePassword = true; settings.Save(); } } return(dialog.DialogResult); }