Example #1
0
 public override void DetachAll()
 {
     StartConnectedShape.IfNotNull(el => el.Connections.RemoveAll(c => c.ToElement == this));
     EndConnectedShape.IfNotNull(el => el.Connections.RemoveAll(c => c.ToElement == this));
     StartConnectedShape = null;
     EndConnectedShape   = null;
 }
Example #2
0
 public override void DisconnectShapeFromConnector(GripType gt)
 {
     (gt.In(startGrips)).IfElse(
         () => StartConnectedShape.IfNotNull(el => el.Connections.RemoveAll(c => c.ToElement == this)),                      // If
         () => EndConnectedShape.IfNotNull(el => el.Connections.RemoveAll(c => c.ToElement == this)));                       // Else
 }