Esempio n. 1
0
        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);
        }
Esempio n. 2
0
        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);
        }