Пример #1
0
 protected override bool CloneRelationship(Diagram diagram, Shape first, Shape second)
 {
     if (first.Entity is CompositeType firstType && second.Entity is CompositeType secondType)
     {
         GeneralizationRelationship clone = GeneralizationRelationship.Clone(firstType, secondType);
         return(diagram.InsertGeneralization(clone));
     }
Пример #2
0
        protected override bool CloneRelationship(Diagram diagram, Shape first, Shape second)
        {
            var firstType  = first.Entity as CompositeType;
            var secondType = second.Entity as CompositeType;

            if (firstType != null && secondType != null)
            {
                var clone = GeneralizationRelationship.Clone(firstType, secondType);
                return(diagram.InsertGeneralization(clone));
            }
            return(false);
        }
Пример #3
0
        protected override bool CloneRelationship(IDiagram diagram, Shape first, Shape second)
        {
            if (diagram.DiagramType != DiagramType.ClassDiagram)
            {
                return(false);
            }

            CompositeType firstType  = first.Entity as CompositeType;
            CompositeType secondType = second.Entity as CompositeType;

            if (firstType != null && secondType != null)
            {
                GeneralizationRelationship clone = generalization.Clone(firstType, secondType);
                return(((ClassDiagram)diagram).InsertGeneralization(clone));
            }
            else
            {
                return(false);
            }
        }