Example #1
0
        /// <summary>
        ///     Handles a drop event
        /// </summary>
        /// <param name="sourceNode"></param>
        public override void AcceptDrop(BaseTreeNode sourceNode)
        {
            base.AcceptDrop(sourceNode);

            if (sourceNode is ActionTreeNode)
            {
                ActionsTreeNode actionsTreeNode = SubNode <ActionsTreeNode>();
                if (actionsTreeNode != null)
                {
                    actionsTreeNode.AcceptDrop(sourceNode);
                }
            }
            else if (sourceNode is PreConditionTreeNode)
            {
                RulePreConditionsTreeNode preConditionsTreeNode = SubNode <RulePreConditionsTreeNode>();
                if (preConditionsTreeNode != null)
                {
                    preConditionsTreeNode.AcceptDrop(sourceNode);
                }
            }
            else if (sourceNode is RuleTreeNode)
            {
                SubRulesTreeNode subRulesTreeNode = SubNode <SubRulesTreeNode>();
                if (subRulesTreeNode != null)
                {
                    subRulesTreeNode.AcceptDrop(sourceNode);
                }
            }
        }
Example #2
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="item"></param>
        public RuleConditionTreeNode(DataDictionary.Rules.RuleCondition item)
            : base(item)
        {
            PreConditions = new RulePreConditionsTreeNode(item);
            Nodes.Add(PreConditions);

            Actions = new ActionsTreeNode(item);
            Nodes.Add(Actions);

            SubRules = new SubRulesTreeNode(item);
            Nodes.Add(SubRules);
        }