public void AddConnector(Connector c) { if (c is Source) { AddSuccessor(c); } if (c is Sink) { AddPredecessor(c); } }
public static bool CheckConnectorCompatibility(Connector c1, Connector c2) { var sink = c1 as Sink ?? c2 as Sink ; var source = c1 as Source ?? c2 as Source; if (source == null) return true; if (sink == null) return true; return source.Type == sink.Type || source.Type.IsSubclassOf(sink.Type); }
public Wrapper(Connector c, BlocksCanvas canvas) { Connector = c; BlocksCanvas = canvas; canvas.PropertyChanged += canvas_PropertyChanged; }