/// <summary>
        /// Create structure based on the subsystem structure
        /// </summary>
        /// <param name="SourceNode"></param>
        public override void AcceptDrop(BaseTreeNode SourceNode)
        {
            base.AcceptDrop(SourceNode);

            if (SourceNode is RuleTreeNode)
            {
                RuleTreeNode node = SourceNode as RuleTreeNode;
                DataDictionary.Rules.Rule rule = node.Item;
                node.Delete();
                AddRule(rule);
            }
            else if (SourceNode is SpecificationView.ParagraphTreeNode)
            {
                SpecificationView.ParagraphTreeNode    node     = SourceNode as SpecificationView.ParagraphTreeNode;
                DataDictionary.Specification.Paragraph paragaph = node.Item;

                DataDictionary.Rules.Rule rule = (DataDictionary.Rules.Rule)DataDictionary.Generated.acceptor.getFactory().createRule();
                rule.Name = paragaph.Name;

                DataDictionary.ReqRef reqRef = (DataDictionary.ReqRef)DataDictionary.Generated.acceptor.getFactory().createReqRef();
                reqRef.Name = paragaph.FullId;
                rule.appendRequirements(reqRef);
                AddRule(rule);
            }
        }
Пример #2
0
        /// <summary>
        /// Adds a rule in the corresponding namespace
        /// </summary>
        /// <param name="variable"></param>
        public RuleTreeNode AddRule(DataDictionary.Rules.Rule rule)
        {
            Item.appendRules(rule);
            RuleTreeNode retVal = new RuleTreeNode(rule);

            Nodes.Add(retVal);

            return(retVal);
        }
Пример #3
0
        /// <summary>
        ///     Create structure based on the subsystem structure
        /// </summary>
        /// <param name="sourceNode"></param>
        public override void AcceptDrop(BaseTreeNode sourceNode)
        {
            base.AcceptDrop(sourceNode);

            if (sourceNode is RuleTreeNode)
            {
                RuleTreeNode node = sourceNode as RuleTreeNode;
                Rule         rule = node.Item;
                node.Delete();
                Item.appendRules(rule);
            }
        }
Пример #4
0
        /// <summary>
        /// Create structure based on the subsystem structure
        /// </summary>
        /// <param name="SourceNode"></param>
        public override void AcceptDrop(BaseTreeNode SourceNode)
        {
            base.AcceptDrop(SourceNode);

            if (SourceNode is RuleTreeNode)
            {
                RuleTreeNode node = SourceNode as RuleTreeNode;
                DataDictionary.Rules.Rule rule = node.Item;
                node.Delete();
                AddRule(rule);
            }
        }
Пример #5
0
        /// <summary>
        /// Handles a drop event
        /// </summary>
        /// <param name="SourceNode"></param>
        public override void AcceptDrop(BaseTreeNode SourceNode)
        {
            if (SourceNode is RuleTreeNode)
            {
                if (MessageBox.Show("Are you sure you want to move the corresponding rule ?", "Move rule", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                {
                    RuleTreeNode ruleTreeNode = (RuleTreeNode)SourceNode;

                    DataDictionary.Rules.Rule rule = ruleTreeNode.Item;
                    ruleTreeNode.Delete();
                    AddRule(rule);
                }
            }
        }
Пример #6
0
        /// <summary>
        ///     Handles a drop event
        /// </summary>
        /// <param name="sourceNode"></param>
        public override void AcceptDrop(BaseTreeNode sourceNode)
        {
            RuleTreeNode ruleTreeNode = sourceNode as RuleTreeNode;

            if (ruleTreeNode != null)
            {
                if (
                    MessageBox.Show("Are you sure you want to move the corresponding rule ?", "Move rule",
                                    MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                {
                    Rule rule = ruleTreeNode.Item;
                    ruleTreeNode.Delete();
                    Item.appendSubRules(rule);
                    Item.setVerified(false);
                }
            }
        }
Пример #7
0
        /// <summary>
        ///     Create structure based on the subsystem structure
        /// </summary>
        /// <param name="sourceNode"></param>
        public override void AcceptDrop(BaseTreeNode sourceNode)
        {
            base.AcceptDrop(sourceNode);

            if (sourceNode is RuleTreeNode)
            {
                RuleTreeNode node = sourceNode as RuleTreeNode;
                Rule         rule = node.Item;
                node.Delete();
                Item.appendRules(rule);
            }
            else if (sourceNode is ParagraphTreeNode)
            {
                ParagraphTreeNode node      = sourceNode as ParagraphTreeNode;
                Paragraph         paragraph = node.Item;

                Rule rule = Rule.CreateDefault(Item.Rules);
                Item.appendRules(rule);
                rule.FindOrCreateReqRef(paragraph);
            }
        }