private void CertificateValidator_CertificateValidation(CertificateValidator sender, CertificateValidationEventArgs e) { if (InvokeRequired) { Invoke(new CertificateValidationEventHandler(CertificateValidator_CertificateValidation), sender, e); return; } try { var result = new UntrustedCertificateDialog().ShowDialog(this, e.Certificate); if (result == DialogResult.OK) { e.Accept = true; } } catch (Exception ex) { Opc.Ua.Client.Controls.ExceptionDlg.Show(Text, ex); } }
private void CertificateValidator_CertificateValidation(CertificateValidator sender, CertificateValidationEventArgs e) { if (InvokeRequired) { Invoke(new CertificateValidationEventHandler(CertificateValidator_CertificateValidation), sender, e); return; } try { var result = new UntrustedCertificateDialog().ShowDialog(this, e.Certificate); if (result == DialogResult.OK) { e.Accept = true; } } catch (Exception exception) { MessageBox.Show(Text + ": " + exception.Message); } }