Beispiel #1
0
        public void AddConnection(ConnectionGUI connection, bool twoWay)
        {
            AddAssociation(connection.startNode, connection);

            if (twoWay)
            {
                AddAssociation(connection.endNode, connection);
            }

            connectionList.Add(connection);
        }
Beispiel #2
0
        public void SelectConnection(ConnectionGUI connection)
        {
            foreach (var item in connectionList)
            {
                item.SetInactive();
            }

            if (connection != null)
            {
                connection.SetActive();
            }
        }
Beispiel #3
0
        private void AddAssociation(NodeGUI node, ConnectionGUI connection)
        {
            if (node == null)
            {
                return;
            }

            if (!nodeToConnectionMap.ContainsKey(node))
            {
                // add it
                nodeToConnectionMap.Add(node, new List <ConnectionGUI>());
            }

            nodeToConnectionMap[node].Add(connection);
        }
Beispiel #4
0
        public ConnectionGUI CreateConnection()
        {
            var connection = new ConnectionGUI();

            return(connection);
        }