Opc.Ua.Configuration.NewEndpointDlg.DiscoverBTN_Click C# (CSharp) Method

DiscoverBTN_Click() private method

private DiscoverBTN_Click ( object sender, EventArgs e ) : void
sender object
e EventArgs
return void
        private void DiscoverBTN_Click(object sender, EventArgs e)
        {
            try
            {
                ApplicationDescription server = new DiscoveredServerListDlg().ShowDialog(null, m_configuration);

                if (server == null)
                {
                    return;
                }

                ConfiguredEndpoint endpoint = m_endpoint;

                if (endpoint == null)
                {
                    endpoint = new ConfiguredEndpoint(server, null);
                }
                
                ConfigureEndpoint(endpoint);
            }
            catch (Exception exception)
            {
                GuiUtils.HandleException(this.Text, MethodBase.GetCurrentMethod(), exception);
            }
        }