private void AddRelationship(Relationship relationship)
 {
     relationships.Add(relationship);
     relationship.Modified += new EventHandler(ElementChanged);
     OnRelationAdded(new RelationshipEventArgs(relationship));
 }
        public void RemoveRelationship(Relationship relationship)
        {
            if (relationships.Contains(relationship))
            {

                if (relationship.RelationshipType == RelationshipType.Edge)
                {
                    //remove the corresponding edgeID list element.
                    RemoveEdgeID((EdgeRelationship)relationship);
                }
                if (relationship.RelationshipType == RelationshipType.Path)
                {
                    RemoveEdgeID((PathRelationShip)relationship);
                }
                relationship.Detach();
                relationship.Modified -= new EventHandler(ElementChanged);
                relationships.Remove(relationship);
                OnRelationRemoved(new RelationshipEventArgs(relationship));
            }
        }
 public RelationshipEventArgs(Relationship relationship)
 {
     this.relationship = relationship;
 }
 protected virtual void CopyFrom(Relationship relationship)
 {
     label = relationship.label;
 }
Exemple #5
0
 protected virtual void CopyFrom(Relationship relationship)
 {
     label = relationship.label;
 }