Пример #1
0
 public void Add(InputPin pin)
 {
     if (inputPins.Contains(pin))
     {
         return;
     }
     inputPins.Add(pin);
     AddInternal((Pin)pin);
     ChangeJunctionStateByPin(pin);
 }
Пример #2
0
        private void ChangeJunctionStateByPin(InputPin pin)
        {
            var allHigh = AllHigh();

            if (allHigh)
            {
                pin.State = true;
            }
            foreach (var p in inputPins)
            {
                if (p == pin)
                {
                    continue;
                }
                p.State = allHigh || pin.State;
            }
        }