Ejemplo n.º 1
0
 // Constructor
 public Connection(Gate startgate, Gate endgate)
 {
     //this.value = startgate.MyOutputValue;
     this.startgate = startgate;
     this.endgate = endgate;
     this.connectioncolor = Color.Black;
 }
Ejemplo n.º 2
0
 // Changed from bool to void
 /// <summary>
 /// Adds a connection between two gates
 /// </summary>
 /// <param name="startgate"></param>
 /// <param name="endgate"></param>
 public void AddConnection(Gate startgate, Gate endgate)
 {
     //Connection tempConnection = new Connection(startgate, endgate);
     //connections.Add(tempConnection);
 }
Ejemplo n.º 3
0
 // Changed from bool to void
 /// <summary>
 /// Removes a gate from the list of gates.
 /// If the gate has connections to it, these will be deleted too.
 /// </summary>
 /// <param name="currentgate"></param>
 public void RemoveGate(Gate currentgate)
 {
     List<Connection> connectionsToRemove = new List<Connection>();
     //connectionsToRemove = currentgate.myConnections;
     foreach (Connection connection in connectionsToRemove)
     {
         connections.Remove(connection);
     }
 }