예제 #1
0
        /// <summary>
        /// Starts the LED Manager in keyboard mode by default. Use <seealso cref="SetController"/> to further customize settings, especially for LED strips
        /// </summary>
        public LedManager() // by default starts in keyboard mode
        {
            lightController = RazerChromaController.Create();

            InitLeds(LightingMode.Keyboard);

            KeyboardHookService.Init();

            ProcessListenerService.ProcessInFocusChanged += OnProcessChanged;
            ProcessListenerService.Start();
            ProcessListenerService.Register("League of Legends"); // Listen when league of legends is opened

            UpdateLEDDisplay(this, this.leds, preferredMode);
        }
예제 #2
0
 /// <summary>
 /// Sets the light controller to be used
 /// </summary>
 public void SetController(LightControllerType type, int ledCount = 0, bool reverseOrder = false)
 {
     ((IDisposable)lightController).Dispose();
     if (type == LightControllerType.LED_Strip)
     {
         lightController    = SACNController.Create();
         this.preferredMode = LightingMode.Line;
     }
     else if (type == LightControllerType.RazerChroma)
     {
         lightController    = RazerChromaController.Create();
         this.preferredMode = LightingMode.Keyboard;
     }
     RestartManager(this.preferredMode, ledCount, reverseOrder);
 }
예제 #3
0
 /// <param name="ledCount">Number of lights in the LED strip</param>
 /// <param name="reverseOrder">Set to true if you want the lights to be reverse in order (i.e. Color for LED 0 will be applied to the last LED in the strip)</param>
 private void InitLeds(bool reverseOrder = false)
 {
     lightControllers.Add(RazerChromaController.Create());
     lightControllers.Add(SACNController.Create(reverseOrder));
 }