Exemplo n.º 1
0
 public Connection(Connector source, Connector sink)
 {
     this.ID = Guid.NewGuid();
     this.Source = source;
     this.Sink = sink;
     base.Unloaded += new RoutedEventHandler(Connection_Unloaded);
 }
Exemplo n.º 2
0
 public ConnectorAdorner(DesignerCanvas designer, Connector sourceConnector)
     : base(designer)
 {
     this.designerCanvas = designer;
     this.sourceConnector = sourceConnector;
     drawingPen = new Pen(Brushes.YellowGreen, 0.5);//LightSlateGray
     drawingPen.LineJoin = PenLineJoin.Miter;
     this.Cursor = Cursors.Cross;
 }
Exemplo n.º 3
0
        void thumbDragThumb_DragStarted(object sender, DragStartedEventArgs e)
        {
            this.HitDesignerItem = null;
            this.HitConnector = null;
            this.pathGeometry = null;
            this.Cursor = Cursors.Cross;
            this.connection.StrokeDashArray = new DoubleCollection(new double[] { 1, 2 });

            if (sender == sourceDragThumb)
            {
                fixConnector = connection.Sink;
                dragConnector = connection.Source;
            }
            else if (sender == sinkDragThumb)
            {
                dragConnector = connection.Sink;
                fixConnector = connection.Source;
            }
        }