Ejemplo n.º 1
0
        static internal string GetRuleSetPreview(RuleSet ruleSet)
        {
            StringBuilder preview = new StringBuilder();
            bool          first   = true;

            if (ruleSet != null)
            {
                foreach (Rule rule in ruleSet.Rules)
                {
                    if (first)
                    {
                        first = false;
                    }
                    else
                    {
                        preview.Append("\n");
                    }

                    preview.Append(rule.Name);
                    preview.Append(": ");
                    preview.Append(DesignerHelpers.GetRulePreview(rule));
                }
            }

            return(preview.ToString());
        }
Ejemplo n.º 2
0
 private void UpdateItem(ListViewItem listViewItem, Rule rule)
 {
     listViewItem.SubItems[0].Text = rule.Name;
     listViewItem.SubItems[1].Text = rule.Priority.ToString(CultureInfo.CurrentCulture);
     listViewItem.SubItems[2].Text = (string)this.reevaluationComboBox.Items[(int)rule.ReevaluationBehavior];
     listViewItem.SubItems[3].Text = rule.Active.ToString(CultureInfo.CurrentCulture);
     listViewItem.SubItems[4].Text = DesignerHelpers.GetRulePreview(rule);
 }