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 (_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 (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.High(); }
public void Execute() { prevSpeed = fan.GetSpeed(); fan.High(); }
public void Execute() { previousSpeed = ceilingFan.GetCurrentSpeed(); ceilingFan.High(); }
public void execute() { prevSpeed = ceilingFan.getSpeed(); ceilingFan.High(); }
public void Excecute() { prevspeed = ceilingFan.GetSpeed(); ceilingFan.High(); }