예제 #1
0
        //step back
        protected override void NotifyBack(IColorable from, SerialSignal signal)
        {
            if (!(from is OutPoint) && from != this)
            {
                //
                return;
            }
            lock (this)
            {
                if (Output.IsFiltered(from))
                {
                    return;
                }
            }
            //Signal == true;
            signal.StopSending();

            Output.Filter(from);
            //if signal==true - we have to signal, otherwise we just need to find other output;
            if (from == CurrentPath)
            {
                FlowResult();
            }
            if (!SignalIfCan())
            {
                return;
            }
            Signal = signal;
            Output.Filter(from);

            base.NotifyBack(this, signal);
            InvokeOnNotifyBack();
            Input.NotifyBack(this, signal);
        }
예제 #2
0
 private void OnLastFlow(IColorable connection, Color newcolor)
 {
     if (newcolor == null && (connection is ColorableClass))
     {
         Last.Filter((ColorableClass)connection);
     }
 }
예제 #3
0
 private void OnFirstFinished(IColorable sender, Signal stop)
 {
     if (sender is ColorableClass)
     {
         First.Filter((ColorableClass)sender);
     }
 }
예제 #4
0
 public void GetStartColors()
 {
     GetFirst();
     StartColors.Clear();
     foreach (var first in First)
     {
         var color = first.GetCurrentColor();
         if (!StartColors.ContainsKey(first))
         {
             StartColors.Add(first, color);
         }
         if (color == null && NodesToNotify.Contains(first))
         {
             NodesToNotify.Filter(first);
         }
     }
 }
예제 #5
0
        public override void Flow(IColorable connection, Color newColor)
        {
            //TODO add "this"
            if (!(connection is InPoint))
            {
                return;
            }
            Input.Filter(connection);

            /*
             * if (!Input.IsFiltered(connection));
             * if (doFlow)
             * {
             *
             *  base.Flow(connection, newColor);
             *  CurrentColor = newColor;Undo()
             *  DoWork(); //Flow
             * }
             * else
             *  NotifyConnectionBack(connection);*/
        }