From 4f48c63ae21631add8395efd16f79380563fa789 Mon Sep 17 00:00:00 2001 From: Darth Affe Date: Sat, 11 Nov 2017 22:01:22 +0100 Subject: [PATCH] Renamed asus SDK-integration from aura to asus for naming consistency --- ...ura.nuspec => RGB.NET.Devices.Asus.nuspec} | 24 +++---- .../AsusDeviceProvider.cs | 68 +++++++++--------- .../Dram/AsusDramRGBDevice.cs | 28 ++++---- .../Dram/AsusDramRGBDeviceInfo.cs | 12 ++-- .../Enum/AsusLedIds.cs | 6 +- .../Enum/AsusLogicalKeyboardLayout.cs | 6 +- .../Enum/AsusPhysicalKeyboardLayout.cs | 6 +- .../Generic/AsusLedId.cs | 52 +++++++------- .../Generic/AsusRGBDevice.cs | 22 +++--- .../Generic/AsusRGBDeviceInfo.cs | 10 +-- .../GraphicsCard/AsusGraphicsCardRGBDevice.cs | 28 ++++---- .../AsusGraphicsCardRGBDeviceInfo.cs | 12 ++-- .../Keyboard/AsusKeyboardRGBDevice.cs | 28 ++++---- .../Keyboard/AsusKeyboardRGBDeviceInfo.cs | 20 +++--- .../Layouts/DeviceLayout.xsd | 0 .../Mainboard/AsusMainboardRGBDevice.cs | 28 ++++---- .../Mainboard/AsusMainboardRGBDeviceInfo.cs | 12 ++-- .../Mouse/AsusMouseRGBDevice.cs | 28 ++++---- .../Mouse/AsusMouseRGBDeviceInfo.cs | 12 ++-- .../Native/_AsusSDK.cs | 16 ++--- .../Properties/AssemblyInfo.cs | 6 +- .../RGB.NET.Devices.Asus.csproj | 50 ++++++------- .../RGB.NET.Devices.Asus.csproj.DotSettings | 0 .../libs/x86/AURA_SDK.dll | Bin .../libs/x86/ClaymoreProtocol.dll | Bin .../libs/x86/EVOLVE SYNC Dll.dll | Bin .../libs/x86/LED_DLL_forMB.dll | Bin .../libs/x86/RogNewmouseProtocol.dll | Bin .../libs/x86/SPATHA HID Library C++.dll | Bin .../libs/x86/SPATHA SYNC Dll.dll | Bin .../libs/x86/VGA_Extra.dll | Bin .../libs/x86/Vender.dll | Bin .../packages.config | 0 .../targets/RGB.NET.Devices.Asus.targets | 44 ++++++------ RGB.NET.sln | 4 +- 35 files changed, 261 insertions(+), 261 deletions(-) rename NuGet/{RGB.NET.Devices.Aura.nuspec => RGB.NET.Devices.Asus.nuspec} (52%) rename RGB.NET.Devices.Aura/AuraDeviceProvider.cs => RGB.NET.Devices.Asus/AsusDeviceProvider.cs (72%) rename RGB.NET.Devices.Aura/Dram/AuraDramRGBDevice.cs => RGB.NET.Devices.Asus/Dram/AsusDramRGBDevice.cs (61%) rename RGB.NET.Devices.Aura/Dram/AuraDramRGBDeviceInfo.cs => RGB.NET.Devices.Asus/Dram/AsusDramRGBDeviceInfo.cs (69%) rename RGB.NET.Devices.Aura/Enum/AuraLedIds.cs => RGB.NET.Devices.Asus/Enum/AsusLedIds.cs (82%) rename RGB.NET.Devices.Aura/Enum/AuraLogicalKeyboardLayout.cs => RGB.NET.Devices.Asus/Enum/AsusLogicalKeyboardLayout.cs (64%) rename RGB.NET.Devices.Aura/Enum/AuraPhysicalKeyboardLayout.cs => RGB.NET.Devices.Asus/Enum/AsusPhysicalKeyboardLayout.cs (53%) rename RGB.NET.Devices.Aura/Generic/AuraLedId.cs => RGB.NET.Devices.Asus/Generic/AsusLedId.cs (67%) rename RGB.NET.Devices.Aura/Generic/AuraRGBDevice.cs => RGB.NET.Devices.Asus/Generic/AsusRGBDevice.cs (89%) rename RGB.NET.Devices.Aura/Generic/AuraRGBDeviceInfo.cs => RGB.NET.Devices.Asus/Generic/AsusRGBDeviceInfo.cs (83%) rename RGB.NET.Devices.Aura/GraphicsCard/AuraGraphicsCardRGBDevice.cs => RGB.NET.Devices.Asus/GraphicsCard/AsusGraphicsCardRGBDevice.cs (61%) rename RGB.NET.Devices.Aura/GraphicsCard/AuraGraphicsCardRGBDeviceInfo.cs => RGB.NET.Devices.Asus/GraphicsCard/AsusGraphicsCardRGBDeviceInfo.cs (69%) rename RGB.NET.Devices.Aura/Keyboard/AuraKeyboardRGBDevice.cs => RGB.NET.Devices.Asus/Keyboard/AsusKeyboardRGBDevice.cs (62%) rename RGB.NET.Devices.Aura/Keyboard/AuraKeyboardRGBDeviceInfo.cs => RGB.NET.Devices.Asus/Keyboard/AsusKeyboardRGBDeviceInfo.cs (73%) rename {RGB.NET.Devices.Aura => RGB.NET.Devices.Asus}/Layouts/DeviceLayout.xsd (100%) rename RGB.NET.Devices.Aura/Mainboard/AuraMainboardRGBDevice.cs => RGB.NET.Devices.Asus/Mainboard/AsusMainboardRGBDevice.cs (61%) rename RGB.NET.Devices.Aura/Mainboard/AuraMainboardRGBDeviceInfo.cs => RGB.NET.Devices.Asus/Mainboard/AsusMainboardRGBDeviceInfo.cs (69%) rename RGB.NET.Devices.Aura/Mouse/AuraMouseRGBDevice.cs => RGB.NET.Devices.Asus/Mouse/AsusMouseRGBDevice.cs (59%) rename RGB.NET.Devices.Aura/Mouse/AuraMouseRGBDeviceInfo.cs => RGB.NET.Devices.Asus/Mouse/AsusMouseRGBDeviceInfo.cs (70%) rename RGB.NET.Devices.Aura/Native/_AuraSDK.cs => RGB.NET.Devices.Asus/Native/_AsusSDK.cs (97%) rename {RGB.NET.Devices.Aura => RGB.NET.Devices.Asus}/Properties/AssemblyInfo.cs (88%) rename RGB.NET.Devices.Aura/RGB.NET.Devices.Aura.csproj => RGB.NET.Devices.Asus/RGB.NET.Devices.Asus.csproj (69%) rename RGB.NET.Devices.Aura/RGB.NET.Devices.Aura.csproj.DotSettings => RGB.NET.Devices.Asus/RGB.NET.Devices.Asus.csproj.DotSettings (100%) rename {RGB.NET.Devices.Aura => RGB.NET.Devices.Asus}/libs/x86/AURA_SDK.dll (100%) rename {RGB.NET.Devices.Aura => RGB.NET.Devices.Asus}/libs/x86/ClaymoreProtocol.dll (100%) rename {RGB.NET.Devices.Aura => RGB.NET.Devices.Asus}/libs/x86/EVOLVE SYNC Dll.dll (100%) rename {RGB.NET.Devices.Aura => RGB.NET.Devices.Asus}/libs/x86/LED_DLL_forMB.dll (100%) rename {RGB.NET.Devices.Aura => RGB.NET.Devices.Asus}/libs/x86/RogNewmouseProtocol.dll (100%) rename {RGB.NET.Devices.Aura => RGB.NET.Devices.Asus}/libs/x86/SPATHA HID Library C++.dll (100%) rename {RGB.NET.Devices.Aura => RGB.NET.Devices.Asus}/libs/x86/SPATHA SYNC Dll.dll (100%) rename {RGB.NET.Devices.Aura => RGB.NET.Devices.Asus}/libs/x86/VGA_Extra.dll (100%) rename {RGB.NET.Devices.Aura => RGB.NET.Devices.Asus}/libs/x86/Vender.dll (100%) rename {RGB.NET.Devices.Aura => RGB.NET.Devices.Asus}/packages.config (100%) rename RGB.NET.Devices.Aura/targets/RGB.NET.Devices.Aura.targets => RGB.NET.Devices.Asus/targets/RGB.NET.Devices.Asus.targets (82%) diff --git a/NuGet/RGB.NET.Devices.Aura.nuspec b/NuGet/RGB.NET.Devices.Asus.nuspec similarity index 52% rename from NuGet/RGB.NET.Devices.Aura.nuspec rename to NuGet/RGB.NET.Devices.Asus.nuspec index d13d336..7cab5a7 100644 --- a/NuGet/RGB.NET.Devices.Aura.nuspec +++ b/NuGet/RGB.NET.Devices.Asus.nuspec @@ -1,17 +1,17 @@  - RGB.NET.Devices.Aura - RGB.NET.Devices.Aura + RGB.NET.Devices.Asus + RGB.NET.Devices.Asus 1.0.0.0 Darth Affe Darth Affe https://github.com/DarthAffe/RGB.NET https://raw.githubusercontent.com/DarthAffe/RGB.NET/master/LICENSE true - Aura-Device-Implementations of RGB.NET + Asus-Device-Implementations of RGB.NET - Aura-Device-Implementations of RGB.NET, a C# (.NET) library for accessing various RGB-peripherals + Asus-Device-Implementations of RGB.NET, a C# (.NET) library for accessing various RGB-peripherals Copyright © Wyrez 2017 en-US @@ -20,13 +20,13 @@ - - - - - - - - + + + + + + + + \ No newline at end of file diff --git a/RGB.NET.Devices.Aura/AuraDeviceProvider.cs b/RGB.NET.Devices.Asus/AsusDeviceProvider.cs similarity index 72% rename from RGB.NET.Devices.Aura/AuraDeviceProvider.cs rename to RGB.NET.Devices.Asus/AsusDeviceProvider.cs index 1d76228..c6bc1e4 100644 --- a/RGB.NET.Devices.Aura/AuraDeviceProvider.cs +++ b/RGB.NET.Devices.Asus/AsusDeviceProvider.cs @@ -7,23 +7,23 @@ using System.Collections.ObjectModel; using System.Globalization; using System.Runtime.InteropServices; using RGB.NET.Core; -using RGB.NET.Devices.Aura.Native; +using RGB.NET.Devices.Asus.Native; -namespace RGB.NET.Devices.Aura +namespace RGB.NET.Devices.Asus { /// /// /// Represents a device provider responsible for Cooler Master devices. /// - public class AuraDeviceProvider : IRGBDeviceProvider + public class AsusDeviceProvider : IRGBDeviceProvider { #region Properties & Fields - private static AuraDeviceProvider _instance; + private static AsusDeviceProvider _instance; /// - /// Gets the singleton instance. + /// Gets the singleton instance. /// - public static AuraDeviceProvider Instance => _instance ?? new AuraDeviceProvider(); + public static AsusDeviceProvider Instance => _instance ?? new AsusDeviceProvider(); /// /// Gets a modifiable list of paths used to find the native SDK-dlls for x86 applications. @@ -46,7 +46,7 @@ namespace RGB.NET.Devices.Aura /// /// Gets the loaded architecture (x64/x86). /// - public string LoadedArchitecture => _AuraSDK.LoadedArchitecture; + public string LoadedArchitecture => _AsusSDK.LoadedArchitecture; /// /// @@ -67,12 +67,12 @@ namespace RGB.NET.Devices.Aura #region Constructors /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// Thrown if this constructor is called even if there is already an instance of this class. - public AuraDeviceProvider() + public AsusDeviceProvider() { - if (_instance != null) throw new InvalidOperationException($"There can be only one instanc of type {nameof(AuraDeviceProvider)}"); + if (_instance != null) throw new InvalidOperationException($"There can be only one instanc of type {nameof(AsusDeviceProvider)}"); _instance = this; } @@ -87,24 +87,24 @@ namespace RGB.NET.Devices.Aura try { - _AuraSDK.Reload(); + _AsusSDK.Reload(); IList devices = new List(); #region Mainboard //TODO DarthAffe 21.10.2017: Requesting mainboards seems to fail if only a non mb-device (tested with only a gpu) is connected - int mainboardCount = _AuraSDK.EnumerateMbController(IntPtr.Zero, 0); + int mainboardCount = _AsusSDK.EnumerateMbController(IntPtr.Zero, 0); if (mainboardCount > 0) { IntPtr mainboardHandles = Marshal.AllocHGlobal(mainboardCount * IntPtr.Size); - _AuraSDK.EnumerateMbController(mainboardHandles, mainboardCount); + _AsusSDK.EnumerateMbController(mainboardHandles, mainboardCount); for (int i = 0; i < mainboardCount; i++) { IntPtr handle = Marshal.ReadIntPtr(mainboardHandles, i); - _AuraSDK.SetMbMode(handle, 1); - AuraMainboardRGBDevice device = new AuraMainboardRGBDevice(new AuraMainboardRGBDeviceInfo(RGBDeviceType.Mainboard, handle)); + _AsusSDK.SetMbMode(handle, 1); + AsusMainboardRGBDevice device = new AsusMainboardRGBDevice(new AsusMainboardRGBDeviceInfo(RGBDeviceType.Mainboard, handle)); device.Initialize(); devices.Add(device); } @@ -114,18 +114,18 @@ namespace RGB.NET.Devices.Aura #region Graphics cards - //TODO DarthAffe 21.10.2017: This somehow returns non-existant gpus (at least for me) which cause huge lags (if a real aura-ready gpu is connected this doesn't happen) - int graphicCardCount = _AuraSDK.EnumerateGPU(IntPtr.Zero, 0); + //TODO DarthAffe 21.10.2017: This somehow returns non-existant gpus (at least for me) which cause huge lags (if a real asus-ready gpu is connected this doesn't happen) + int graphicCardCount = _AsusSDK.EnumerateGPU(IntPtr.Zero, 0); if (graphicCardCount > 0) { IntPtr grapicsCardHandles = Marshal.AllocHGlobal(graphicCardCount * IntPtr.Size); - _AuraSDK.EnumerateGPU(grapicsCardHandles, graphicCardCount); + _AsusSDK.EnumerateGPU(grapicsCardHandles, graphicCardCount); for (int i = 0; i < graphicCardCount; i++) { IntPtr handle = Marshal.ReadIntPtr(grapicsCardHandles, i); - _AuraSDK.SetGPUMode(handle, 1); - AuraGraphicsCardRGBDevice device = new AuraGraphicsCardRGBDevice(new AuraGraphicsCardRGBDeviceInfo(RGBDeviceType.GraphicsCard, handle)); + _AsusSDK.SetGPUMode(handle, 1); + AsusGraphicsCardRGBDevice device = new AsusGraphicsCardRGBDevice(new AsusGraphicsCardRGBDeviceInfo(RGBDeviceType.GraphicsCard, handle)); device.Initialize(); devices.Add(device); } @@ -136,17 +136,17 @@ namespace RGB.NET.Devices.Aura #region DRAM //TODO DarthAffe 29.10.2017: I don't know why they are even documented, but the asus guy said they aren't in the SDK right now. - //int dramCount = _AuraSDK.EnumerateDram(IntPtr.Zero, 0); + //int dramCount = _AsusSDK.EnumerateDram(IntPtr.Zero, 0); //if (dramCount > 0) //{ // IntPtr dramHandles = Marshal.AllocHGlobal(dramCount * IntPtr.Size); - // _AuraSDK.EnumerateDram(dramHandles, dramCount); + // _AsusSDK.EnumerateDram(dramHandles, dramCount); // for (int i = 0; i < dramCount; i++) // { // IntPtr handle = Marshal.ReadIntPtr(dramHandles, i); - // _AuraSDK.SetDramMode(handle, 1); - // AuraDramRGBDevice device = new AuraDramRGBDevice(new AuraDramRGBDeviceInfo(RGBDeviceType.DRAM, handle)); + // _AsusSDK.SetDramMode(handle, 1); + // AsusDramRGBDevice device = new AsusDramRGBDevice(new AsusDramRGBDeviceInfo(RGBDeviceType.DRAM, handle)); // device.Initialize(); // devices.Add(device); // } @@ -157,10 +157,10 @@ namespace RGB.NET.Devices.Aura #region Keyboard IntPtr keyboardHandle = Marshal.AllocHGlobal(IntPtr.Size); - if (_AuraSDK.CreateClaymoreKeyboard(keyboardHandle)) + if (_AsusSDK.CreateClaymoreKeyboard(keyboardHandle)) { - _AuraSDK.SetClaymoreKeyboardMode(keyboardHandle, 1); - AuraKeyboardRGBDevice device = new AuraKeyboardRGBDevice(new AuraKeyboardRGBDeviceInfo(RGBDeviceType.Keyboard, keyboardHandle, GetCulture())); + _AsusSDK.SetClaymoreKeyboardMode(keyboardHandle, 1); + AsusKeyboardRGBDevice device = new AsusKeyboardRGBDevice(new AsusKeyboardRGBDeviceInfo(RGBDeviceType.Keyboard, keyboardHandle, GetCulture())); device.Initialize(); devices.Add(device); } @@ -170,10 +170,10 @@ namespace RGB.NET.Devices.Aura #region Mouse IntPtr mouseHandle = Marshal.AllocHGlobal(IntPtr.Size); - if (_AuraSDK.CreateRogMouse(mouseHandle)) + if (_AsusSDK.CreateRogMouse(mouseHandle)) { - _AuraSDK.SetRogMouseMode(mouseHandle, 1); - AuraMouseRGBDevice device = new AuraMouseRGBDevice(new AuraMouseRGBDeviceInfo(RGBDeviceType.Mouse, mouseHandle)); + _AsusSDK.SetRogMouseMode(mouseHandle, 1); + AsusMouseRGBDevice device = new AsusMouseRGBDevice(new AsusMouseRGBDeviceInfo(RGBDeviceType.Mouse, mouseHandle)); device.Initialize(); devices.Add(device); } @@ -200,17 +200,17 @@ namespace RGB.NET.Devices.Aura { foreach (IRGBDevice device in Devices) { - AuraRGBDeviceInfo deviceInfo = (AuraRGBDeviceInfo)device.DeviceInfo; + AsusRGBDeviceInfo deviceInfo = (AsusRGBDeviceInfo)device.DeviceInfo; switch (deviceInfo.DeviceType) { case RGBDeviceType.Mainboard: - _AuraSDK.SetMbMode(deviceInfo.Handle, 0); + _AsusSDK.SetMbMode(deviceInfo.Handle, 0); break; case RGBDeviceType.GraphicsCard: - _AuraSDK.SetGPUMode(deviceInfo.Handle, 0); + _AsusSDK.SetGPUMode(deviceInfo.Handle, 0); break; //case RGBDeviceType.DRAM: - // _AuraSDK.SetDramMode(deviceInfo.Handle, 0); + // _AsusSDK.SetDramMode(deviceInfo.Handle, 0); // break; } } diff --git a/RGB.NET.Devices.Aura/Dram/AuraDramRGBDevice.cs b/RGB.NET.Devices.Asus/Dram/AsusDramRGBDevice.cs similarity index 61% rename from RGB.NET.Devices.Aura/Dram/AuraDramRGBDevice.cs rename to RGB.NET.Devices.Asus/Dram/AsusDramRGBDevice.cs index 5829d36..6cdc398 100644 --- a/RGB.NET.Devices.Aura/Dram/AuraDramRGBDevice.cs +++ b/RGB.NET.Devices.Asus/Dram/AsusDramRGBDevice.cs @@ -1,20 +1,20 @@ //using RGB.NET.Core; -//using RGB.NET.Devices.Aura.Native; +//using RGB.NET.Devices.Asus.Native; -//namespace RGB.NET.Devices.Aura +//namespace RGB.NET.Devices.Asus //{ // /// // /// -// /// Represents a Aura dram. +// /// Represents a Asus dram. // /// -// public class AuraDramRGBDevice : AuraRGBDevice +// public class AsusDramRGBDevice : AsusRGBDevice // { // #region Properties & Fields // /// -// /// Gets information about the . +// /// Gets information about the . // /// -// public AuraDramRGBDeviceInfo DramDeviceInfo { get; } +// public AsusDramRGBDeviceInfo DramDeviceInfo { get; } // #endregion @@ -22,10 +22,10 @@ // /// // /// -// /// Initializes a new instance of the class. +// /// Initializes a new instance of the class. // /// -// /// The specific information provided by Aura for the DRAM. -// internal AuraDramRGBDevice(AuraDramRGBDeviceInfo info) +// /// The specific information provided by Asus for the DRAM. +// internal AsusDramRGBDevice(AsusDramRGBDeviceInfo info) // : base(info) // { // this.DramDeviceInfo = info; @@ -39,17 +39,17 @@ // protected override void InitializeLayout() // { // //TODO DarthAffe 21.10.2017: Look for a good default layout -// int ledCount = _AuraSDK.GetGPULedCount(DramDeviceInfo.Handle); +// int ledCount = _AsusSDK.GetGPULedCount(DramDeviceInfo.Handle); // for (int i = 0; i < ledCount; i++) -// InitializeLed(new AuraLedId(this, AuraLedIds.DramLed1 + i, i), new Rectangle(i * 10, 0, 10, 10)); +// InitializeLed(new AsusLedId(this, AsusLedIds.DramLed1 + i, i), new Rectangle(i * 10, 0, 10, 10)); // //TODO DarthAffe 21.10.2017: We don't know the model, how to save layouts and images? -// ApplyLayoutFromFile(PathHelper.GetAbsolutePath($@"Layouts\Aura\Drams\{DramDeviceInfo.Model.Replace(" ", string.Empty).ToUpper()}.xml"), -// null, PathHelper.GetAbsolutePath(@"Images\Aura\Drams")); +// ApplyLayoutFromFile(PathHelper.GetAbsolutePath($@"Layouts\Asus\Drams\{DramDeviceInfo.Model.Replace(" ", string.Empty).ToUpper()}.xml"), +// null, PathHelper.GetAbsolutePath(@"Images\Asus\Drams")); // } // /// -// protected override void ApplyColorData() => _AuraSDK.SetDramColor(DramDeviceInfo.Handle, ColorData); +// protected override void ApplyColorData() => _AsusSDK.SetDramColor(DramDeviceInfo.Handle, ColorData); // #endregion // } diff --git a/RGB.NET.Devices.Aura/Dram/AuraDramRGBDeviceInfo.cs b/RGB.NET.Devices.Asus/Dram/AsusDramRGBDeviceInfo.cs similarity index 69% rename from RGB.NET.Devices.Aura/Dram/AuraDramRGBDeviceInfo.cs rename to RGB.NET.Devices.Asus/Dram/AsusDramRGBDeviceInfo.cs index 9252d21..26739b9 100644 --- a/RGB.NET.Devices.Aura/Dram/AuraDramRGBDeviceInfo.cs +++ b/RGB.NET.Devices.Asus/Dram/AsusDramRGBDeviceInfo.cs @@ -1,26 +1,26 @@ using System; using RGB.NET.Core; -namespace RGB.NET.Devices.Aura +namespace RGB.NET.Devices.Asus { /// /// - /// Represents a generic information for a . + /// Represents a generic information for a . /// - public class AuraDramRGBDeviceInfo : AuraRGBDeviceInfo + public class AsusDramRGBDeviceInfo : AsusRGBDeviceInfo { #region Constructors /// /// - /// Internal constructor of managed . + /// Internal constructor of managed . /// /// The type of the . /// The handle of the . - internal AuraDramRGBDeviceInfo(RGBDeviceType deviceType, IntPtr handle) + internal AsusDramRGBDeviceInfo(RGBDeviceType deviceType, IntPtr handle) : base(deviceType, handle) { - Image = new Uri(PathHelper.GetAbsolutePath($@"Images\Aura\Drams\{Model.Replace(" ", string.Empty).ToUpper()}.png"), UriKind.Absolute); + Image = new Uri(PathHelper.GetAbsolutePath($@"Images\Asus\Drams\{Model.Replace(" ", string.Empty).ToUpper()}.png"), UriKind.Absolute); } #endregion diff --git a/RGB.NET.Devices.Aura/Enum/AuraLedIds.cs b/RGB.NET.Devices.Asus/Enum/AsusLedIds.cs similarity index 82% rename from RGB.NET.Devices.Aura/Enum/AuraLedIds.cs rename to RGB.NET.Devices.Asus/Enum/AsusLedIds.cs index 01df76e..9b43f63 100644 --- a/RGB.NET.Devices.Aura/Enum/AuraLedIds.cs +++ b/RGB.NET.Devices.Asus/Enum/AsusLedIds.cs @@ -2,12 +2,12 @@ #pragma warning disable 1591 // Missing XML comment for publicly visible type or member -namespace RGB.NET.Devices.Aura +namespace RGB.NET.Devices.Asus { /// - /// Contains list of all LEDs available for all Aura devices. + /// Contains list of all LEDs available for all Asus devices. /// - public enum AuraLedIds + public enum AsusLedIds { Invalid = -1, diff --git a/RGB.NET.Devices.Aura/Enum/AuraLogicalKeyboardLayout.cs b/RGB.NET.Devices.Asus/Enum/AsusLogicalKeyboardLayout.cs similarity index 64% rename from RGB.NET.Devices.Aura/Enum/AuraLogicalKeyboardLayout.cs rename to RGB.NET.Devices.Asus/Enum/AsusLogicalKeyboardLayout.cs index bedc9f7..60105e5 100644 --- a/RGB.NET.Devices.Aura/Enum/AuraLogicalKeyboardLayout.cs +++ b/RGB.NET.Devices.Asus/Enum/AsusLogicalKeyboardLayout.cs @@ -3,12 +3,12 @@ #pragma warning disable 1591 // Missing XML comment for publicly visible type or member -namespace RGB.NET.Devices.Aura +namespace RGB.NET.Devices.Asus { /// - /// Contains list of available logical layouts for aura keyboards. + /// Contains list of available logical layouts for asus keyboards. /// - public enum AuraLogicalKeyboardLayout + public enum AsusLogicalKeyboardLayout { TODO }; diff --git a/RGB.NET.Devices.Aura/Enum/AuraPhysicalKeyboardLayout.cs b/RGB.NET.Devices.Asus/Enum/AsusPhysicalKeyboardLayout.cs similarity index 53% rename from RGB.NET.Devices.Aura/Enum/AuraPhysicalKeyboardLayout.cs rename to RGB.NET.Devices.Asus/Enum/AsusPhysicalKeyboardLayout.cs index 5814662..098aa23 100644 --- a/RGB.NET.Devices.Aura/Enum/AuraPhysicalKeyboardLayout.cs +++ b/RGB.NET.Devices.Asus/Enum/AsusPhysicalKeyboardLayout.cs @@ -1,12 +1,12 @@ // ReSharper disable UnusedMember.Global // ReSharper disable InconsistentNaming -namespace RGB.NET.Devices.Aura +namespace RGB.NET.Devices.Asus { /// - /// Contains list of available physical layouts for aura keyboards. + /// Contains list of available physical layouts for asus keyboards. /// - public enum AuraPhysicalKeyboardLayout + public enum AsusPhysicalKeyboardLayout { TODO } diff --git a/RGB.NET.Devices.Aura/Generic/AuraLedId.cs b/RGB.NET.Devices.Asus/Generic/AsusLedId.cs similarity index 67% rename from RGB.NET.Devices.Aura/Generic/AuraLedId.cs rename to RGB.NET.Devices.Asus/Generic/AsusLedId.cs index c4a0000..a122968 100644 --- a/RGB.NET.Devices.Aura/Generic/AuraLedId.cs +++ b/RGB.NET.Devices.Asus/Generic/AsusLedId.cs @@ -1,18 +1,18 @@ using System.Diagnostics; using RGB.NET.Core; -namespace RGB.NET.Devices.Aura +namespace RGB.NET.Devices.Asus { /// /// - /// Represents a Id of a on a . + /// Represents a Id of a on a . /// [DebuggerDisplay("{" + nameof(LedId) + "}")] - public class AuraLedId : ILedId + public class AsusLedId : ILedId { #region Properties & Fields - internal readonly AuraLedIds LedId; + internal readonly AsusLedIds LedId; internal readonly int Index; @@ -20,30 +20,30 @@ namespace RGB.NET.Devices.Aura public IRGBDevice Device { get; } /// - public bool IsValid => LedId != AuraLedIds.Invalid; + public bool IsValid => LedId != AsusLedIds.Invalid; #endregion #region Constructors /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// The the belongs to. - /// The of the represented . - public AuraLedId(IRGBDevice device, AuraLedIds ledId) + /// The of the represented . + public AsusLedId(IRGBDevice device, AsusLedIds ledId) { this.Device = device; this.LedId = ledId; } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// The the belongs to. - /// The of the represented . + /// The of the represented . /// The index in the mapping array of the device. - public AuraLedId(IRGBDevice device, AuraLedIds ledId, int index) + public AsusLedId(IRGBDevice device, AsusLedIds ledId, int index) { this.Device = device; this.LedId = ledId; @@ -55,19 +55,19 @@ namespace RGB.NET.Devices.Aura #region Methods /// - /// Converts the Id of this to a human-readable string. + /// Converts the Id of this to a human-readable string. /// - /// A string that contains the Id of this . For example "Enter". + /// A string that contains the Id of this . For example "Enter". public override string ToString() => LedId.ToString(); /// - /// Tests whether the specified object is a and is equivalent to this . + /// Tests whether the specified object is a and is equivalent to this . /// /// The object to test. - /// true if is a equivalent to this ; otherwise, false. + /// true if is a equivalent to this ; otherwise, false. public override bool Equals(object obj) { - AuraLedId compareLedId = obj as AuraLedId; + AsusLedId compareLedId = obj as AsusLedId; if (ReferenceEquals(compareLedId, null)) return false; @@ -81,9 +81,9 @@ namespace RGB.NET.Devices.Aura } /// - /// Returns a hash code for this . + /// Returns a hash code for this . /// - /// An integer value that specifies the hash code for this . + /// An integer value that specifies the hash code for this . public override int GetHashCode() => LedId.GetHashCode(); #endregion @@ -91,20 +91,20 @@ namespace RGB.NET.Devices.Aura #region Operators /// - /// Returns a value that indicates whether two specified are equal. + /// Returns a value that indicates whether two specified are equal. /// - /// The first to compare. - /// The second to compare. + /// The first to compare. + /// The second to compare. /// true if and are equal; otherwise, false. - public static bool operator ==(AuraLedId ledId1, AuraLedId ledId2) => ReferenceEquals(ledId1, null) ? ReferenceEquals(ledId2, null) : ledId1.Equals(ledId2); + public static bool operator ==(AsusLedId ledId1, AsusLedId ledId2) => ReferenceEquals(ledId1, null) ? ReferenceEquals(ledId2, null) : ledId1.Equals(ledId2); /// - /// Returns a value that indicates whether two specified are equal. + /// Returns a value that indicates whether two specified are equal. /// - /// The first to compare. - /// The second to compare. + /// The first to compare. + /// The second to compare. /// true if and are not equal; otherwise, false. - public static bool operator !=(AuraLedId ledId1, AuraLedId ledId2) => !(ledId1 == ledId2); + public static bool operator !=(AsusLedId ledId1, AsusLedId ledId2) => !(ledId1 == ledId2); #endregion } diff --git a/RGB.NET.Devices.Aura/Generic/AuraRGBDevice.cs b/RGB.NET.Devices.Asus/Generic/AsusRGBDevice.cs similarity index 89% rename from RGB.NET.Devices.Aura/Generic/AuraRGBDevice.cs rename to RGB.NET.Devices.Asus/Generic/AsusRGBDevice.cs index 546803d..6ca6546 100644 --- a/RGB.NET.Devices.Aura/Generic/AuraRGBDevice.cs +++ b/RGB.NET.Devices.Asus/Generic/AsusRGBDevice.cs @@ -6,13 +6,13 @@ using System.Runtime.InteropServices; using RGB.NET.Core; using RGB.NET.Core.Layout; -namespace RGB.NET.Devices.Aura +namespace RGB.NET.Devices.Asus { /// /// - /// Represents a generic Aura-device. (keyboard, mouse, headset, mousepad). + /// Represents a generic Asus-device. (keyboard, mouse, headset, mousepad). /// - public abstract class AuraRGBDevice : AbstractRGBDevice + public abstract class AsusRGBDevice : AbstractRGBDevice { #region Properties & Fields @@ -23,7 +23,7 @@ namespace RGB.NET.Devices.Aura /// /// - /// Gets information about the . + /// Gets information about the . /// public override IRGBDeviceInfo DeviceInfo { get; } @@ -32,10 +32,10 @@ namespace RGB.NET.Devices.Aura #region Constructors /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - /// The generic information provided by Aura for the device. - protected AuraRGBDevice(IRGBDeviceInfo info) + /// The generic information provided by Asus for the device. + protected AsusRGBDevice(IRGBDeviceInfo info) { this.DeviceInfo = info; } @@ -83,9 +83,9 @@ namespace RGB.NET.Devices.Aura if (layout.Leds != null) foreach (LedLayout layoutLed in layout.Leds) { - if (Enum.TryParse(layoutLed.Id, true, out AuraLedIds ledId)) + if (Enum.TryParse(layoutLed.Id, true, out AsusLedIds ledId)) { - if (LedMapping.TryGetValue(new AuraLedId(this, ledId), out Led led)) + if (LedMapping.TryGetValue(new AsusLedId(this, ledId), out Led led)) { led.LedRectangle.Location.X = layoutLed.X; led.LedRectangle.Location.Y = layoutLed.Y; @@ -114,7 +114,7 @@ namespace RGB.NET.Devices.Aura { foreach (Led led in leds) { - int index = (((AuraLedId)led.Id).Index) * 3; + int index = (((AsusLedId)led.Id).Index) * 3; ColorData[index] = led.Color.R; ColorData[index + 1] = led.Color.G; ColorData[index + 2] = led.Color.B; @@ -132,7 +132,7 @@ namespace RGB.NET.Devices.Aura /// public override void Dispose() { - if ((DeviceInfo is AuraRGBDeviceInfo deviceInfo) && (deviceInfo.Handle != IntPtr.Zero)) + if ((DeviceInfo is AsusRGBDeviceInfo deviceInfo) && (deviceInfo.Handle != IntPtr.Zero)) Marshal.FreeHGlobal(deviceInfo.Handle); ColorData = null; diff --git a/RGB.NET.Devices.Aura/Generic/AuraRGBDeviceInfo.cs b/RGB.NET.Devices.Asus/Generic/AsusRGBDeviceInfo.cs similarity index 83% rename from RGB.NET.Devices.Aura/Generic/AuraRGBDeviceInfo.cs rename to RGB.NET.Devices.Asus/Generic/AsusRGBDeviceInfo.cs index 2c302ec..da8ec75 100644 --- a/RGB.NET.Devices.Aura/Generic/AuraRGBDeviceInfo.cs +++ b/RGB.NET.Devices.Asus/Generic/AsusRGBDeviceInfo.cs @@ -1,13 +1,13 @@ using System; using RGB.NET.Core; -namespace RGB.NET.Devices.Aura +namespace RGB.NET.Devices.Asus { /// /// /// Represents a generic information for a Corsair-. /// - public class AuraRGBDeviceInfo : IRGBDeviceInfo + public class AsusRGBDeviceInfo : IRGBDeviceInfo { #region Properties & Fields @@ -27,7 +27,7 @@ namespace RGB.NET.Devices.Aura public RGBDeviceLighting Lighting => RGBDeviceLighting.Key; /// - /// Gets the index of the . + /// Gets the index of the . /// internal IntPtr Handle { get; } @@ -36,13 +36,13 @@ namespace RGB.NET.Devices.Aura #region Constructors /// - /// Internal constructor of managed . + /// Internal constructor of managed . /// /// The type of the . /// The handle of the . /// The manufacturer-name of the . /// The model-name of the . - internal AuraRGBDeviceInfo(RGBDeviceType deviceType, IntPtr handle, string manufacturer = "Unknown", string model = "Generic Aura-Device") + internal AsusRGBDeviceInfo(RGBDeviceType deviceType, IntPtr handle, string manufacturer = "Unknown", string model = "Generic Asus-Device") { this.DeviceType = deviceType; this.Handle = handle; diff --git a/RGB.NET.Devices.Aura/GraphicsCard/AuraGraphicsCardRGBDevice.cs b/RGB.NET.Devices.Asus/GraphicsCard/AsusGraphicsCardRGBDevice.cs similarity index 61% rename from RGB.NET.Devices.Aura/GraphicsCard/AuraGraphicsCardRGBDevice.cs rename to RGB.NET.Devices.Asus/GraphicsCard/AsusGraphicsCardRGBDevice.cs index 082db89..c15301f 100644 --- a/RGB.NET.Devices.Aura/GraphicsCard/AuraGraphicsCardRGBDevice.cs +++ b/RGB.NET.Devices.Asus/GraphicsCard/AsusGraphicsCardRGBDevice.cs @@ -1,20 +1,20 @@ using RGB.NET.Core; -using RGB.NET.Devices.Aura.Native; +using RGB.NET.Devices.Asus.Native; -namespace RGB.NET.Devices.Aura +namespace RGB.NET.Devices.Asus { /// /// - /// Represents a Aura graphicsCard. + /// Represents a Asus graphicsCard. /// - public class AuraGraphicsCardRGBDevice : AuraRGBDevice + public class AsusGraphicsCardRGBDevice : AsusRGBDevice { #region Properties & Fields /// - /// Gets information about the . + /// Gets information about the . /// - public AuraGraphicsCardRGBDeviceInfo GraphicsCardDeviceInfo { get; } + public AsusGraphicsCardRGBDeviceInfo GraphicsCardDeviceInfo { get; } #endregion @@ -22,10 +22,10 @@ namespace RGB.NET.Devices.Aura /// /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - /// The specific information provided by Aura for the graphics card. - internal AuraGraphicsCardRGBDevice(AuraGraphicsCardRGBDeviceInfo info) + /// The specific information provided by Asus for the graphics card. + internal AsusGraphicsCardRGBDevice(AsusGraphicsCardRGBDeviceInfo info) : base(info) { this.GraphicsCardDeviceInfo = info; @@ -39,17 +39,17 @@ namespace RGB.NET.Devices.Aura protected override void InitializeLayout() { //TODO DarthAffe 07.10.2017: Look for a good default layout - int ledCount = _AuraSDK.GetGPULedCount(GraphicsCardDeviceInfo.Handle); + int ledCount = _AsusSDK.GetGPULedCount(GraphicsCardDeviceInfo.Handle); for (int i = 0; i < ledCount; i++) - InitializeLed(new AuraLedId(this, AuraLedIds.GraphicsCardLed1 + i, i), new Rectangle(i * 10, 0, 10, 10)); + InitializeLed(new AsusLedId(this, AsusLedIds.GraphicsCardLed1 + i, i), new Rectangle(i * 10, 0, 10, 10)); //TODO DarthAffe 07.10.2017: We don'T know the model, how to save layouts and images? - ApplyLayoutFromFile(PathHelper.GetAbsolutePath($@"Layouts\Aura\GraphicsCards\{GraphicsCardDeviceInfo.Model.Replace(" ", string.Empty).ToUpper()}.xml"), - null, PathHelper.GetAbsolutePath(@"Images\Aura\GraphicsCards")); + ApplyLayoutFromFile(PathHelper.GetAbsolutePath($@"Layouts\Asus\GraphicsCards\{GraphicsCardDeviceInfo.Model.Replace(" ", string.Empty).ToUpper()}.xml"), + null, PathHelper.GetAbsolutePath(@"Images\Asus\GraphicsCards")); } /// - protected override void ApplyColorData() => _AuraSDK.SetGPUColor(GraphicsCardDeviceInfo.Handle, ColorData); + protected override void ApplyColorData() => _AsusSDK.SetGPUColor(GraphicsCardDeviceInfo.Handle, ColorData); #endregion } diff --git a/RGB.NET.Devices.Aura/GraphicsCard/AuraGraphicsCardRGBDeviceInfo.cs b/RGB.NET.Devices.Asus/GraphicsCard/AsusGraphicsCardRGBDeviceInfo.cs similarity index 69% rename from RGB.NET.Devices.Aura/GraphicsCard/AuraGraphicsCardRGBDeviceInfo.cs rename to RGB.NET.Devices.Asus/GraphicsCard/AsusGraphicsCardRGBDeviceInfo.cs index 0209796..5506668 100644 --- a/RGB.NET.Devices.Aura/GraphicsCard/AuraGraphicsCardRGBDeviceInfo.cs +++ b/RGB.NET.Devices.Asus/GraphicsCard/AsusGraphicsCardRGBDeviceInfo.cs @@ -1,26 +1,26 @@ using System; using RGB.NET.Core; -namespace RGB.NET.Devices.Aura +namespace RGB.NET.Devices.Asus { /// /// - /// Represents a generic information for a . + /// Represents a generic information for a . /// - public class AuraGraphicsCardRGBDeviceInfo : AuraRGBDeviceInfo + public class AsusGraphicsCardRGBDeviceInfo : AsusRGBDeviceInfo { #region Constructors /// /// - /// Internal constructor of managed . + /// Internal constructor of managed . /// /// The type of the . /// The handle of the . - internal AuraGraphicsCardRGBDeviceInfo(RGBDeviceType deviceType, IntPtr handle) + internal AsusGraphicsCardRGBDeviceInfo(RGBDeviceType deviceType, IntPtr handle) : base(deviceType, handle) { - Image = new Uri(PathHelper.GetAbsolutePath($@"Images\Aura\GraphicsCards\{Model.Replace(" ", string.Empty).ToUpper()}.png"), UriKind.Absolute); + Image = new Uri(PathHelper.GetAbsolutePath($@"Images\Asus\GraphicsCards\{Model.Replace(" ", string.Empty).ToUpper()}.png"), UriKind.Absolute); } #endregion diff --git a/RGB.NET.Devices.Aura/Keyboard/AuraKeyboardRGBDevice.cs b/RGB.NET.Devices.Asus/Keyboard/AsusKeyboardRGBDevice.cs similarity index 62% rename from RGB.NET.Devices.Aura/Keyboard/AuraKeyboardRGBDevice.cs rename to RGB.NET.Devices.Asus/Keyboard/AsusKeyboardRGBDevice.cs index afe6937..dc92567 100644 --- a/RGB.NET.Devices.Aura/Keyboard/AuraKeyboardRGBDevice.cs +++ b/RGB.NET.Devices.Asus/Keyboard/AsusKeyboardRGBDevice.cs @@ -1,20 +1,20 @@ using RGB.NET.Core; -using RGB.NET.Devices.Aura.Native; +using RGB.NET.Devices.Asus.Native; -namespace RGB.NET.Devices.Aura +namespace RGB.NET.Devices.Asus { /// /// - /// Represents a Aura keyboard. + /// Represents a Asus keyboard. /// - public class AuraKeyboardRGBDevice : AuraRGBDevice + public class AsusKeyboardRGBDevice : AsusRGBDevice { #region Properties & Fields /// - /// Gets information about the . + /// Gets information about the . /// - public AuraKeyboardRGBDeviceInfo KeyboardDeviceInfo { get; } + public AsusKeyboardRGBDeviceInfo KeyboardDeviceInfo { get; } #endregion @@ -22,10 +22,10 @@ namespace RGB.NET.Devices.Aura /// /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - /// The specific information provided by Aura for the keyboard. - internal AuraKeyboardRGBDevice(AuraKeyboardRGBDeviceInfo info) + /// The specific information provided by Asus for the keyboard. + internal AsusKeyboardRGBDevice(AsusKeyboardRGBDeviceInfo info) : base(info) { this.KeyboardDeviceInfo = info; @@ -39,17 +39,17 @@ namespace RGB.NET.Devices.Aura protected override void InitializeLayout() { //TODO DarthAffe 07.10.2017: Look for a good default layout - int ledCount = _AuraSDK.GetClaymoreKeyboardLedCount(KeyboardDeviceInfo.Handle); + int ledCount = _AsusSDK.GetClaymoreKeyboardLedCount(KeyboardDeviceInfo.Handle); for (int i = 0; i < ledCount; i++) - InitializeLed(new AuraLedId(this, AuraLedIds.KeyboardLed1 + i, i), new Rectangle(i * 19, 0, 19, 19)); + InitializeLed(new AsusLedId(this, AsusLedIds.KeyboardLed1 + i, i), new Rectangle(i * 19, 0, 19, 19)); string model = KeyboardDeviceInfo.Model.Replace(" ", string.Empty).ToUpper(); - ApplyLayoutFromFile(PathHelper.GetAbsolutePath($@"Layouts\Aura\Keyboards\{model}\{KeyboardDeviceInfo.PhysicalLayout.ToString().ToUpper()}.xml"), - KeyboardDeviceInfo.LogicalLayout.ToString(), PathHelper.GetAbsolutePath(@"Images\Aura\Keyboards")); + ApplyLayoutFromFile(PathHelper.GetAbsolutePath($@"Layouts\Asus\Keyboards\{model}\{KeyboardDeviceInfo.PhysicalLayout.ToString().ToUpper()}.xml"), + KeyboardDeviceInfo.LogicalLayout.ToString(), PathHelper.GetAbsolutePath(@"Images\Asus\Keyboards")); } /// - protected override void ApplyColorData() => _AuraSDK.SetClaymoreKeyboardColor(KeyboardDeviceInfo.Handle, ColorData); + protected override void ApplyColorData() => _AsusSDK.SetClaymoreKeyboardColor(KeyboardDeviceInfo.Handle, ColorData); #endregion } diff --git a/RGB.NET.Devices.Aura/Keyboard/AuraKeyboardRGBDeviceInfo.cs b/RGB.NET.Devices.Asus/Keyboard/AsusKeyboardRGBDeviceInfo.cs similarity index 73% rename from RGB.NET.Devices.Aura/Keyboard/AuraKeyboardRGBDeviceInfo.cs rename to RGB.NET.Devices.Asus/Keyboard/AsusKeyboardRGBDeviceInfo.cs index 22455af..350ffa3 100644 --- a/RGB.NET.Devices.Aura/Keyboard/AuraKeyboardRGBDeviceInfo.cs +++ b/RGB.NET.Devices.Asus/Keyboard/AsusKeyboardRGBDeviceInfo.cs @@ -2,25 +2,25 @@ using System.Globalization; using RGB.NET.Core; -namespace RGB.NET.Devices.Aura +namespace RGB.NET.Devices.Asus { /// /// - /// Represents a generic information for a . + /// Represents a generic information for a . /// - public class AuraKeyboardRGBDeviceInfo : AuraRGBDeviceInfo + public class AsusKeyboardRGBDeviceInfo : AsusRGBDeviceInfo { #region Properties & Fields /// /// Gets the physical layout of the keyboard. /// - public AuraPhysicalKeyboardLayout PhysicalLayout { get; private set; } + public AsusPhysicalKeyboardLayout PhysicalLayout { get; private set; } /// /// Gets the logical layout of the keyboard. /// - public AuraLogicalKeyboardLayout LogicalLayout { get; private set; } + public AsusLogicalKeyboardLayout LogicalLayout { get; private set; } #endregion @@ -28,17 +28,17 @@ namespace RGB.NET.Devices.Aura /// /// - /// Internal constructor of managed . + /// Internal constructor of managed . /// /// The type of the . /// The handle of the . /// The of the layout this keyboard is using - internal AuraKeyboardRGBDeviceInfo(RGBDeviceType deviceType, IntPtr handle, CultureInfo culture) + internal AsusKeyboardRGBDeviceInfo(RGBDeviceType deviceType, IntPtr handle, CultureInfo culture) : base(deviceType, handle, "Asus", "Claymore") { SetLayouts(culture.KeyboardLayoutId); - Image = new Uri(PathHelper.GetAbsolutePath($@"Images\Aura\Keyboards\{Model.Replace(" ", string.Empty).ToUpper()}.png"), UriKind.Absolute); + Image = new Uri(PathHelper.GetAbsolutePath($@"Images\Asus\Keyboards\{Model.Replace(" ", string.Empty).ToUpper()}.png"), UriKind.Absolute); } #endregion @@ -51,8 +51,8 @@ namespace RGB.NET.Devices.Aura { //TODO DarthAffe 07.10.2017: Implement default: - PhysicalLayout = AuraPhysicalKeyboardLayout.TODO; - LogicalLayout = AuraLogicalKeyboardLayout.TODO; + PhysicalLayout = AsusPhysicalKeyboardLayout.TODO; + LogicalLayout = AsusLogicalKeyboardLayout.TODO; break; } } diff --git a/RGB.NET.Devices.Aura/Layouts/DeviceLayout.xsd b/RGB.NET.Devices.Asus/Layouts/DeviceLayout.xsd similarity index 100% rename from RGB.NET.Devices.Aura/Layouts/DeviceLayout.xsd rename to RGB.NET.Devices.Asus/Layouts/DeviceLayout.xsd diff --git a/RGB.NET.Devices.Aura/Mainboard/AuraMainboardRGBDevice.cs b/RGB.NET.Devices.Asus/Mainboard/AsusMainboardRGBDevice.cs similarity index 61% rename from RGB.NET.Devices.Aura/Mainboard/AuraMainboardRGBDevice.cs rename to RGB.NET.Devices.Asus/Mainboard/AsusMainboardRGBDevice.cs index 252a284..ca3a6ed 100644 --- a/RGB.NET.Devices.Aura/Mainboard/AuraMainboardRGBDevice.cs +++ b/RGB.NET.Devices.Asus/Mainboard/AsusMainboardRGBDevice.cs @@ -1,20 +1,20 @@ using RGB.NET.Core; -using RGB.NET.Devices.Aura.Native; +using RGB.NET.Devices.Asus.Native; -namespace RGB.NET.Devices.Aura +namespace RGB.NET.Devices.Asus { /// /// - /// Represents a Aura mainboard. + /// Represents a Asus mainboard. /// - public class AuraMainboardRGBDevice : AuraRGBDevice + public class AsusMainboardRGBDevice : AsusRGBDevice { #region Properties & Fields /// - /// Gets information about the . + /// Gets information about the . /// - public AuraMainboardRGBDeviceInfo MainboardDeviceInfo { get; } + public AsusMainboardRGBDeviceInfo MainboardDeviceInfo { get; } #endregion @@ -22,10 +22,10 @@ namespace RGB.NET.Devices.Aura /// /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - /// The specific information provided by Aura for the mainboard. - internal AuraMainboardRGBDevice(AuraMainboardRGBDeviceInfo info) + /// The specific information provided by Asus for the mainboard. + internal AsusMainboardRGBDevice(AsusMainboardRGBDeviceInfo info) : base(info) { this.MainboardDeviceInfo = info; @@ -39,17 +39,17 @@ namespace RGB.NET.Devices.Aura protected override void InitializeLayout() { //TODO DarthAffe 07.10.2017: Look for a good default layout - int ledCount = _AuraSDK.GetMbLedCount(MainboardDeviceInfo.Handle); + int ledCount = _AsusSDK.GetMbLedCount(MainboardDeviceInfo.Handle); for (int i = 0; i < ledCount; i++) - InitializeLed(new AuraLedId(this, AuraLedIds.MainboardAudio1 + i, i), new Rectangle(i * 40, 0, 40, 8)); + InitializeLed(new AsusLedId(this, AsusLedIds.MainboardAudio1 + i, i), new Rectangle(i * 40, 0, 40, 8)); //TODO DarthAffe 07.10.2017: We don'T know the model, how to save layouts and images? - ApplyLayoutFromFile(PathHelper.GetAbsolutePath($@"Layouts\Aura\Mainboards\{MainboardDeviceInfo.Model.Replace(" ", string.Empty).ToUpper()}.xml"), - null, PathHelper.GetAbsolutePath(@"Images\Aura\Mainboards")); + ApplyLayoutFromFile(PathHelper.GetAbsolutePath($@"Layouts\Asus\Mainboards\{MainboardDeviceInfo.Model.Replace(" ", string.Empty).ToUpper()}.xml"), + null, PathHelper.GetAbsolutePath(@"Images\Asus\Mainboards")); } /// - protected override void ApplyColorData() => _AuraSDK.SetMbColor(MainboardDeviceInfo.Handle, ColorData); + protected override void ApplyColorData() => _AsusSDK.SetMbColor(MainboardDeviceInfo.Handle, ColorData); #endregion } diff --git a/RGB.NET.Devices.Aura/Mainboard/AuraMainboardRGBDeviceInfo.cs b/RGB.NET.Devices.Asus/Mainboard/AsusMainboardRGBDeviceInfo.cs similarity index 69% rename from RGB.NET.Devices.Aura/Mainboard/AuraMainboardRGBDeviceInfo.cs rename to RGB.NET.Devices.Asus/Mainboard/AsusMainboardRGBDeviceInfo.cs index f06f567..bcfda88 100644 --- a/RGB.NET.Devices.Aura/Mainboard/AuraMainboardRGBDeviceInfo.cs +++ b/RGB.NET.Devices.Asus/Mainboard/AsusMainboardRGBDeviceInfo.cs @@ -1,26 +1,26 @@ using System; using RGB.NET.Core; -namespace RGB.NET.Devices.Aura +namespace RGB.NET.Devices.Asus { /// /// - /// Represents a generic information for a . + /// Represents a generic information for a . /// - public class AuraMainboardRGBDeviceInfo : AuraRGBDeviceInfo + public class AsusMainboardRGBDeviceInfo : AsusRGBDeviceInfo { #region Constructors /// /// - /// Internal constructor of managed . + /// Internal constructor of managed . /// /// The type of the . /// The handle of the . - internal AuraMainboardRGBDeviceInfo(RGBDeviceType deviceType, IntPtr handle) + internal AsusMainboardRGBDeviceInfo(RGBDeviceType deviceType, IntPtr handle) : base(deviceType, handle) { - Image = new Uri(PathHelper.GetAbsolutePath($@"Images\Aura\Mainboards\{Model.Replace(" ", string.Empty).ToUpper()}.png"), UriKind.Absolute); + Image = new Uri(PathHelper.GetAbsolutePath($@"Images\Asus\Mainboards\{Model.Replace(" ", string.Empty).ToUpper()}.png"), UriKind.Absolute); } #endregion diff --git a/RGB.NET.Devices.Aura/Mouse/AuraMouseRGBDevice.cs b/RGB.NET.Devices.Asus/Mouse/AsusMouseRGBDevice.cs similarity index 59% rename from RGB.NET.Devices.Aura/Mouse/AuraMouseRGBDevice.cs rename to RGB.NET.Devices.Asus/Mouse/AsusMouseRGBDevice.cs index 2e22c21..369d267 100644 --- a/RGB.NET.Devices.Aura/Mouse/AuraMouseRGBDevice.cs +++ b/RGB.NET.Devices.Asus/Mouse/AsusMouseRGBDevice.cs @@ -1,20 +1,20 @@ using RGB.NET.Core; -using RGB.NET.Devices.Aura.Native; +using RGB.NET.Devices.Asus.Native; -namespace RGB.NET.Devices.Aura +namespace RGB.NET.Devices.Asus { /// /// - /// Represents a Aura mouse. + /// Represents a Asus mouse. /// - public class AuraMouseRGBDevice : AuraRGBDevice + public class AsusMouseRGBDevice : AsusRGBDevice { #region Properties & Fields /// - /// Gets information about the . + /// Gets information about the . /// - public AuraMouseRGBDeviceInfo MouseDeviceInfo { get; } + public AsusMouseRGBDeviceInfo MouseDeviceInfo { get; } #endregion @@ -22,10 +22,10 @@ namespace RGB.NET.Devices.Aura /// /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - /// The specific information provided by Aura for the mouse. - internal AuraMouseRGBDevice(AuraMouseRGBDeviceInfo info) + /// The specific information provided by Asus for the mouse. + internal AsusMouseRGBDevice(AsusMouseRGBDeviceInfo info) : base(info) { this.MouseDeviceInfo = info; @@ -39,16 +39,16 @@ namespace RGB.NET.Devices.Aura protected override void InitializeLayout() { //TODO DarthAffe 07.10.2017: Look for a good default layout - int ledCount = _AuraSDK.GetRogMouseLedCount(MouseDeviceInfo.Handle); + int ledCount = _AsusSDK.GetRogMouseLedCount(MouseDeviceInfo.Handle); for (int i = 0; i < ledCount; i++) - InitializeLed(new AuraLedId(this, AuraLedIds.MouseLed1 + i, i), new Rectangle(i * 10, 0, 10, 10)); + InitializeLed(new AsusLedId(this, AsusLedIds.MouseLed1 + i, i), new Rectangle(i * 10, 0, 10, 10)); - ApplyLayoutFromFile(PathHelper.GetAbsolutePath($@"Layouts\Aura\Mouses\{MouseDeviceInfo.Model.Replace(" ", string.Empty).ToUpper()}.xml"), - null, PathHelper.GetAbsolutePath(@"Images\Aura\Mouses")); + ApplyLayoutFromFile(PathHelper.GetAbsolutePath($@"Layouts\Asus\Mouses\{MouseDeviceInfo.Model.Replace(" ", string.Empty).ToUpper()}.xml"), + null, PathHelper.GetAbsolutePath(@"Images\Asus\Mouses")); } /// - protected override void ApplyColorData() => _AuraSDK.SetRogMouseColor(MouseDeviceInfo.Handle, ColorData); + protected override void ApplyColorData() => _AsusSDK.SetRogMouseColor(MouseDeviceInfo.Handle, ColorData); #endregion } diff --git a/RGB.NET.Devices.Aura/Mouse/AuraMouseRGBDeviceInfo.cs b/RGB.NET.Devices.Asus/Mouse/AsusMouseRGBDeviceInfo.cs similarity index 70% rename from RGB.NET.Devices.Aura/Mouse/AuraMouseRGBDeviceInfo.cs rename to RGB.NET.Devices.Asus/Mouse/AsusMouseRGBDeviceInfo.cs index 26981a5..9e82924 100644 --- a/RGB.NET.Devices.Aura/Mouse/AuraMouseRGBDeviceInfo.cs +++ b/RGB.NET.Devices.Asus/Mouse/AsusMouseRGBDeviceInfo.cs @@ -1,26 +1,26 @@ using System; using RGB.NET.Core; -namespace RGB.NET.Devices.Aura +namespace RGB.NET.Devices.Asus { /// /// - /// Represents a generic information for a . + /// Represents a generic information for a . /// - public class AuraMouseRGBDeviceInfo : AuraRGBDeviceInfo + public class AsusMouseRGBDeviceInfo : AsusRGBDeviceInfo { #region Constructors /// /// - /// Internal constructor of managed . + /// Internal constructor of managed . /// /// The type of the . /// The handle of the . - internal AuraMouseRGBDeviceInfo(RGBDeviceType deviceType, IntPtr handle) + internal AsusMouseRGBDeviceInfo(RGBDeviceType deviceType, IntPtr handle) : base(deviceType, handle, "Asus", "Rog") { - Image = new Uri(PathHelper.GetAbsolutePath($@"Images\Aura\Mouses\{Model.Replace(" ", string.Empty).ToUpper()}.png"), UriKind.Absolute); + Image = new Uri(PathHelper.GetAbsolutePath($@"Images\Asus\Mouses\{Model.Replace(" ", string.Empty).ToUpper()}.png"), UriKind.Absolute); } #endregion diff --git a/RGB.NET.Devices.Aura/Native/_AuraSDK.cs b/RGB.NET.Devices.Asus/Native/_AsusSDK.cs similarity index 97% rename from RGB.NET.Devices.Aura/Native/_AuraSDK.cs rename to RGB.NET.Devices.Asus/Native/_AsusSDK.cs index 5a19282..642f1a1 100644 --- a/RGB.NET.Devices.Aura/Native/_AuraSDK.cs +++ b/RGB.NET.Devices.Asus/Native/_AsusSDK.cs @@ -8,10 +8,10 @@ using System.Linq; using System.Runtime.InteropServices; using RGB.NET.Core.Exceptions; -namespace RGB.NET.Devices.Aura.Native +namespace RGB.NET.Devices.Asus.Native { // ReSharper disable once InconsistentNaming - internal static class _AuraSDK + internal static class _AsusSDK { #region Libary Management @@ -27,18 +27,18 @@ namespace RGB.NET.Devices.Aura.Native /// internal static void Reload() { - UnloadAuraSDK(); - LoadAuraSDK(); + UnloadAsusSDK(); + LoadAsusSDK(); } - private static void LoadAuraSDK() + private static void LoadAsusSDK() { if (_dllHandle != IntPtr.Zero) return; // HACK: Load library at runtime to support both, x86 and x64 with one managed dll - List possiblePathList = Environment.Is64BitProcess ? AuraDeviceProvider.PossibleX64NativePaths : AuraDeviceProvider.PossibleX86NativePaths; + List possiblePathList = Environment.Is64BitProcess ? AsusDeviceProvider.PossibleX64NativePaths : AsusDeviceProvider.PossibleX86NativePaths; string dllPath = possiblePathList.FirstOrDefault(File.Exists); - if (dllPath == null) throw new RGBDeviceException($"Can't find the Aura-SDK at one of the expected locations:\r\n '{string.Join("\r\n", possiblePathList.Select(Path.GetFullPath))}'"); + if (dllPath == null) throw new RGBDeviceException($"Can't find the Asus-SDK at one of the expected locations:\r\n '{string.Join("\r\n", possiblePathList.Select(Path.GetFullPath))}'"); SetDllDirectory(Path.GetDirectoryName(Path.GetFullPath(dllPath))); @@ -73,7 +73,7 @@ namespace RGB.NET.Devices.Aura.Native //_getDramColorPointer = (GetDramColorPointer)Marshal.GetDelegateForFunctionPointer(GetProcAddress(_dllHandle, "GetDramColor"), typeof(GetDramColorPointer)); } - private static void UnloadAuraSDK() + private static void UnloadAsusSDK() { if (_dllHandle == IntPtr.Zero) return; diff --git a/RGB.NET.Devices.Aura/Properties/AssemblyInfo.cs b/RGB.NET.Devices.Asus/Properties/AssemblyInfo.cs similarity index 88% rename from RGB.NET.Devices.Aura/Properties/AssemblyInfo.cs rename to RGB.NET.Devices.Asus/Properties/AssemblyInfo.cs index 57c63b3..75ec9e2 100644 --- a/RGB.NET.Devices.Aura/Properties/AssemblyInfo.cs +++ b/RGB.NET.Devices.Asus/Properties/AssemblyInfo.cs @@ -4,11 +4,11 @@ using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. -[assembly: AssemblyTitle("RGB.NET.Devices.Aura")] -[assembly: AssemblyDescription("Aura-Device-Implementations of RGB.NET")] +[assembly: AssemblyTitle("RGB.NET.Devices.Asus")] +[assembly: AssemblyDescription("Asus-Device-Implementations of RGB.NET")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Wyrez")] -[assembly: AssemblyProduct("RGB.NET.Devices.Aura")] +[assembly: AssemblyProduct("RGB.NET.Devices.Asus")] [assembly: AssemblyCopyright("Copyright © Wyrez 2017")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] diff --git a/RGB.NET.Devices.Aura/RGB.NET.Devices.Aura.csproj b/RGB.NET.Devices.Asus/RGB.NET.Devices.Asus.csproj similarity index 69% rename from RGB.NET.Devices.Aura/RGB.NET.Devices.Aura.csproj rename to RGB.NET.Devices.Asus/RGB.NET.Devices.Asus.csproj index d5e168f..c5c8c5e 100644 --- a/RGB.NET.Devices.Aura/RGB.NET.Devices.Aura.csproj +++ b/RGB.NET.Devices.Asus/RGB.NET.Devices.Asus.csproj @@ -7,8 +7,8 @@ {4F2F3FBD-A1E4-4968-A2AD-0514959E5E59} Library Properties - RGB.NET.Devices.Aura - RGB.NET.Devices.Aura + RGB.NET.Devices.Asus + RGB.NET.Devices.Asus v4.5 512 @@ -20,7 +20,7 @@ DEBUG;TRACE prompt 4 - ..\bin\RGB.NET.Devices.Aura.xml + ..\bin\RGB.NET.Devices.Asus.xml pdbonly @@ -29,7 +29,7 @@ TRACE prompt 4 - ..\bin\RGB.NET.Devices.Aura.xml + ..\bin\RGB.NET.Devices.Asus.xml @@ -45,24 +45,24 @@ - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + @@ -70,7 +70,7 @@ Designer - + @@ -84,8 +84,8 @@ - - + + diff --git a/RGB.NET.Devices.Aura/RGB.NET.Devices.Aura.csproj.DotSettings b/RGB.NET.Devices.Asus/RGB.NET.Devices.Asus.csproj.DotSettings similarity index 100% rename from RGB.NET.Devices.Aura/RGB.NET.Devices.Aura.csproj.DotSettings rename to RGB.NET.Devices.Asus/RGB.NET.Devices.Asus.csproj.DotSettings diff --git a/RGB.NET.Devices.Aura/libs/x86/AURA_SDK.dll b/RGB.NET.Devices.Asus/libs/x86/AURA_SDK.dll similarity index 100% rename from RGB.NET.Devices.Aura/libs/x86/AURA_SDK.dll rename to RGB.NET.Devices.Asus/libs/x86/AURA_SDK.dll diff --git a/RGB.NET.Devices.Aura/libs/x86/ClaymoreProtocol.dll b/RGB.NET.Devices.Asus/libs/x86/ClaymoreProtocol.dll similarity index 100% rename from RGB.NET.Devices.Aura/libs/x86/ClaymoreProtocol.dll rename to RGB.NET.Devices.Asus/libs/x86/ClaymoreProtocol.dll diff --git a/RGB.NET.Devices.Aura/libs/x86/EVOLVE SYNC Dll.dll b/RGB.NET.Devices.Asus/libs/x86/EVOLVE SYNC Dll.dll similarity index 100% rename from RGB.NET.Devices.Aura/libs/x86/EVOLVE SYNC Dll.dll rename to RGB.NET.Devices.Asus/libs/x86/EVOLVE SYNC Dll.dll diff --git a/RGB.NET.Devices.Aura/libs/x86/LED_DLL_forMB.dll b/RGB.NET.Devices.Asus/libs/x86/LED_DLL_forMB.dll similarity index 100% rename from RGB.NET.Devices.Aura/libs/x86/LED_DLL_forMB.dll rename to RGB.NET.Devices.Asus/libs/x86/LED_DLL_forMB.dll diff --git a/RGB.NET.Devices.Aura/libs/x86/RogNewmouseProtocol.dll b/RGB.NET.Devices.Asus/libs/x86/RogNewmouseProtocol.dll similarity index 100% rename from RGB.NET.Devices.Aura/libs/x86/RogNewmouseProtocol.dll rename to RGB.NET.Devices.Asus/libs/x86/RogNewmouseProtocol.dll diff --git a/RGB.NET.Devices.Aura/libs/x86/SPATHA HID Library C++.dll b/RGB.NET.Devices.Asus/libs/x86/SPATHA HID Library C++.dll similarity index 100% rename from RGB.NET.Devices.Aura/libs/x86/SPATHA HID Library C++.dll rename to RGB.NET.Devices.Asus/libs/x86/SPATHA HID Library C++.dll diff --git a/RGB.NET.Devices.Aura/libs/x86/SPATHA SYNC Dll.dll b/RGB.NET.Devices.Asus/libs/x86/SPATHA SYNC Dll.dll similarity index 100% rename from RGB.NET.Devices.Aura/libs/x86/SPATHA SYNC Dll.dll rename to RGB.NET.Devices.Asus/libs/x86/SPATHA SYNC Dll.dll diff --git a/RGB.NET.Devices.Aura/libs/x86/VGA_Extra.dll b/RGB.NET.Devices.Asus/libs/x86/VGA_Extra.dll similarity index 100% rename from RGB.NET.Devices.Aura/libs/x86/VGA_Extra.dll rename to RGB.NET.Devices.Asus/libs/x86/VGA_Extra.dll diff --git a/RGB.NET.Devices.Aura/libs/x86/Vender.dll b/RGB.NET.Devices.Asus/libs/x86/Vender.dll similarity index 100% rename from RGB.NET.Devices.Aura/libs/x86/Vender.dll rename to RGB.NET.Devices.Asus/libs/x86/Vender.dll diff --git a/RGB.NET.Devices.Aura/packages.config b/RGB.NET.Devices.Asus/packages.config similarity index 100% rename from RGB.NET.Devices.Aura/packages.config rename to RGB.NET.Devices.Asus/packages.config diff --git a/RGB.NET.Devices.Aura/targets/RGB.NET.Devices.Aura.targets b/RGB.NET.Devices.Asus/targets/RGB.NET.Devices.Asus.targets similarity index 82% rename from RGB.NET.Devices.Aura/targets/RGB.NET.Devices.Aura.targets rename to RGB.NET.Devices.Asus/targets/RGB.NET.Devices.Asus.targets index 8f912c4..6d7d476 100644 --- a/RGB.NET.Devices.Aura/targets/RGB.NET.Devices.Aura.targets +++ b/RGB.NET.Devices.Asus/targets/RGB.NET.Devices.Asus.targets @@ -12,7 +12,7 @@ --> - @@ -30,10 +30,10 @@ ****************************************************************************** --> - - + + %(RecursiveDir)%(FileName)%(Extension) Always @@ -45,51 +45,51 @@ ****************************************************************************** --> - + Inputs="@(AsusSDKFiles)" + Outputs="@(AsusSDKFiles -> '$(OutDir)%(RecursiveDir)%(Filename)%(Extension)')"> - + - - + - + - + bin\%(RecursiveDir)%(Filename)%(Extension) @@ -120,15 +120,15 @@ $(PostBuildEventDependsOn); - CopyAuraSDKFiles; + CopyAsusSDKFiles; $(BuildDependsOn); - CopyAuraSDKFiles; + CopyAsusSDKFiles; $(CleanDependsOn); - CleanAuraSDKFiles; + CleanAsusSDKFiles; @@ -143,7 +143,7 @@ '$(VisualStudioVersion)' == '11.0' Or '$(VisualStudioVersion)' == '12.0'"> - CollectAuraSDKFiles; + CollectAsusSDKFiles; $(PipelineCollectFilesPhaseDependsOn); diff --git a/RGB.NET.sln b/RGB.NET.sln index 1b1880a..438ff14 100644 --- a/RGB.NET.sln +++ b/RGB.NET.sln @@ -28,7 +28,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "NuGet", "NuGet", "{06416566 NuGet\RGB.NET.Brushes.nuspec = NuGet\RGB.NET.Brushes.nuspec NuGet\RGB.NET.Core.nuspec = NuGet\RGB.NET.Core.nuspec NuGet\RGB.NET.Decorators.nuspec = NuGet\RGB.NET.Decorators.nuspec - NuGet\RGB.NET.Devices.Aura.nuspec = NuGet\RGB.NET.Devices.Aura.nuspec + NuGet\RGB.NET.Devices.Asus.nuspec = NuGet\RGB.NET.Devices.Asus.nuspec NuGet\RGB.NET.Devices.CoolerMaster.nuspec = NuGet\RGB.NET.Devices.CoolerMaster.nuspec NuGet\RGB.NET.Devices.Corsair.nuspec = NuGet\RGB.NET.Devices.Corsair.nuspec NuGet\RGB.NET.Devices.Logitech.nuspec = NuGet\RGB.NET.Devices.Logitech.nuspec @@ -56,7 +56,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RGB.NET.Decorators", "RGB.N {5A4F9A75-75FE-47CD-90E5-914D5B20D232} = {5A4F9A75-75FE-47CD-90E5-914D5B20D232} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RGB.NET.Devices.Aura", "RGB.NET.Devices.Aura\RGB.NET.Devices.Aura.csproj", "{4F2F3FBD-A1E4-4968-A2AD-0514959E5E59}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RGB.NET.Devices.Asus", "RGB.NET.Devices.Asus\RGB.NET.Devices.Asus.csproj", "{4F2F3FBD-A1E4-4968-A2AD-0514959E5E59}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RGB.NET.Devices.Msi", "RGB.NET.Devices.Msi\RGB.NET.Devices.Msi.csproj", "{4EFD77C7-FDB4-4C6B-970C-0EF66D24BE09}" EndProject