private static void UnsubscribeInputSocket(Connector connector) { if (null == connector.inputSocket) return; connector.inputSocket.PositionChanged -= connector.OnInputSocketPositionChanged; connector.inputSocket.Connect(null); }
private static void SubscribeOutputSocket(Connector connector) { if (null == connector.outputSocket) return; connector.outputSocket.PositionChanged += connector.OnOutputSocketPositionChanged; connector.outputSocket.Connect(connector); }
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); } }
private void DragOutputConnector(MouseButtonEventArgs e) { var connector = new Connector(); addConnectorCallback(connector); connectors.Add(connector); connector.ConnectInputEndPoint(this); connector.DragOutputEndPoint(e); }
public void RemoveConnector(Connector connector) { Items.Remove(connector); }
public void AddConnector(Connector connector) { Items.Insert(0, connector); }