Esempio n. 1
0
        private void SendColorToPeripheral(System.Drawing.Color color, bool forced = false)
        {
            if ((!previous_peripheral_Color.Equals(color) || forced))
            {
                if (Global.Configuration.allow_peripheral_devices)
                {
                    if (mouse != null && !Global.Configuration.devices_disable_mouse)
                    {
                        mouse.SetAll(new Color(color.R, color.G, color.B));
                    }

                    if (mousepad != null && !Global.Configuration.devices_disable_mouse)
                    {
                        mousepad.SetAll(new Color(color.R, color.G, color.B));
                    }

                    if (headset != null && !Global.Configuration.devices_disable_headset)
                    {
                        headset.SetAll(new Color(color.R, color.G, color.B));
                    }

                    if (keypad != null && !Global.Configuration.devices_disable_keyboard)
                    {
                        keypad.SetAll(new Color(color.R, color.G, color.B));
                    }

                    previous_peripheral_Color = color;
                    peripheral_updated        = true;
                }
                else
                {
                    if (peripheral_updated)
                    {
                        peripheral_updated = false;
                    }
                }
            }
        }