コード例 #1
0
ファイル: ConnectorAdorner.cs プロジェクト: NKnusperer/DEISE
 public ConnectorAdorner(DesignerCanvas designer, Connector sourceConnector)
     : base(designer)
 {
     this.designerCanvas = designer;
     this.sourceConnector = sourceConnector;
     drawingPen = new Pen(Brushes.LightSlateGray, 1);
     drawingPen.LineJoin = PenLineJoin.Round;
     this.Cursor = Cursors.Cross;
 }
コード例 #2
0
ファイル: Connection.cs プロジェクト: NKnusperer/DEISE
 public Connection(Connector source, Connector sink)
 {
     this.Source = source;
     this.Sink = sink;
     base.Unloaded += new RoutedEventHandler(Connection_Unloaded);
 }
コード例 #3
0
ファイル: ConnectionAdorner.cs プロジェクト: NKnusperer/DEISE
        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;
            }
        }