예제 #1
0
 public void Clear()
 {
     if (isOutput && !empty)
     {
         foreach (Connection c in OtherConnections.ToList())
             c.Clear();
     }
     else if (!empty)
     {
         point = null;
         OtherConnection.OtherConnections.Remove(this);
         OtherConnection.empty = OtherConnection.OtherConnections.Count == 0;
     }
     empty = true;
 }
예제 #2
0
 public void ConnectTo(Connection connection)
 {
     if (!isOutput && !empty)
     {
         Clear();
     }
     connection.empty = empty = false;
     if (isOutput)
     {
         OtherConnections.Add(connection);
         connection.OtherConnection = this;
     }
     else
     {
         connection.OtherConnections.Add(this);
         OtherConnection = connection;
     }
 }