private void ButtonViewCertificates_Click(object sender, System.EventArgs e) { try { CredentialsCertificatesForm cred_cert_form = null; cred_cert_form = new CredentialsCertificatesForm (GetSession(), false); if (cred_cert_form.ShowDialog () == DialogResult.OK) { SessionChange theSessionChange = new SessionChange(GetSession(), SessionChange.SessionChangeSubTypEnum.OTHER); Notify(theSessionChange); } } catch (Exception theException) { MessageBox.Show(theException.Message, "Warning", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); return; } }
private void ButtonViewCredentials_Click(object sender, System.EventArgs e) { bool passed = false; bool displayPassword = true; DialogResult result = DialogResult.None; (GetSelectedSessionNew().Implementation as Dvtk.Sessions.ISecure).SecuritySettings.TlsPassword = "******"; while(!passed) { try { CredentialsCertificatesForm cred_cert_form = null; cred_cert_form = new CredentialsCertificatesForm (GetSelectedSessionNew(), true); result = cred_cert_form.ShowDialog(); passed = true; displayPassword = false; } catch (Exception theException) { if (theException.GetType().FullName == "Wrappers.Exceptions.PasswordExpection") { passed = false; PassWordForm passWordForm = new PassWordForm(GetSelectedSessionNew(), displayPassword); displayPassword = false; if (passWordForm.ShowDialog()!= DialogResult.OK) { passed = true; displayPassword = false; } } else { MessageBox.Show(theException.Message ,"Warning", MessageBoxButtons.OK,MessageBoxIcon.Warning); passed = true; } } } if (result == DialogResult.OK) { (GetSelectedSessionNew().Implementation as Dvtk.Sessions.ISecure).SecuritySettings.TlsPassword = "******"; SessionChange theSessionChange = new SessionChange(GetSelectedSessionNew(), SessionChange.SessionChangeSubTypEnum.OTHER); Notify(theSessionChange); } }
private void ButtonViewCredentials_Click(object sender, System.EventArgs e) { CredentialsCertificatesForm cred_cert_form = new CredentialsCertificatesForm (this.selected_session, true); if (cred_cert_form.ShowDialog () == DialogResult.OK) { //this.project.SetSessionChanged (this.selected_session.SessionFileName, true); // Update the mainform controls (menu, toolbar, title) ((MainForm)this.ParentForm).UpdateUIControls (); } }