Beispiel #1
0
        public void SetState(TrafficLightControllerState trafficLightState)
        {
            if (BlinkSignalTimer != null)
            {
                BlinkSignalTimer.Dispose();
            }

            switch (TrafficLightType)
            {
            case TrafficLightType.RoadATrafficLight:
                SetLampState(trafficLightState.RoadAState);
                break;

            case TrafficLightType.RoadBTrafficLight:
                SetLampState(trafficLightState.RoadBState);
                break;

            case TrafficLightType.PedestrianTrafficLight:
                SetLampState(trafficLightState.PedestrianTrafficLightState);
                break;

            default:
                break;
            }
        }
        public void SetState(TrafficLightControllerState trafficLightState)
        {
            if (BlinkSignalTimer != null)
                    BlinkSignalTimer.Dispose();

                switch (TrafficLightType)
                {
                    case TrafficLightType.RoadATrafficLight:
                        SetLampState(trafficLightState.RoadAState);
                        break;

                    case TrafficLightType.RoadBTrafficLight:
                        SetLampState(trafficLightState.RoadBState);
                        break;

                    case TrafficLightType.PedestrianTrafficLight:
                        SetLampState(trafficLightState.PedestrianTrafficLightState);
                        break;

                    default:
                        break;
                }
        }