private void HttpsTrustListButton_Click(object sender, EventArgs e) { try { TrustListPanel.Initialize(m_gds, m_server, m_registeredApplication, true); ShowPanel(Panel.HttpsTrustList); } catch (Exception ex) { Opc.Ua.Client.Controls.ExceptionDlg.Show(Text, ex); } }
private void HttpsTrustListButton_Click(object sender, EventArgs e) { try { TrustListPanel.Initialize(m_gds, m_server, m_registeredApplication, true); ShowPanel(Panel.HttpsTrustList); } catch (Exception exception) { MessageBox.Show(Text + ": " + exception.Message); } }
private async void RegistrationPanel_RegisteredApplicationChangedAsync(object sender, RegisteredApplicationChangedEventArgs e) { try { var app = m_registeredApplication = e.Application; if (app == null || app.RegistrationType == RegistrationType.ClientPull) { SetServer(null); } else if (app.RegistrationType == RegistrationType.ServerPush) { if (!String.IsNullOrEmpty(app.ServerUrl)) { var endpoint = new EndpointDescription(app.ServerUrl); endpoint.Server.ApplicationType = ApplicationType.Server; endpoint.Server.ApplicationUri = app.ApplicationUri; endpoint.Server.ProductUri = app.ProductUri; endpoint.Server.ApplicationName = app.ApplicationName; endpoint.Server.DiscoveryUrls = (app.DiscoveryUrl != null) ? new StringCollection(app.DiscoveryUrl) : null; SetServer(endpoint); } } CertificateButton.Enabled = (e.Application != null); TrustListButton.Enabled = (e.Application != null); #if !NO_HTTPS HttpsCertificateButton.Visible = (e.Application != null && !String.IsNullOrEmpty(e.Application.GetHttpsDomainName())); HttpsTrustListButton.Visible = (e.Application != null && !String.IsNullOrEmpty(e.Application.HttpsTrustListStorePath)); #endif await CertificatePanel.Initialize(m_configuration, m_gds, m_server, e.Application, false); TrustListPanel.Initialize(m_gds, m_server, e.Application, false); UpdateMainFormHeader(); } catch (Exception ex) { Opc.Ua.Client.Controls.ExceptionDlg.Show(Text, ex); } }
private void RegistrationPanel_RegisteredApplicationChanged(object sender, RegisteredApplicationChangedEventArgs e) { try { var app = m_registeredApplication = e.Application; if (app == null || app.RegistrationType == RegistrationType.ClientPull) { SetServer(null); } else if (app.RegistrationType == RegistrationType.ServerPush) { if (!String.IsNullOrEmpty(app.ServerUrl)) { var endpoint = new EndpointDescription(app.ServerUrl); endpoint.Server.ApplicationType = ApplicationType.Server; endpoint.Server.ApplicationUri = app.ApplicationUri; endpoint.Server.ProductUri = app.ProductUri; endpoint.Server.ApplicationName = app.ApplicationName; endpoint.Server.DiscoveryUrls = (app.DiscoveryUrl != null) ? new StringCollection(app.DiscoveryUrl) : null; SetServer(endpoint); } } CertificateButton.Enabled = (e.Application != null); TrustListButton.Enabled = (e.Application != null); HttpsCertificateButton.Visible = (e.Application != null && !String.IsNullOrEmpty(e.Application.GetHttpsDomainName())); HttpsTrustListButton.Visible = (e.Application != null && !String.IsNullOrEmpty(e.Application.HttpsTrustListStorePath)); CertificatePanel.Initialize(m_configuration, m_gds, m_server, e.Application, false); TrustListPanel.Initialize(m_gds, m_server, e.Application, false); } catch (Exception exception) { MessageBox.Show(Text + ": " + exception.Message); } }