コード例 #1
0
        private void xConnThumb_DragCompleted(Object sender, System.Windows.Controls.Primitives.DragCompletedEventArgs e)
        {
            xLineHost.Children.Remove(connectionLine);
            if (currentlyHoveredDot != null)
            {
                var that   = currentlyHoveredDot;
                int thisID = this.UniqueID;
                int thatID = that.UniqueID;

                var args = new ConnectorDotConnectedEventArgs(thisID, thatID);

                this.Connected?.Invoke(this, args);
                that.GotConnected?.Invoke(that, args);

                //Debug.WriteLine($"Connecting {thisID} to {thatID}");
            }

            (this as IMouseProximityActivatable).IsActivated = (this as IMouseProximityActivatable).IsActivated;
        }
コード例 #2
0
 private void OnConnectorDotGotConnected(object sender, ConnectorDotConnectedEventArgs e)
 {
     UpdateConnectionPointPositions();
 }
コード例 #3
0
 private void OnConnectorDotConnected(Object sender, ConnectorDotConnectedEventArgs e)
 {
     CreateConnectionCommand?.Execute(new Tuple <int, int>(e.ID1, e.ID2));
     UpdateConnectionPointPositions();
 }