/// <summary>
        ///     Accepts drop of a tree node, in a drag & drop operation
        /// </summary>
        /// <param name="sourceNode"></param>
        public override void AcceptDrop(BaseTreeNode sourceNode)
        {
            base.AcceptDrop(sourceNode);

            if (sourceNode is StructureElementTreeNode)
            {
                StructureElementTreeNode structureElementTreeNode = sourceNode as StructureElementTreeNode;
                StructureElement         element = structureElementTreeNode.Item;

                structureElementTreeNode.Delete();
                Item.appendElements(element);
            }
            else if (sourceNode is ParagraphTreeNode)
            {
                ParagraphTreeNode node      = sourceNode as ParagraphTreeNode;
                Paragraph         paragraph = node.Item;

                StructureElement element = StructureElement.CreateDefault(Item.Elements);
                Item.appendElements(element);
                element.FindOrCreateReqRef(paragraph);
            }
        }
Exemplo n.º 2
0
 public void AddStructureElementHandler(object sender, EventArgs args)
 {
     Item.appendElements(StructureElement.CreateDefault(Item.Elements));
 }