/// <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);
            }
        }
Beispiel #2
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);
            }
        }
Beispiel #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;
                DataDictionary.Rules.Rule rule = node.Item;
                node.Delete();
                AddRule(rule);
            }
        }
Beispiel #4
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);
                }
            }
        }
        /// <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);
                }
            }
        }
Beispiel #6
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);
            }
        }