using System; using System.IO; using System.Reflection; using RGB.NET.Devices.Corsair.Native; namespace RGB.NET.Devices.Corsair { /// /// Represents a generic information for a . /// public class CorsairMouseRGBDeviceInfo : CorsairRGBDeviceInfo { #region Properties & Fields /// /// Gets the physical layout of the mouse. /// public CorsairPhysicalMouseLayout PhysicalLayout { get; private set; } #endregion #region Constructors /// /// Internal constructor of managed . /// /// The index of the . /// The native -struct internal CorsairMouseRGBDeviceInfo(int deviceIndex, _CorsairDeviceInfo nativeInfo) : base(deviceIndex, Core.RGBDeviceType.Mouse, nativeInfo) { this.PhysicalLayout = (CorsairPhysicalMouseLayout)nativeInfo.physicalLayout; Image = new Uri(Path.Combine(Path.GetDirectoryName(Assembly.GetEntryAssembly().Location), $@"Images\Corsair\Mice\{Model.Replace(" ", string.Empty).ToUpper()}.png"), UriKind.Relative); } #endregion } }