Exemple #1
0
        public static void UpdateWindowsStatus(BusConfig bus, string name)
        {
            var selectedWindow = bus.Windows.First(window => window.Name == name);

            if (selectedWindow != null)
            {
                selectedWindow.State = (selectedWindow.State == 1) ? 2 : 1;
            }
        }
Exemple #2
0
        public static void UpdateDoorStatus(BusConfig bus, string name)
        {
            var selectedDoor = bus.Doors.First(door => door.Name == name);

            if (selectedDoor != null)
            {
                selectedDoor.State = (selectedDoor.State == 1) ? 2 : 1;
            }
        }