public void AddToSurface(DiagramSurface surface)
        {
            Surface = surface;
            Surface.Children.Add(this);

            SourceEndPoint = new ConnectorEndPoint(this);
            TargetEndPoint = new ConnectorEndPoint(this);

            // Setup ConnectorEndPoints
            if (DrawingStrategy != null && DrawingStrategy.OverrideConnectorEndPointSetup)
            {
                DrawingStrategy.CustomSetupConnectorEndPoint(this);
            }

            SetupSourceConnectorEndPoint();
            SetupTargetConnectorEndPoint();

            SourceEndPoint.AddToSurface(surface);
            TargetEndPoint.AddToSurface(surface);

            // Setup Adorners
            AdornerLayer layer = AdornerLayer.GetAdornerLayer(this);

            if (layer == null)
            {
                return;
            }

            SetupRelationshipNameAdorner(layer);

            //SetupSourceCardinalityAdorner(layer);
            //SetupTargetCardinalityAdorner(layer);
        }
Exemple #2
0
 public void SetStrategy(DrawingStrategy strategy)
 {
     this.strategy = strategy;
 }
Exemple #3
0
 public NCircle(Path adaptedPath) : base(adaptedPath)
 {
     strategy = new DrawingStrategyClassic();
 }