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

EditBTN_Click() private method

private EditBTN_Click ( object sender, EventArgs e ) : void
sender object
e EventArgs
return void
        private void EditBTN_Click(object sender, EventArgs e)
        {
            try
            {
                Uri uri = null;
                ConfiguredEndpoint endpoint = null;
                
                if (m_endpoint == null)
                {
                    string url = EndpointTB.Text;

                    if (String.IsNullOrEmpty(url))
                    {
                        DiscoverBTN_Click(sender, e);
                        return;
                    }

                    uri = new Uri(url);
                    EndpointDescription description = new EndpointDescription(uri.ToString());
                    endpoint = new ConfiguredEndpoint(null, description, EndpointConfiguration.Create(m_configuration));
                }
                else
                {
                    uri = m_endpoint.EndpointUrl;
                    endpoint = m_endpoint;
                }

                ConfigureEndpoint(endpoint);
            }
            catch (Exception exception)
            {
                GuiUtils.HandleException(this.Text, MethodBase.GetCurrentMethod(), exception);
            }
        }
        #endregion