private void DeleteRule(ReplacementRulesGroup replacementRulesGroup, ReplacementRule replacementRule)
        {
            replacementRulesGroup.Rules.Remove(replacementRule);
            if (replacementRulesGroup.Rules.Count == 0)
            {
                this.rules.RuleGroups.Remove(replacementRulesGroup);
            }

            this.RefreshRulesUI();
        }
        public ReplacementRuleUI(ReplacementRule rule, string[] tagNames, Expando owner)
        {
            this.rule = rule;
            this.owner = owner;
            this.FlowDirection = FlowDirection.LeftToRight;
            this.MouseDown += this.RuleUIMouseDown;
            this.InitializeComponent();

            this.tagName2.Items.Add("<>");
            this.tagName3.Items.Add("<>");
            this.tagName1.Items.AddRange(tagNames);
            this.tagName2.Items.AddRange(tagNames);
            this.tagName3.Items.AddRange(tagNames);
            this.tagName1.DataBindings.Add("Text", this.rule, "TagName1");
            this.tagName2.DataBindings.Add("Text", this.rule, "TagName2");
            this.tagName3.DataBindings.Add("Text", this.rule, "TagName3");
            this.tagValue1.DataBindings.Add("Text", this.rule, "TagValue1");
            this.tagValue2.DataBindings.Add("Text", this.rule, "TagValue2");
            this.tagValue3.DataBindings.Add("Text", this.rule, "TagValue3");
        }