Opc.Ua.Configuration.MainForm.ViewTrustedCertificatesBTN_Click C# (CSharp) Method

ViewTrustedCertificatesBTN_Click() private method

private ViewTrustedCertificatesBTN_Click ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
return void
        private void ViewTrustedCertificatesBTN_Click(object sender, EventArgs e)
        {
            try
            {
                const string caption = "View Trusted Certificates";

                ManagedApplication application = ManageApplicationSecurityCTRL.GetSelectedApplication();

                if (application == null)
                {
                    return;
                }

                if (application.TrustList == null)
                {
                    MessageBox.Show(application.ToString() + " does not have a trust list defined.", caption, MessageBoxButtons.OK, MessageBoxIcon.Error);
                    return;
                }

                new CertificateListDlg().ShowDialog(application.TrustList, false);
            }
            catch (Exception exception)
            {
                GuiUtils.HandleException(this.Text, MethodBase.GetCurrentMethod(), exception);
            }
        }