public string Undo()
        {
            switch (_prevSpeed)
            {
            case Fan.High:
                return(_fan.SetHigh());

            case Fan.Medium:
                return(_fan.SetMedium());

            case Fan.Low:
                return(_fan.SetLow());

            case Fan.Off:
                return(_fan.SetOff());

            default:
                return("fan set speed error");
            }
        }
Example #2
0
        public string Execute()
        {
            _prevSpeed = _fan.Speed;

            return(_fan.SetHigh());
        }