/// <summary>
/// Loads the configuration and initializes the form.
/// </summary>
public MainForm()
{
InitializeComponent();
this.Icon = ClientUtils.GetAppIcon();
m_configuration = GuiUtils.DoStartupChecks("Opc.Ua.ServerTestTool", ApplicationType.Client, null, true);
if (m_configuration != null)
{
GuiUtils.OverrideUaTcpImplementation(m_configuration);
GuiUtils.DisplayUaTcpImplementation(this, m_configuration);
}
m_configuration.CertificateValidator.CertificateValidation += new CertificateValidationEventHandler(CertificateValidator_CertificateValidation);
m_testConfiguration = ServerTestConfiguration.Load(m_configuration.Extensions);
// allow UA servers to use the same certificate for HTTPS validation.
ApplicationInstance.SetUaValidationForHttps(m_configuration.CertificateValidator);
TestCasesCTRL.Initialize(m_testConfiguration);
// get list of cached endpoints.
m_endpoints = m_configuration.LoadCachedEndpoints(true);
EndpointsCTRL.Initialize(m_endpoints, m_configuration);
// create the test client.
m_testClient = new ServerTestClient(m_configuration);
m_testClient.ReportResult += new EventHandler <ServerTestClient.ReportResultEventArgs>(TestClient_ReportTestResult);
m_testClient.ReportProgress += new EventHandler <ServerTestClient.ReportProgressEventArgs>(TestClient_ReportTestProgress);
}