public void SetFanData(HeadSetFanModes fMode) { #if true WriteHID(new HPLouieHeadSetCmd(HeadSetCmds.Fan, fMode).ToByteArry()); #else WriteHID(new HeadSetFan(fMode).ToByteArry()); #endif }
private void OnButtonClick(string obj) { string LEDMode = string.Empty; string FanMode = string.Empty; if (obj.Equals(CloseCmd)) { headSetModel.CloseHID(); } if (obj.Equals(LEDCmd)) { //LED Control foreach (var subItem in mainItems[0].SubItems) { if (subItem.MenuChecked) { LEDMode = subItem.MenuName; break; } } if (!string.IsNullOrEmpty(LEDMode)) { //Get Color List <Brush> lstBrush = new List <Brush>(); foreach (var childItem in mainItems[0].ChildItems) { if (childItem.MenuChecked) { lstBrush.Add((childItem as BrushMenuItem).MenuBrush); } } headSetModel.SetColorData(LEDMode, lstBrush, ushort.Parse(mainItems[0].ColorInterVal.MenuName)); } } if (obj.Equals(FanCmd)) { #if true headSetModel.GetFWInfo(); #else //Fan Control foreach (var subItem in mainItems[1].SubItems) { if (subItem.MenuChecked) { FanMode = subItem.MenuName; break; } } if (!string.IsNullOrEmpty(FanMode)) { HeadSetFanModes fMode = (HeadSetFanModes)Enum.Parse(typeof(HeadSetFanModes), FanMode); headSetModel.SetFanData(fMode); } #endif } }
/// <summary> /// Constructor command for TEC Cooling Device. /// </summary> /// <param name="cmd">HID Command</param> /// <param name="_fanMode">Cooling Mode</param> public HPLouieHeadSetCmd(HeadSetCmds cmd, HeadSetFanModes _fanMode) { headSetCmd = cmd; fanMode = _fanMode; }
public HeadSetFan(HeadSetFanModes _fanMode) : base(HeadSetCmds.Fan) { fanMode = _fanMode; }