예제 #1
0
 private static void UnsubscribeInputSocket(Connector connector)
 {
     if (null == connector.inputSocket) return;
     connector.inputSocket.PositionChanged -= connector.OnInputSocketPositionChanged;
     connector.inputSocket.Connect(null);
 }
예제 #2
0
 private static void SubscribeOutputSocket(Connector connector)
 {
     if (null == connector.outputSocket) return;
     connector.outputSocket.PositionChanged += connector.OnOutputSocketPositionChanged;
     connector.outputSocket.Connect(connector);
 }
예제 #3
0
 private void DragInputConnector(MouseButtonEventArgs e)
 {
     if (connectors.Any())
         connectors.First().DragOutputEndPoint(e);
     else
     {
         var connector = new Connector();
         addConnectorCallback(connector);
         connectors.Add(connector);
         connector.ConnectOutputEndPoint(this);
         connector.DragInputEndPoint(e);
     }
 }
예제 #4
0
 private void DragOutputConnector(MouseButtonEventArgs e)
 {
     var connector = new Connector();
     addConnectorCallback(connector);
     connectors.Add(connector);
     connector.ConnectInputEndPoint(this);
     connector.DragOutputEndPoint(e);
 }
예제 #5
0
 public void RemoveConnector(Connector connector)
 {
     Items.Remove(connector);
 }
예제 #6
0
 public void AddConnector(Connector connector)
 {
     Items.Insert(0, connector);
 }