public void OnSpeedChange(int speed) { if ((_oldSpeed < 20) && (speed >= 20)) { _alarm.RaiseAlarm(); } _oldSpeed = speed; }
public void OnSpeedChange(int speed) { if ((_oldSpeed < 20) && (speed >= 20)) { if (_isLocked == false) { _alarm?.RaiseAlarm(); } } _oldSpeed = speed; }
public void RaiseAlarm() { if (_mode == "testing" || _mode == "verification") { Log(); } if (_mode != "testing") { _alarm.RaiseAlarm(); } }
public void DoorOpen() { if (IsDoorOpen == true) { _door.Close(); } else { _alarm.RaiseAlarm(); IsDoorBreached = true; } }
public void DoorOpened() { if (_door.DoorIsOpen == false) { _state = States.DoorClosing; _door.Close(); if (_door.DoorIsOpen == true) { _state = States.DoorBreached; _alarm.RaiseAlarm(); } } }
public void DoorOpened() { if (CurrentDoorState == false) { _door.Closed(); _alarm.RaiseAlarm(); } else if (CurrentDoorState == true) { _door.Closed(); CurrentDoorState = false; } }
public void DoorOpen() { switch (_controlState) { case DoorControlState.Validated: _controlState = DoorControlState.DoorOpened; break; default: _controlState = DoorControlState.DoorBreached; _alarm.RaiseAlarm(); break; } }
public void DoorOpened() { if (_currentState != DoorState.Closed) { _door.Close(); _currentState = DoorState.Closing; } else { _door.Close(); _alarm.RaiseAlarm(); _currentState = DoorState.Breached; } }
public void DoorOpen() { if (_state == State.DoorOpening) { _door.Close(); _state = State.DoorClosing; } else if (_state == State.DoorClosed) { _door.Close(); _alarm.RaiseAlarm(); _state = State.DoorBreached; } }
public void DoorOpened() { switch (_state.State) { case DoorControlState.DoorClosed: _door.Close(); _Alarm.RaiseAlarm(); _state.State = DoorControlState.DoorBreached; break; case DoorControlState.DoorOpening: _door.Close(); _state.State = DoorControlState.DoorClosing; break; default: throw new ArgumentException("Invalid state"); } }
public void Breach() { _alarm.RaiseAlarm(); }
public void RaiseAlarm() { _alarm.RaiseAlarm(); }