Opc.Ua.Configuration.AccessRuleDlg.OkBTN_Click C# (CSharp) Method

OkBTN_Click() private method

private OkBTN_Click ( object sender, EventArgs e ) : void
sender object
e EventArgs
return void
        private void OkBTN_Click(object sender, EventArgs e)
        {
            try
            {
                if (m_identity == null)
                {
                    AccountInfo account = AccountInfo.Create(IdentityNameTB.Text);

                    if (account == null)
                    {
                        throw new ApplicationException("Please specified a valid identity.");
                    }

                    m_identity = account.GetIdentityReference();
                }

                // close the dialog.
                DialogResult = DialogResult.OK;
            }
            catch (Exception exception)
            {
                GuiUtils.HandleException(this.Text, System.Reflection.MethodBase.GetCurrentMethod(), exception);
            }
        }