mirror of
https://github.com/DarthAffe/RGB.NET.git
synced 2025-12-13 10:08:31 +00:00
Some small typo and access-level fixes
This commit is contained in:
parent
89ca7d66d5
commit
a2411dd2d3
@ -61,7 +61,7 @@ namespace RGB.NET.Devices.Corsair
|
|||||||
/// Applies the given layout.
|
/// Applies the given layout.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="layoutPath">The file containing the layout.</param>
|
/// <param name="layoutPath">The file containing the layout.</param>
|
||||||
/// <param name="imageLayout">The name of the layout used tp get the images of the leds.</param>
|
/// <param name="imageLayout">The name of the layout used to get the images of the leds.</param>
|
||||||
/// <param name="imageBasePath">The path images for this device are collected in.</param>
|
/// <param name="imageBasePath">The path images for this device are collected in.</param>
|
||||||
protected void ApplyLayoutFromFile(string layoutPath, string imageLayout, string imageBasePath)
|
protected void ApplyLayoutFromFile(string layoutPath, string imageLayout, string imageBasePath)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -6,14 +6,14 @@ namespace RGB.NET.Devices.Corsair.Helper
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Offers some helper-methods for file-path related things.
|
/// Offers some helper-methods for file-path related things.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static class PathHelper
|
internal static class PathHelper
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns an absolute path created from an relative path relatvie to the location of the executung assembly.
|
/// Returns an absolute path created from an relative path relatvie to the location of the executung assembly.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="relativePath">The relative path to convert.</param>
|
/// <param name="relativePath">The relative path to convert.</param>
|
||||||
/// <returns>The absolute path.</returns>
|
/// <returns>The absolute path.</returns>
|
||||||
public static string GetAbsolutePath(string relativePath)
|
internal static string GetAbsolutePath(string relativePath)
|
||||||
{
|
{
|
||||||
string assemblyLocation = Assembly.GetEntryAssembly()?.Location;
|
string assemblyLocation = Assembly.GetEntryAssembly()?.Location;
|
||||||
if (assemblyLocation == null) return relativePath;
|
if (assemblyLocation == null) return relativePath;
|
||||||
|
|||||||
@ -60,7 +60,7 @@ namespace RGB.NET.Devices.Logitech
|
|||||||
/// Applies the given layout.
|
/// Applies the given layout.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="layoutPath">The file containing the layout.</param>
|
/// <param name="layoutPath">The file containing the layout.</param>
|
||||||
/// <param name="imageLayout">The name of the layout used tp get the images of the leds.</param>
|
/// <param name="imageLayout">The name of the layout used to get the images of the leds.</param>
|
||||||
/// <param name="imageBasePath">The path images for this device are collected in.</param>
|
/// <param name="imageBasePath">The path images for this device are collected in.</param>
|
||||||
protected void ApplyLayoutFromFile(string layoutPath, string imageLayout, string imageBasePath)
|
protected void ApplyLayoutFromFile(string layoutPath, string imageLayout, string imageBasePath)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -7,12 +7,12 @@ namespace RGB.NET.Devices.Logitech
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Offers some helper-methods for culture related things.
|
/// Offers some helper-methods for culture related things.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static class CultureHelper
|
internal static class CultureHelper
|
||||||
{
|
{
|
||||||
#region DLLImports
|
#region DLLImports
|
||||||
|
|
||||||
[DllImport("user32.dll")]
|
[DllImport("user32.dll")]
|
||||||
static extern IntPtr GetKeyboardLayout(uint thread);
|
private static extern IntPtr GetKeyboardLayout(uint thread);
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@ -26,7 +26,7 @@ namespace RGB.NET.Devices.Logitech
|
|||||||
/// Gets the current keyboard-layout from the OS.
|
/// Gets the current keyboard-layout from the OS.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>The current keyboard-layout</returns>
|
/// <returns>The current keyboard-layout</returns>
|
||||||
public static CultureInfo GetCurrentCulture()
|
internal static CultureInfo GetCurrentCulture()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|||||||
@ -6,14 +6,14 @@ namespace RGB.NET.Devices.Logitech
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Offers some helper-methods for file-path related things.
|
/// Offers some helper-methods for file-path related things.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static class PathHelper
|
internal static class PathHelper
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns an absolute path created from an relative path relatvie to the location of the executung assembly.
|
/// Returns an absolute path created from an relative path relatvie to the location of the executung assembly.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="relativePath">The relative path to convert.</param>
|
/// <param name="relativePath">The relative path to convert.</param>
|
||||||
/// <returns>The absolute path.</returns>
|
/// <returns>The absolute path.</returns>
|
||||||
public static string GetAbsolutePath(string relativePath)
|
internal static string GetAbsolutePath(string relativePath)
|
||||||
{
|
{
|
||||||
string assemblyLocation = Assembly.GetEntryAssembly()?.Location;
|
string assemblyLocation = Assembly.GetEntryAssembly()?.Location;
|
||||||
if (assemblyLocation == null) return relativePath;
|
if (assemblyLocation == null) return relativePath;
|
||||||
|
|||||||
@ -3,8 +3,6 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.IO;
|
|
||||||
using System.Reflection;
|
|
||||||
using RGB.NET.Core;
|
using RGB.NET.Core;
|
||||||
|
|
||||||
namespace RGB.NET.Devices.Logitech
|
namespace RGB.NET.Devices.Logitech
|
||||||
@ -33,17 +31,15 @@ namespace RGB.NET.Devices.Logitech
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Internal constructor of managed <see cref="LogitechKeyboardRGBDeviceInfo"/>.
|
/// Internal constructor of managed <see cref="LogitechKeyboardRGBDeviceInfo"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="deviceType">The type of the <see cref="IRGBDevice"/>.</param>
|
|
||||||
/// <param name="model">The represented device model.</param>
|
/// <param name="model">The represented device model.</param>
|
||||||
/// <param name="deviceCaps">The lighting-capabilities of the device.</param>
|
/// <param name="deviceCaps">The lighting-capabilities of the device.</param>
|
||||||
/// <param name="culture">The <see cref="CultureInfo"/> of the layout this keyboard is using</param>
|
/// <param name="culture">The <see cref="CultureInfo"/> of the layout this keyboard is using</param>
|
||||||
internal LogitechKeyboardRGBDeviceInfo(RGBDeviceType deviceType, string model, LogitechDeviceCaps deviceCaps, CultureInfo culture)
|
internal LogitechKeyboardRGBDeviceInfo(string model, LogitechDeviceCaps deviceCaps, CultureInfo culture)
|
||||||
: base(deviceType, model, deviceCaps)
|
: base(RGBDeviceType.Keyboard, model, deviceCaps)
|
||||||
{
|
{
|
||||||
SetLayouts(culture.KeyboardLayoutId);
|
SetLayouts(culture.KeyboardLayoutId);
|
||||||
|
|
||||||
Image = new Uri(Path.Combine(Path.GetDirectoryName(Assembly.GetEntryAssembly().Location),
|
Image = new Uri(PathHelper.GetAbsolutePath($@"Images\Logitech\Keyboards\{Model.Replace(" ", string.Empty).ToUpper()}.png"), UriKind.Absolute);
|
||||||
$@"Images\Logitech\Keyboards\{Model.Replace(" ", string.Empty).ToUpper()}.png"), UriKind.Absolute);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SetLayouts(int keyboardLayoutId)
|
private void SetLayouts(int keyboardLayoutId)
|
||||||
|
|||||||
@ -261,7 +261,6 @@
|
|||||||
<LedImageLayouts>
|
<LedImageLayouts>
|
||||||
<LedImageLayout Layout="DE">
|
<LedImageLayout Layout="DE">
|
||||||
<LedImages>
|
<LedImages>
|
||||||
|
|
||||||
<LedImage Id="ESC" Image="Raptor_Keys\Escape.png" />
|
<LedImage Id="ESC" Image="Raptor_Keys\Escape.png" />
|
||||||
<LedImage Id="F1" Image="Raptor_Keys\F1.png" />
|
<LedImage Id="F1" Image="Raptor_Keys\F1.png" />
|
||||||
<LedImage Id="F2" Image="Raptor_Keys\F2.png" />
|
<LedImage Id="F2" Image="Raptor_Keys\F2.png" />
|
||||||
|
|||||||
@ -76,7 +76,7 @@ namespace RGB.NET.Devices.Logitech
|
|||||||
if (DeviceChecker.IsDeviceConnected)
|
if (DeviceChecker.IsDeviceConnected)
|
||||||
{
|
{
|
||||||
LogitechRGBDevice device = new LogitechKeyboardRGBDevice(new LogitechKeyboardRGBDeviceInfo(
|
LogitechRGBDevice device = new LogitechKeyboardRGBDevice(new LogitechKeyboardRGBDeviceInfo(
|
||||||
RGBDeviceType.Keyboard, DeviceChecker.ConnectedDeviceModel, LogitechDeviceCaps.PerKeyRGB, GetCulture()));
|
DeviceChecker.ConnectedDeviceModel, LogitechDeviceCaps.PerKeyRGB, GetCulture()));
|
||||||
devices.Add(device);
|
devices.Add(device);
|
||||||
|
|
||||||
try
|
try
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user