Esempio n. 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);
                }
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Handles a drop event
        /// </summary>
        /// <param name="SourceNode"></param>
        public override void AcceptDrop(BaseTreeNode SourceNode)
        {
            base.AcceptDrop(SourceNode);

            if (SourceNode is ActionTreeNode)
            {
                Actions.AcceptDrop(SourceNode);
            }
            else if (SourceNode is PreConditionTreeNode)
            {
                PreConditions.AcceptDrop(SourceNode);
            }
            else if (SourceNode is RuleTreeNode)
            {
                SubRules.AcceptDrop(SourceNode);
            }
        }