private async Task <HeadSetErrorCode> setAudioAnimation() { if (colorModeBox.SelectedIndex != (int)HeadsetLightingEnum.Audio) { colorModeBox.SelectedIndex = (int)HeadsetLightingEnum.Audio; return(HeadSetErrorCode.HID_WriteSuccess); } HeadSetErrorCode result = await AccessoryHeadSetHelper.SetHeadsetAnimationAsync(hidIndex, HeadsetAnimation.Audio, defaultAnimationColors, 0); checkErrors(result); return(result); }
private async Task <HeadSetErrorCode> setBlinkingAnimation(List <Color> colors) { if (colorModeBox.SelectedIndex != (int)HeadsetLightingEnum.ColorShift) { SetColorListRegistry("BlinkingColors", colors); colorModeBox.SelectedIndex = (int)HeadsetLightingEnum.ColorShift; return(HeadSetErrorCode.HID_WriteSuccess); } HeadSetErrorCode result = await AccessoryHeadSetHelper.SetHeadsetAnimationAsync(hidIndex, HeadsetAnimation.Blinking, toHeadSetColors(colors), (ushort)colorLengthBox.Value); if (checkErrors(result)) { this.SetColorListRegistry("BlinkingColors", colors); } return(result); }