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

OkBTN_Click() private method

private OkBTN_Click ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
return void
        private void OkBTN_Click(object sender, EventArgs e)
        {
            try
            {
                IList<ApplicationAccessRule> rules = AccessRulesCTRL.GetAccessRules();
                ApplicationAccessRule.SetAccessRules(ObjectPathTB.Text, rules, true);
                AccessRulesCTRL.Initialize((SecuredObject)ObjectTypeCB.SelectedItem, ObjectPathTB.Text);

                if (sender == OkBTN)
                {
                    DialogResult = DialogResult.OK;
                }
            }
            catch (Exception exception)
            {
                GuiUtils.HandleException(this.Text, MethodBase.GetCurrentMethod(), exception);
            }
        }