public void Undo() { switch (prevSpeed) { case Speed.High: fan.High(); break; case Speed.Low: fan.Low(); break; case Speed.Medium: fan.Medium(); break; case Speed.Off: fan.Off(); break; default: fan.Off(); break; } }
public void Undo() { if (_prevSpeed == CeilingFanSpeed.HIGH) { _ceilingFan.High(); } else if (_prevSpeed == CeilingFanSpeed.MEDIUM) { _ceilingFan.Medium(); } else if (_prevSpeed == CeilingFanSpeed.LOW) { _ceilingFan.Low(); } else { _ceilingFan.Off(); } }
public void undo() { if (prevSpeed == CeilingFan.high) { ceilingFan.High(); } else if (prevSpeed == CeilingFan.medium) { ceilingFan.Medium(); } else if (prevSpeed == CeilingFan.low) { ceilingFan.Low(); } else if (prevSpeed == CeilingFan.off) { ceilingFan.Off(); } }
public void Undo() { if (previousSpeed == CeilingFan.HIGH) { ceilingFan.High(); } else if (previousSpeed == CeilingFan.LOW) { ceilingFan.Low(); } else if (previousSpeed == CeilingFan.MEDIUM) { ceilingFan.Medium(); } else if (previousSpeed == CeilingFan.OFF) { ceilingFan.Off(); } }
public void Undo() { switch (_previousSpeed) { case CeilingFanSpeed.Low: _ceilingFan.Low(); break; case CeilingFanSpeed.Medium: _ceilingFan.Medium(); break; case CeilingFanSpeed.High: _ceilingFan.High(); break; case CeilingFanSpeed.Off: _ceilingFan.Off(); break; } }
public void Execute() { _prevSpeed = _ceilingFan.Speed; _ceilingFan.Off(); }
public void Execute() { prevSpeed = fan.GetSpeed(); fan.Off(); }
public void execute() { prevSpeed = ceilingFan.getSpeed(); ceilingFan.Off(); }
public void Execute() { previousSpeed = ceilingFan.GetCurrentSpeed(); ceilingFan.Off(); }