diff --git a/RGB.NET.Devices.Asus/Generic/AsusRGBDeviceInfo.cs b/RGB.NET.Devices.Asus/Generic/AsusRGBDeviceInfo.cs
index bcf2c39..343c2bc 100644
--- a/RGB.NET.Devices.Asus/Generic/AsusRGBDeviceInfo.cs
+++ b/RGB.NET.Devices.Asus/Generic/AsusRGBDeviceInfo.cs
@@ -45,12 +45,12 @@ namespace RGB.NET.Devices.Asus
/// The handle of the .
/// The manufacturer-name of the .
/// The model-name of the .
- internal AsusRGBDeviceInfo(RGBDeviceType deviceType, IntPtr handle, string manufacturer = "Asus", string model = "Generic Asus-Device")
+ internal AsusRGBDeviceInfo(RGBDeviceType deviceType, IntPtr handle, string model = "Generic Asus-Device", string manufacturer = "Asus")
{
this.DeviceType = deviceType;
this.Handle = handle;
- this.Manufacturer = manufacturer;
this.Model = model;
+ this.Manufacturer = manufacturer;
}
#endregion
diff --git a/RGB.NET.Devices.Asus/Helper/WMIHelper.cs b/RGB.NET.Devices.Asus/Helper/WMIHelper.cs
new file mode 100644
index 0000000..4b89c5c
--- /dev/null
+++ b/RGB.NET.Devices.Asus/Helper/WMIHelper.cs
@@ -0,0 +1,31 @@
+using System.Management;
+
+namespace RGB.NET.Devices.Asus
+{
+ // ReSharper disable once InconsistentNaming
+ internal static class WMIHelper
+ {
+ #region Properties & Fields
+
+ private static ManagementObjectSearcher _mainboardSearcher = new ManagementObjectSearcher(@"root\CIMV2", "SELECT * FROM Win32_BaseBoard");
+ private static (string manufacturer, string model)? _mainboardInfo;
+
+ #endregion
+
+ #region Methods
+
+ internal static (string manufacturer, string model)? GetMainboardInfo()
+ {
+ if (!_mainboardInfo.HasValue)
+ foreach (ManagementBaseObject managementBaseObject in _mainboardSearcher.Get())
+ {
+ _mainboardInfo = (managementBaseObject["Manufacturer"]?.ToString(), managementBaseObject["Product"]?.ToString());
+ break;
+ }
+
+ return _mainboardInfo;
+ }
+
+ #endregion
+ }
+}
diff --git a/RGB.NET.Devices.Asus/Images/Asus/Mainboards/PRIMEX370-PRO.png b/RGB.NET.Devices.Asus/Images/Asus/Mainboards/PRIMEX370-PRO.png
new file mode 100644
index 0000000..59a8d13
Binary files /dev/null and b/RGB.NET.Devices.Asus/Images/Asus/Mainboards/PRIMEX370-PRO.png differ
diff --git a/RGB.NET.Devices.Asus/Layouts/Asus/Mainboards/PRIMEX370-PRO.xml b/RGB.NET.Devices.Asus/Layouts/Asus/Mainboards/PRIMEX370-PRO.xml
new file mode 100644
index 0000000..642eb9e
--- /dev/null
+++ b/RGB.NET.Devices.Asus/Layouts/Asus/Mainboards/PRIMEX370-PRO.xml
@@ -0,0 +1,51 @@
+
+
+ Asus Prime X370-PRO
+ Asus Prime X370-PRO Mainboard
+ Darth Affe
+ Mainboard
+ Key
+ Asus
+ Prime X370-PRO
+ 252
+ 305
+
+
+ 0
+ 131
+ 35mm
+ 57mm
+ M 0,0 L 0,1 L 0.325,1 L 0.325,0 Z M 0.862,0 L 0.822,0.06 L 0.904,0.11 L 0.91,0.505 L 0.86,0.532 L 0.74,0.532 L 0.6575,0.485 L 0.54,0.485 L 0.425,0.55 L 0.425,0.64 L0.44,0.66 L0.44,0.755 L 0.4,0.78 L 0.4,1 L 0.5,1 L 0.5,0.805 L 0.53,0.785 L 0.53,0.6325 L 0.515,0.6225 L 0.515,0.575 L 0.575,0.543 L 0.6225,0.543 L 0.705,0.59 L 0.9,0.59 L 1,0.525 L 1,0.08 Z
+
+
+ 0
+ +
+ 17mm
+ 40mm
+ M 0.83,0 L 0.83,1 L1,1 L 1,0 Z M 0,0 L 0,1 L 0.6691,1 L 0.6691,0 Z
+
+
+ 0
+ +
+ 44mm
+ 41mm
+
+ M 0,0 L 0,1 L 0.26,1 L 0.26,0 Z M 0.32,0 L 0.32,0.29 L 0.365,0.325 L 0.395,0.325 L 0.395,0.36 L 0.455,0.41 L 0.49,0.345 L 0.4675,0.32 L 0.455,0.2475 L 0.4675,0.26 L 0.395,0.2475 L 0.395,0 Z
+ M 0.935,0.715 L 0.935,0.84 L 0.865,0.915 L 0.865,1 L 0.9375,1 L 0.9375,0.95 L 1,0.88 L 1,0.715 Z
+
+
+
+ 0
+ +
+ 68mm
+ 35mm
+ M 0,0 L 0,1 L 0.94,1 L 0.94,0.95 L 0.206,0.95 Q 0.168,0.95 0.165,0.875 L 0.165,0 Z M 0.55,0.019 L 0.55,0.132 L 0.578,0.19 L 0.578,0.2078 L 0.612,0.271 L 0.612,0.6625 L 0.635,0.7125 L0.735,0.7125 L0.755,0.75 L 0.915,0.75 L 0.92,0.76 L 0.942,0.76 L 0.94,1 L 0.99,1 L 0.99,0.72 L 0.965,0.67 L 0.935,0.67 L 0.93,0.66 L 0.772,0.66 L 0.752,0.62 L 0.66,0.62 L 0.66,0.237 L 0.622,0.16 L 0.622,0.145 L 0.5975,0.095 L 0.5975,0.019 Z
+
+
+ 80
+ 132
+ 5mm
+ 13mm
+
+
+
\ No newline at end of file
diff --git a/RGB.NET.Devices.Asus/Mainboard/AsusMainboardRGBDeviceInfo.cs b/RGB.NET.Devices.Asus/Mainboard/AsusMainboardRGBDeviceInfo.cs
index 732813e..88c8358 100644
--- a/RGB.NET.Devices.Asus/Mainboard/AsusMainboardRGBDeviceInfo.cs
+++ b/RGB.NET.Devices.Asus/Mainboard/AsusMainboardRGBDeviceInfo.cs
@@ -25,7 +25,7 @@ namespace RGB.NET.Devices.Asus
/// The type of the .
/// The handle of the .
internal AsusMainboardRGBDeviceInfo(RGBDeviceType deviceType, IntPtr handle)
- : base(deviceType, handle)
+ : base(deviceType, handle, WMIHelper.GetMainboardInfo()?.model ?? "Generic Asus-Device")
{
Image = new Uri(PathHelper.GetAbsolutePath($@"Images\Asus\Mainboards\{Model.Replace(" ", string.Empty).ToUpper()}.png"), UriKind.Absolute);
}
diff --git a/RGB.NET.Devices.Asus/RGB.NET.Devices.Asus.csproj b/RGB.NET.Devices.Asus/RGB.NET.Devices.Asus.csproj
index 733d9d1..9444ac2 100644
--- a/RGB.NET.Devices.Asus/RGB.NET.Devices.Asus.csproj
+++ b/RGB.NET.Devices.Asus/RGB.NET.Devices.Asus.csproj
@@ -34,6 +34,7 @@
+
..\packages\System.ValueTuple.4.4.0\lib\netstandard1.0\System.ValueTuple.dll
@@ -55,6 +56,7 @@
+
@@ -72,6 +74,10 @@
+
+
+ Designer
+
@@ -83,8 +89,6 @@
-
-
diff --git a/RGB.NET.Devices.Asus/RGB.NET.Devices.Asus.csproj.DotSettings b/RGB.NET.Devices.Asus/RGB.NET.Devices.Asus.csproj.DotSettings
index e9f0b89..3818a29 100644
--- a/RGB.NET.Devices.Asus/RGB.NET.Devices.Asus.csproj.DotSettings
+++ b/RGB.NET.Devices.Asus/RGB.NET.Devices.Asus.csproj.DotSettings
@@ -4,6 +4,7 @@
True
True
True
+ True
True
True
True
\ No newline at end of file
diff --git a/RGB.NET.sln.DotSettings b/RGB.NET.sln.DotSettings
index 63a42ca..2e73024 100644
--- a/RGB.NET.sln.DotSettings
+++ b/RGB.NET.sln.DotSettings
@@ -212,9 +212,13 @@
True
1
1
+ True
True
+ NEVER
+ NEVER
False
False
+ NEVER
False
ALWAYS_USE
DO_NOT_CHANGE
@@ -331,7 +335,12 @@
<Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" />
<Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" />
<Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" />
+ True
+ True
+ True
+ True
True
+ True
True
True
True