Exemplo n.º 1
0
Arquivo: Block.cs Projeto: toeb/Blocks
 public void AddConnector(Connector c)
 {
     if (c is Source)
       {
     AddSuccessor(c);
       }
       if (c is Sink)
       {
     AddPredecessor(c);
       }
 }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
 public Wrapper(Connector c, BlocksCanvas canvas)
 {
     Connector = c;
       BlocksCanvas = canvas;
       canvas.PropertyChanged += canvas_PropertyChanged;
 }