//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); }
private void OnLastFlow(IColorable connection, Color newcolor) { if (newcolor == null && (connection is ColorableClass)) { Last.Filter((ColorableClass)connection); } }
private void OnFirstFinished(IColorable sender, Signal stop) { if (sender is ColorableClass) { First.Filter((ColorableClass)sender); } }
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); } } }
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);*/ }