public void TurnOn(ChangerLightEvent changerLightEvent)
 {
     Timer timer = new Timer(6000);
     timer.Elapsed += (sender, e) => SwitchLight(sender, e, changerLightEvent);
     isEnabled = true;
     timer.Start();
 }
 private void SwitchLight(object source, ElapsedEventArgs e, ChangerLightEvent changerLightEvent)
 {
     if (isEnabled)
         changerLightEvent.SimulateEvent(RED_COLOR);
     else
         changerLightEvent.SimulateEvent(GREEN_COLOR);
     isEnabled = !(isEnabled);
 }
 private void SwitchLight(object source, ElapsedEventArgs e, ChangerLightEvent changerLightEvent)
 {
     changerLightEvent.SimulateEvent(current_light.Value);
     if (isEnabled && current_light.Next != null)
     {
         current_light = current_light.Next;
     }
     else if (!isEnabled && current_light.Previous != null)
     {
         current_light = current_light.Previous;
     }
     else
     {
         isEnabled = !(isEnabled);
     }
 }