public void undo() { switch (_prevSpeed) { case CeilingFan.eSpeed.OFF: _ceilingFan.Off(); break; case CeilingFan.eSpeed.LOW: _ceilingFan.Low(); break; case CeilingFan.eSpeed.MEDIUM: _ceilingFan.Medium(); break; case CeilingFan.eSpeed.HIGH: _ceilingFan.High(); break; default: break; } _prevSpeed = _ceilingFan.speed; }
public void execute() { _prevSpeed = _ceilingFan.speed; _ceilingFan.Medium(); }