コード例 #1
0
ファイル: RoccatInterface.cs プロジェクト: mrvux/Chromatics
 public void Shutdown()
 {
     if (_initialized)
     {
         _client.ExitSdkMode();
         _initialized = false;
     }
 }
コード例 #2
0
        private static void RyosTest()
        {
            WriteAndWaitForEnter("RyosTalkFX test, press enter to begin");

            using (var connection = new RyosTalkFXConnection())
            {
                if (connection.Initialize())
                {
                    Console.WriteLine("RyosTalkFX connection initialized...");
                }
                else
                {
                    WriteAndWaitForEnter("RyosTalkFX connection could not be initialized, is the keyboard properly connected? Press enter to exit");
                    return;
                }

                if (connection.EnterSdkMode())
                {
                    Console.WriteLine("Gained control over the keyboard...");
                }
                else
                {
                    WriteAndWaitForEnter("Could not gain control over the keyboard, is another program using it? Press enter to exit");
                    return;
                }

                connection.TurnOffAllLights();
                WriteAndWaitForEnter("All keys should now be OFF, press enter to continue");

                connection.SetLedOn(KeyboardLayout_EN.A);
                WriteAndWaitForEnter("The 'A' key should now be ON, press enter to continue");

                var keyboardState = new KeyboardState();
                keyboardState.AllLedsOn();
                connection.SetWholeKeyboardState(keyboardState);
                WriteAndWaitForEnter("All keys should now be ON, press enter to continue");

                connection.SetLedOff(KeyboardLayout_EN.B);
                WriteAndWaitForEnter("The 'B' key should be OFF, press enter to continue");

                connection.BlinkAllKeys(1, 10);
                WriteAndWaitForEnter("All keys should now be blinking, press enter to continue");

                if (connection.ExitSdkMode())
                {
                    Console.WriteLine("Released control of the keyboard...");
                }
                else
                {
                    Console.WriteLine("Could not release control of the keyboard!");
                }

                WriteAndWaitForEnter("RyosTalkFX test now finished, press enter to continue");
            }
        }
コード例 #3
0
ファイル: RoccatDevice.cs プロジェクト: wik-z/Aurora
        public void Shutdown()
        {
            if (talkFX != null)
            {
                talkFX.RestoreLedRgb();
            }

            if (RyosTalkFX != null)
            {
                RyosTalkFX.ExitSdkMode();
            }
        }
コード例 #4
0
ファイル: RoccatDevice.cs プロジェクト: petahbred/Aurora
        public void Shutdown()
        {
            if (talkFX != null)
            {
                Restoregeneric();
            }

            if (RyosTalkFX != null)
            {
                RyosTalkFX.ExitSdkMode();
            }
            isInitialized = false;
        }
コード例 #5
0
ファイル: RoccatDevice.cs プロジェクト: XevianLight/Aurora
        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;
        }
コード例 #6
0
 /// <summary>
 /// Release connection to device
 /// </summary>
 public static bool disconnect()
 {
     return(connection.ExitSdkMode());
 }