private void Handle_Form_Load(object sender, EventArgs e)
        {
            _document = AdnInventorUtilities.InvApplication.ActiveDocument;

            this.KeyPreview = true;
            this.KeyDown   += new KeyEventHandler(LinkParametersForm_KeyDown);

            this.Text = "Link Parameters  [Rule: " + _ruleName + "]";

            _ruleOptionsForm = new RuleOptionsForm();

            //Retrieve rule properties if rule exists
            IiLogicAutomation ruleApi = iLogicUtilities.GetiLogicAutomation();

            iLogicRule rule = ruleApi.GetRule(_document, _ruleName);

            if (rule != null)
            {
                _ruleOptionsForm.FireDep     = rule.FireDependentImmediately;
                _ruleOptionsForm.DontRunAuto = !rule.AutomaticOnParamChange;
                //_ruleOptionsForm.UpdateWhenDone =
            }

            _sourceParameterDict = new Dictionary <Parameter, ListViewItem>();
            _targetParameterDict = new Dictionary <Parameter, ListViewItem>();

            _currentParamFilter = ParamFilterEnum.kAll;

            Command.SourceComponent = null;
            Command.TargetComponent = null;

            _mappings = ParameterMappingInfo.GetMappings(_document, _ruleName);
        }
        private void Handle_BtnApply_Click(object sender, EventArgs e)
        {
            ApplyMappings();

            _mappings = ParameterMappingInfo.GetMappings(_document, _ruleName);

            RefreshTargetParameters();

            ValidateButtons();
        }