Beispiel #1
0
        static void UpdateMousepad(CorsairMousepadRGBDevice mousepad)
        {
            do
            {
                Color c1 = colors[0];
                Color c2 = colors[3];
                Color c3 = colors[1];
                Color c4 = colors[2];

                for (int i = 0; i < mousepad.Count(); i++)
                {
                    if (i < 4)
                    {
                        mousepad.ElementAt(i).Color = c1;
                    }
                    else if (i < 7)
                    {
                        mousepad.ElementAt(i).Color = c2;
                    }
                    else if (7 < i && i < 11)
                    {
                        mousepad.ElementAt(i).Color = c3;
                    }
                    else if (10 < i && i < 15)
                    {
                        mousepad.ElementAt(i).Color = c4;
                    }
                    else
                    {
                        mousepad.ElementAt(i).Color = ColorUtils.colorMixer(c2, c3);
                    }
                }

                System.Threading.Thread.Sleep(34);
            } while (running);
        }
Beispiel #2
0
        static void UpdateMousepad(CorsairMousepadRGBDevice mousepad, Color c1, Color c2, Color c3, Color c4)
        {
            do
            {
                c1 = backIOColor;
                c2 = headerTwoColor;
                c3 = pchColor;
                c4 = headerOneColor;

                for (int i = 0; i < mousepad.Count(); i++)
                {
                    if (i < 4)
                    {
                        mousepad.ElementAt(i).Color = c1;
                    }
                    else if (i < 7)
                    {
                        mousepad.ElementAt(i).Color = c2;
                    }
                    else if (7 < i && i < 11)
                    {
                        mousepad.ElementAt(i).Color = c3;
                    }
                    else if (10 < i && i < 15)
                    {
                        mousepad.ElementAt(i).Color = c4;
                    }
                    else
                    {
                        mousepad.ElementAt(i).Color = ColorUtils.colorMixer(c2, c3);
                    }
                }

                System.Threading.Thread.Sleep(15);
            } while (running);
        }