Ejemplo n.º 1
0
 internal static void RebuildParentage(ConditionGroup cg)
 {
     foreach (ConditionComponent cc in cg.Children)
     {
         cc.Parent = cg;
         if (cc is ConditionGroup)
         {
             RebuildParentage((ConditionGroup)cc);
         }
     }
 }
Ejemplo n.º 2
0
        internal override ConditionComponent Duplicate()
        {
            ConditionGroup cg = new ConditionGroup();

            cg.Enabled  = Enabled;
            cg.Grouping = Grouping;
            foreach (ConditionComponent cc in Children)
            {
                cg.AddChild(cc.Duplicate());
            }
            return(cg);
        }
Ejemplo n.º 3
0
        private void _Conditions_ItemAdded(object sender, EventListArgs <Condition> e)
        {
            if (Condition == null)
            {
                Condition          = new ConditionGroup();
                Condition.Grouping = ConditionGroup.CndGroupingEnum.And;
                Condition.Enabled  = true;
            }
            Condition cx = e.Item;

            Condition.AddChild(cx.ConvertToConditionSingle());
            _Conditions.Remove(e.Item);
        }