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