private void UpdateScreenDigits() { int[] digitNumbers = _numbers[DisplayValue / 10]; ScreenDigit1Pins.SwitchAll(false); ScreenDigit1Pins.Where((p, i) => digitNumbers.Contains(i)).SwitchAll(true); digitNumbers = _numbers[DisplayValue % 10]; ScreenDigit2Pins.SwitchAll(false); ScreenDigit2Pins.Where((p, i) => digitNumbers.Contains(i)).SwitchAll(true); }
public void Reset() { CarroPins.SwitchAll(false); CarroPins[0].IsOn = true; PedestrePins.SwitchAll(false); PedestrePins[1].IsOn = true; ScreenDigit1Pins.SwitchAll(false); ScreenDigit2Pins.SwitchAll(false); IsButtonEnabled = true; HideCounter(); }