Added Led-Images as layout-part

This commit is contained in:
DarthAffe committed 2017-02-11 09:39:03 +01:00
1 parent 6d48cae4b3
commit 256c6dea74
19 files changed
+184 -51

No files matched your search

@@ -1,10 +1,9 @@
// ReSharper disable MemberCanBePrivate.Global
// ReSharper disable UnusedMember.Global
using System.IO;
using System.Reflection;
using RGB.NET.Core;
using RGB.NET.Core.Exceptions;
using RGB.NET.Devices.Corsair.Helper;
namespace RGB.NET.Devices.Corsair
{
@@ -65,8 +64,8 @@ namespace RGB.NET.Devices.Corsair
throw new RGBDeviceException($"Can't initial mouse with layout '{MouseDeviceInfo.PhysicalLayout}'");
}
ApplyLayoutFromFile(Path.Combine(Path.GetDirectoryName(Assembly.GetEntryAssembly().Location),
$@"Layouts\Corsair\String\{MouseDeviceInfo.Model.Replace(" ", string.Empty).ToUpper()}.xml"));
ApplyLayoutFromFile(PathHelper.GetAbsolutePath($@"Layouts\Corsair\Mice\{MouseDeviceInfo.Model.Replace(" ", string.Empty).ToUpper()}.xml"),
null, PathHelper.GetAbsolutePath(@"Images\Corsair\Mice"));
}
#endregion
@@ -1,6 +1,5 @@
using System;
using System.IO;
using System.Reflection;
using RGB.NET.Devices.Corsair.Helper;
using RGB.NET.Devices.Corsair.Native;
namespace RGB.NET.Devices.Corsair
@@ -31,8 +30,7 @@ namespace RGB.NET.Devices.Corsair
{
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);
Image = new Uri(PathHelper.GetAbsolutePath($@"Images\Corsair\Mice\{Model.Replace(" ", string.Empty).ToUpper()}.png"), UriKind.Absolute);
}
#endregion