예제 #1
0
        static void Main(string[] args)
        {
            var keyboard = DEVICE_INDEX.DEV_MK750;

            c.SetControlDevice(keyboard);
            if (!c.IsDevicePlug())
            {
                Console.WriteLine("Count not connect to the keyboard");
                return;
            }

            if (!c.EnableLedControl(true, keyboard))
            {
                Console.WriteLine("Count not secure LED control for the keyboard");
                return;
            }

            c.SetFullLedColor(0, 0, 0);
            var matrix = new COLOR_MATRIX();

            matrix.KeyColor = new KEY_COLOR[COLOR_MATRIX.MAX_LED_ROW, COLOR_MATRIX.MAX_LED_COLUMN];
            var white = new KEY_COLOR(250, 250, 250);

            matrix.KeyColor[3, 2] = new KEY_COLOR(250, 250, 250);
            matrix.KeyColor[2, 4] = new KEY_COLOR(250, 250, 250);
            matrix.KeyColor[4, 5] = new KEY_COLOR(250, 250, 250);
            matrix.KeyColor[5, 5] = new KEY_COLOR(250, 250, 250);
            matrix.KeyColor[3, 4] = new KEY_COLOR(250, 250, 250);
            c.SetAllLedColor(matrix, keyboard);
            // Rolling();
            c.EnableLedControl(false, keyboard);
        }
 public static extern bool SetAllLedColor(COLOR_MATRIX colorMatrix, DEVICE_INDEX devIndex = DEVICE_INDEX.DEV_DEFAULT);