예제 #1
0
        private void OnOrOffTrafficLight(int number, bool status)
        {
            if (status)
            {
                switch (number)
                {
                case 0: Klub_u.OnTrafficLight0Indicator(); break;

                case 1: Klub_u.OnTrafficLight1Indicator(); break;

                case 2: Klub_u.OnTrafficLight2Indicator(); break;

                case 3: Klub_u.OnTrafficLight3Indicator(); break;

                case 4: Klub_u.OnTrafficLight4Indicator(); break;

                case 5: Klub_u.OnTrafficLight5Indicator(); break;

                case 6: Klub_u.OnTrafficLight6Indicator(); break;

                case 7: Klub_u.OnTrafficLight7Indicator(); break;

                case 8: Klub_u.OnTrafficLight0BlinkIndicator(); break;

                default: MessageBox.Show("ERROR: On TrafficLight Indicator " + number.ToString()); break;
                }
            }
            else
            {
                switch (number)
                {
                case 0: Klub_u.OffTrafficLight0Indicator(); break;

                case 1: Klub_u.OffTrafficLight1Indicator(); break;

                case 2: Klub_u.OffTrafficLight2Indicator(); break;

                case 3: Klub_u.OffTrafficLight3Indicator(); break;

                case 4: Klub_u.OffTrafficLight4Indicator(); break;

                case 5: Klub_u.OffTrafficLight5Indicator(); break;

                case 6: Klub_u.OffTrafficLight6Indicator(); break;

                case 7: Klub_u.OffTrafficLight7Indicator(); break;

                case 8: Klub_u.OffTrafficLight0BlinkIndicator(); break;

                default: MessageBox.Show("ERROR: Off TrafficLight Indicator " + number.ToString()); break;
                }
            }
        }