/// <summary> /// Handles making the connection, whether it's starting a new /// one or completing the existing one /// </summary> /// <param name="selectedNode">The node to react to</param> private void MakeConnection(Node selectedNode) { if (startNode == null) { startNode = selectedNode; connection = ConnectorFactory(NodeEditor, startNode, NodeEditor.MouseNode); NodeEditor.AddConnector(connection); NodeEditor.AddNode(startNode); } else { connection.RemoveNode(NodeEditor.MouseNode); connection.AddNode(selectedNode); startNode = null; connection = null; } }