public KeyboardDevice(string url, ISimpleLed driver) { baseUrl = url; Driver = driver; DeviceType = DeviceTypes.Keyboard; Name = "Keyboard"; ProductImage = RazerDriver.GetImage("Keyboard"); Has2DSupport = true; GridHeight = 6; GridWidth = 22; LEDs = new LedUnit[132]; int xPos = 0; int yPos = 0; for (int i = 0; i < 132; i++) { if (xPos > 21) { xPos = 0; yPos++; } LEDs[i] = new LedUnit { LEDName = "LED " + i.ToString(), Data = new PositionalLEDData() { X = xPos, Y = yPos, LEDNumber = i } }; xPos++; } }
public HeadSetDevice(string url, ISimpleLed driver) { baseUrl = url; Driver = driver; DeviceType = DeviceTypes.Headset; Name = "Headset"; ProductImage = RazerDriver.GetImage("Headset"); Has2DSupport = false; LEDs = new LedUnit[5]; for (int i = 0; i < 5; i++) { LEDs[i] = new LedUnit { LEDName = "LED " + i.ToString(), Data = new LEDData { LEDNumber = i } }; } }
public MousepadDevice(string url, ISimpleLed driver) { baseUrl = url; Driver = driver; DeviceType = DeviceTypes.MousePad; Name = "Mousepad"; ProductImage = RazerDriver.GetImage("Mousepad"); Has2DSupport = false; LEDs = new ControlDevice.LedUnit[15]; for (int i = 0; i < 15; i++) { LEDs[i] = new ControlDevice.LedUnit { LEDName = "LED " + i.ToString(), Data = new ControlDevice.LEDData { LEDNumber = i } }; } }
public MouseDevice(string url, ISimpleLed driver) { baseUrl = url; Driver = driver; DeviceType = DeviceTypes.Mouse; Name = "Mouse"; ProductImage = RazerDriver.GetImage("Mouse"); Has2DSupport = true; GridHeight = 9; GridWidth = 7; LEDs = new ControlDevice.LedUnit[63]; int xPos = 0; int yPos = 0; for (int i = 0; i < 63; i++) { if (xPos > 6) { xPos = 0; yPos++; } LEDs[i] = new ControlDevice.LedUnit { LEDName = "LED " + i.ToString(), Data = new ControlDevice.PositionalLEDData() { X = xPos, Y = yPos, LEDNumber = i } }; xPos++; } }
public KeypadDevice(string url, ISimpleLed driver) { baseUrl = url; Driver = driver; DeviceType = DeviceTypes.Keypad; Name = "Keypad"; ProductImage = RazerDriver.GetImage("Keypad"); Has2DSupport = true; GridHeight = 4; GridWidth = 5; LEDs = new ControlDevice.LedUnit[20]; int xPos = 0; int yPos = 0; for (int i = 0; i < 20; i++) { if (xPos > 4) { xPos = 0; yPos++; } LEDs[i] = new ControlDevice.LedUnit { LEDName = "LED " + i.ToString(), Data = new ControlDevice.PositionalLEDData() { X = xPos, Y = yPos, LEDNumber = i } }; xPos++; } }