private void UpdateFanSpeedAnimation(FanSpeed speed) { ((Storyboard)Resources["Storyboard"]).Stop(); switch (speed) { case FanSpeed.Low: _rotateAnimation.Duration = new Duration(TimeSpan.FromSeconds(1)); _rotateAnimation.RepeatBehavior = RepeatBehavior.Forever; break; case FanSpeed.Medium: _rotateAnimation.Duration = new Duration(TimeSpan.FromSeconds(.1)); _rotateAnimation.RepeatBehavior = RepeatBehavior.Forever; break; case FanSpeed.High: _rotateAnimation.Duration = new Duration(TimeSpan.FromSeconds(.01)); _rotateAnimation.RepeatBehavior = RepeatBehavior.Forever; break; } if (Value) { ((Storyboard)Resources["Storyboard"]).Begin(); } }
private void AdjustFanSpeed() { switch (_fanSpeed) { case FanSpeed.Low: _fanSpeed = FanSpeed.Medium; Console.WriteLine("Setting fan speed to medium"); break; case FanSpeed.Medium: _fanSpeed = FanSpeed.High; Console.WriteLine("Setting fan speed to high"); break; case FanSpeed.High: _fanSpeed = FanSpeed.Max; Console.WriteLine("Setting fan speed to max"); break; default: _fanSpeed = FanSpeed.Low; Console.WriteLine("Setting fan speed to low"); break; } }
public void Revert() { if (_oldSpeed == FanSpeed.Off) { TurnACOff(); } else { Console.WriteLine("Setting fan speed to previous"); _fanSpeed = _oldSpeed; } }
public void TurnACOff() { if (_on) { Console.WriteLine("Turning AC off"); _on = false; _fanSpeed = FanSpeed.Off; } else { Console.WriteLine("AC already off"); } }
public GPUAnalysis Analyze() { return(new GPUAnalysis() { BusLoad = BusLoad.IsSensorThresholded(), CoreClock = CoreClock.IsSensorThresholded(), CoreLoad = CoreLoad.IsSensorThresholded(), CoreTemperature = CoreTemperature.IsSensorThresholded(), FanSpeed = FanSpeed.IsSensorThresholded(), FrameBufferLoad = FrameBufferLoad.IsSensorThresholded(), ShaderClock = ShaderClock.IsSensorThresholded(), VideoEngineLoad = VideoEngineLoad.IsSensorThresholded() }); }
public void TurnACOn() { if (_on) { _oldSpeed = _fanSpeed; AdjustFanSpeed(); } else { _on = true; _fanSpeed = FanSpeed.Low; Console.WriteLine("Turning AC on"); } }
public void SpeedUp() { if (IsOn) { switch (fanSpeed) { case FanSpeed.Slow: fanSpeed = FanSpeed.Medium; break; case FanSpeed.Medium: fanSpeed = FanSpeed.Fast; break; } } }
public static void ChangeFanSpeed(long lRequestId, FanSpeed speed) { AirConditionerCommand command = new AirConditionerCommand(); Logging.WriteDebugLog("AirConditioner.ChangeFanSpeed() [0x{0}] Changing Fan Speed: {1}", lRequestId.ToString("X8"), Enum.GetName(typeof(FanSpeed), speed)); lock (_oLockCommand) { command.amOn = _airConditionerCommand.amOn; command.tempTarget = _airConditionerCommand.tempTarget; command.fanSpeed = (int)speed; command.mode = _airConditionerCommand.mode; command.enabledZones = _airConditionerCommand.enabledZones; } MQTT.SendMessage("actron/aircon/fanmode", Enum.GetName(typeof(FanSpeed), speed).ToLower()); PostCommand(lRequestId, "System", command); }
public void SetSpeed(FanSpeed fanSpeed) { Console.WriteLine("Fan - Fan speed: " + fanSpeed); }
public CeilingFan(string location) { _location = location; _fanSpeed = FanSpeed.Off; }
public void Off() { _fanSpeed = FanSpeed.Off; Console.WriteLine($"{_location} ceiling fan is off"); }
public void Low() { _fanSpeed = FanSpeed.Low; Console.WriteLine($"{_location} ceiling fan is on low"); }
public void Hight() { _speed = FanSpeed.High; }
public void Medium() { Console.WriteLine($"Ceiling fan in {_roomName} set to medium"); _speed = FanSpeed.Medium; }
public void Off() { Console.WriteLine($"Ceiling fan in {_roomName} fan off"); _speed = FanSpeed.Off; }
public void Execute() { _prevSpeed = _ceilingFan.GetSpeed(); _ceilingFan.Hight(); }
public async Task SetFanSpeed(FanSpeed speed) { await SendCommand(Commands.AC_FUN_WINDLEVEL, speed.ToString()); }
public void SetSpeed(FanSpeed fanSpeed) { _Clevo.RunMethod(_SetMethodName, (uint)fanSpeed); }
public void Off() { _speed = FanSpeed.Off; }
public void Low() { _speed = FanSpeed.Low; }
public void Medium() { _speed = FanSpeed.Medium; }
public void High() { Console.WriteLine($"Ceiling fan in {_roomName} set to high"); _speed = FanSpeed.High; }
public void High() { _fanSpeed = FanSpeed.High; Console.WriteLine($"{_location} ceiling fan is on high"); }
public void Low() { Console.WriteLine($"Ceiling fan in {_roomName} set to low"); _speed = FanSpeed.Low; }
public void Medium() { _fanSpeed = FanSpeed.Medium; Console.WriteLine($"{_location} ceiling fan is on medium"); }
public Conditioner(int temperature, FanSpeed fanSpeed) : base(10, 30, temperature) { this.fanSpeed = fanSpeed; }
public CeilingFan(string roomName) { _roomName = roomName; _speed = FanSpeed.Off; }
public void Execute() { _previousSpeed = _ceilingFan.GetSpeed(); _ceilingFan.Off(); }
public CeilingFan(string roomName) { _roomName = roomName; _speed = FanSpeed.Off; SpeedStack = new Stack <FanSpeed>(); }