Example #1
0
        public void Shutdown()
        {
            if (talkFX != null)
            {
                talkFX.RestoreLedRgb();
            }

            if (RyosTalkFX != null)
            {
                RyosTalkFX.ExitSdkMode();
            }
        }
Example #2
0
        public override void Shutdown()
        {
            //Shutdown 1 color devices.
            var restoreColor = ToRoccatColor(GlobalVarRegistry.GetVariable <RealColor>($"{DeviceName}_restore_fallback"));

            talkFx?.SetLedRgb(Zone.Event, KeyEffect.On, Speed.Fast, restoreColor); //Workaround because "RestoreLedRgb()" doesn't seam to work.
            talkFx?.RestoreLedRgb();
            talkFx?.Dispose();

            //Shutdown per key keyboards.
            ryosTalkFx?.ExitSdkMode();
            ryosTalkFx?.Dispose();

            isInitialized = false;
        }
Example #3
0
        private void Restoregeneric()
        {
            //Workaround
            //Global.logger.LogLine("restore Roccat generic");
            System.Drawing.Color restore_fallback = Global.Configuration.VarRegistry.GetVariable <Aurora.Utils.RealColor>($"{devicename}_restore_fallback").GetDrawingColor();
            restore_fallback = System.Drawing.Color.FromArgb(255, Utils.ColorUtils.MultiplyColorByScalar(restore_fallback, restore_fallback.A / 255.0D));

            //Global.logger.LogLine("restore Roccat generic" + restore_fallback + restore_fallback.R + restore_fallback.G + restore_fallback.B);
            talkFX.SetLedRgb(Zone.Event, KeyEffect.On, Speed.Fast, new Color(restore_fallback.R, restore_fallback.G, restore_fallback.B));

            previous_peripheral_Color = System.Drawing.Color.FromArgb(restore_fallback.R, restore_fallback.G, restore_fallback.B);

            //.RestoreLedRgb() Does not work
            talkFX.RestoreLedRgb();
        }
Example #4
0
        private static void TalkFxTEst()
        {
            WriteAndWaitForEnter("TalkFX test, press enter to begin");

            using (var connection = new TalkFxConnection())
            {
                connection.SetLedRgb(Zone.Event, KeyEffect.Blinking, Speed.Normal, new Color(255, 105, 180));
                WriteAndWaitForEnter("The keys should now be blinking in a fairly pink color, press enter to continue");

                connection.SetLedRgb(Zone.Event, KeyEffect.On, Speed.Normal, new Color(255, 255, 255));
                WriteAndWaitForEnter("The keys should now be ON and have a white color, press enter to continue");

                connection.SetLedRgb(Zone.Event, KeyEffect.On, Speed.Normal, new Color(0, 0, 0));
                WriteAndWaitForEnter("The keys should now be OFF, press enter to continue");

                connection.SetLedRgb(Zone.Event, KeyEffect.Breathing, Speed.Normal, new Color(255, 0, 0));
                WriteAndWaitForEnter("The keys should now be 'breathing' in a red color, press enter to continue");

                connection.RestoreLedRgb();
            }

            WriteAndWaitForEnter("TalkFX test now finished, press enter to continue");
        }