Example #1
0
		/// <summary>
		///   Initializes a new instance.
		/// </summary>
		public HeightControl(PreControl preControl, MainControl mainControl, EndControl endControl)
		{
			PreControl = preControl;
			MainControl = mainControl;
			EndControl = endControl;

			Bind(nameof(preControl.ActivateMainControl), nameof(mainControl.VehiclesEntering));
			Bind(nameof(mainControl.ActivateEndControl), nameof(endControl.VehicleEntering));

			Bind(nameof(endControl.CloseTunnel), nameof(TrafficLights.SwitchToRed));
			Bind(nameof(mainControl.CloseTunnel), nameof(TrafficLights.SwitchToRed));
		}
Example #2
0
        /// <summary>
        ///   Initializes a new instance.
        /// </summary>
        public HeightControl(PreControl preControl, MainControl mainControl, EndControl endControl)
        {
            PreControl  = preControl;
            MainControl = mainControl;
            EndControl  = endControl;

            Bind(nameof(preControl.ActivateMainControl), nameof(mainControl.VehiclesEntering));
            Bind(nameof(mainControl.ActivateEndControl), nameof(endControl.VehicleEntering));

            Bind(nameof(endControl.CloseTunnel), nameof(TrafficLights.SwitchToRed));
            Bind(nameof(mainControl.CloseTunnel), nameof(TrafficLights.SwitchToRed));
        }