Beispiel #1
0
 public static bool connect(Node from, string fromPort, Node to, string toPort)
 {
     if (!from.addOutput(fromPort, to, toPort))
     {
         return(false);
     }
     if (!to.addInput(toPort, from, fromPort))
     {
         from.removeOutput(fromPort, to, toPort);
         return(false);
     }
     return(true);
 }
Beispiel #2
0
 public static void disconnect(Node from, string fromPort, Node to, string toPort) {
     from.removeOutput(fromPort, to, toPort);
     to.removeInput(toPort);
 }
Beispiel #3
0
 public static bool connect(Node from, string fromPort, Node to, string toPort) {
     if (!from.addOutput(fromPort, to, toPort))
         return false;
     if (!to.addInput(toPort, from, fromPort)) {
         from.removeOutput(fromPort, to, toPort);
         return false;
     }
     return true;
 }
Beispiel #4
0
 public static void disconnect(Node from, string fromPort, Node to, string toPort)
 {
     from.removeOutput(fromPort, to, toPort);
     to.removeInput(toPort);
 }