private void Display() { tlpRulesAndGroups.Controls.Clear(); tlpRulesAndGroups.AutoScroll = false; tlpRulesAndGroups.VerticalScroll.Enabled = true; tlpRulesAndGroups.VerticalScroll.Visible = true; tlpRulesAndGroups.HorizontalScroll.Enabled = false; tlpRulesAndGroups.HorizontalScroll.Visible = false; //tlpRulesAndGroups.SuspendLayout(); _innerGroupDisplayers.Clear(); rtbxStart.Text = ""; rtbxEnd.Text = ""; if (InnerGroup.GroupType == RulesGroup.GroupLogicalOperator.And) { print(rtbxStart, normalFont, green, resMan.GetString("GroupStart")); print(rtbxStart, boldFont, black, resMan.GetString("RuleAnd")); print(rtbxStart, normalFont, green, ">"); } else { print(rtbxStart, normalFont, green, resMan.GetString("GroupStart")); print(rtbxStart, boldFont, black, resMan.GetString("RuleOR")); print(rtbxStart, normalFont, green, ">"); } foreach (GenericRule rule in InnerGroup.InnerRules.Values) { RuleDisplayer tempRuleDisplayer = new RuleDisplayer(rule); tempRuleDisplayer.SelectedChange += new RuleDisplayer.SelectedChangeEventHandler(Rule_SelectedChange); tempRuleDisplayer.EditionRequested += new RuleDisplayer.EditionRequestedEventHandler(Rule_EditionRequested); tlpRulesAndGroups.Controls.Add(tempRuleDisplayer); } foreach (RulesGroup group in InnerGroup.InnerGroups.Values) { GroupDisplayer grpDisplayer = new GroupDisplayer(); grpDisplayer.Dock = DockStyle.Top; _innerGroupDisplayers.Add(grpDisplayer); grpDisplayer.SelectionChange += new SelectionChangeEventHandler(grpDisplayer_SelectionChange); grpDisplayer.EditionRequest += new EditionRequestEventHandler(grpDisplayer_EditionRequest); grpDisplayer.RuleEditionRequest += new RuleEditionRequestEventHandler(Rule_EditionRequested); tlpRulesAndGroups.Controls.Add(grpDisplayer); grpDisplayer.Initialize(group); } if (InnerGroup.GroupType == RulesGroup.GroupLogicalOperator.And) { print(rtbxEnd, normalFont, green, resMan.GetString("GroupEnd")); print(rtbxEnd, boldFont, black, resMan.GetString("RuleAnd")); print(rtbxEnd, normalFont, green, ">"); } else { print(rtbxEnd, normalFont, green, resMan.GetString("GroupEnd")); print(rtbxEnd, boldFont, black, resMan.GetString("RuleOR")); print(rtbxEnd, normalFont, green, ">"); } //tlpRulesAndGroups.ResumeLayout(); //tableLayoutPanel1.PerformLayout(); tlpRulesAndGroups.AutoScroll = true; //tableLayoutPanel1.Refresh(); }
void grpDisplayer_EditionRequest(GroupDisplayer sender) { sender.InnerGroup.Edit(); sender.Initialize(sender.InnerGroup); }