Ejemplo n.º 1
0
        private void AddRule_Click(object sender, RoutedEventArgs e)
        {
            WrapPanel wp             = new WrapPanel();
            bool      WrapPanelFound = false;

            foreach (Object ob in tvItem.Items)
            {
                if (ob.GetType().Equals(typeof(WrapPanel)))   // RuleRow
                {
                    wp             = (WrapPanel)ob;
                    WrapPanelFound = true;
                    break;
                }
            }

            if (!WrapPanelFound)
            {
                tvItem.Items.Add(wp);
            }

            ValidatorCoreLib.ValidationRule rule = new ValidatorCoreLib.ValidationRule(@"New Rule", new PropertySelection("", ""), @"", new EqualOperator(), true, @"");
            RuleRow rr = new RuleRow(rule, wp);

            wp.Children.Add(rr);
            return; // done here!
        }
Ejemplo n.º 2
0
        private void AddFlowsAndRules(ValidatorCoreLib.ValidationFlow in_flow, TreeViewItem tvi)
        {
            FlowRow fr = new FlowRow(in_flow.Name, in_flow.UseAndOperator, tvi);

            tvi.Header     = fr;
            tvi.IsExpanded = true;

            WrapPanel RuleWrapPanel = new WrapPanel();

            foreach (ValidatorCoreLib.ValidationRule rule in in_flow.rules)
            {
                RuleRow rr = new RuleRow(rule, RuleWrapPanel);
                RuleWrapPanel.Children.Add(rr);
            }
            tvi.Items.Add(RuleWrapPanel);

            foreach (ValidatorCoreLib.ValidationFlow flow in in_flow.flows)
            {
                TreeViewItem Newitem = new TreeViewItem();
                Newitem.IsExpanded = true;
                AddFlowsAndRules(flow, Newitem);
                tvi.Items.Add(Newitem);
            }
        }
Ejemplo n.º 3
0
 public ResolveObjectRow(RuleRow ruleRow, string sValue)
 {
     InitializeComponent();
     parentRuleRow     = ruleRow;
     ResolveValue.Text = sValue;
 }
 public ResolveObjectRow_AddNew(RuleRow ruleRow)
 {
     InitializeComponent();
     parentRuleRow = ruleRow;
 }