// ReSharper disable MemberCanBePrivate.Global // ReSharper disable UnusedMember.Global using System; using System.Globalization; using RGB.NET.Core; namespace RGB.NET.Devices.Logitech { /// /// /// Represents a generic information for a . /// public class LogitechKeyboardRGBDeviceInfo : LogitechRGBDeviceInfo { #region Properties & Fields /// /// Gets the physical layout of the keyboard. /// public LogitechPhysicalKeyboardLayout PhysicalLayout { get; private set; } /// /// Gets the logical layout of the keyboard. /// public LogitechLogicalKeyboardLayout LogicalLayout { get; private set; } #endregion #region Constructors /// /// /// Internal constructor of managed . /// /// The represented device model. /// The lighting-capabilities of the device. /// The of the layout this keyboard is using internal LogitechKeyboardRGBDeviceInfo(string model, LogitechDeviceCaps deviceCaps, CultureInfo culture) : base(RGBDeviceType.Keyboard, model, deviceCaps) { SetLayouts(culture.KeyboardLayoutId); Image = new Uri(PathHelper.GetAbsolutePath($@"Images\Logitech\Keyboards\{Model.Replace(" ", string.Empty).ToUpper()}.png"), UriKind.Absolute); } #endregion #region Methods private void SetLayouts(int keyboardLayoutId) { switch (keyboardLayoutId) { //TODO DarthAffe 04.02.2017: Check all available keyboards and there layout-ids default: PhysicalLayout = LogitechPhysicalKeyboardLayout.UK; LogicalLayout = LogitechLogicalKeyboardLayout.DE; break; } } #endregion } }