1
0
mirror of https://github.com/DarthAffe/RGB.NET.git synced 2025-12-13 01:58:30 +00:00

Some small typo and access-level fixes

This commit is contained in:
Darth Affe 2017-04-02 11:10:43 +02:00
parent 89ca7d66d5
commit a2411dd2d3
8 changed files with 13 additions and 18 deletions

View File

@ -61,7 +61,7 @@ namespace RGB.NET.Devices.Corsair
/// Applies the given layout.
/// </summary>
/// <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>
protected void ApplyLayoutFromFile(string layoutPath, string imageLayout, string imageBasePath)
{

View File

@ -6,14 +6,14 @@ namespace RGB.NET.Devices.Corsair.Helper
/// <summary>
/// Offers some helper-methods for file-path related things.
/// </summary>
public static class PathHelper
internal static class PathHelper
{
/// <summary>
/// Returns an absolute path created from an relative path relatvie to the location of the executung assembly.
/// </summary>
/// <param name="relativePath">The relative path to convert.</param>
/// <returns>The absolute path.</returns>
public static string GetAbsolutePath(string relativePath)
internal static string GetAbsolutePath(string relativePath)
{
string assemblyLocation = Assembly.GetEntryAssembly()?.Location;
if (assemblyLocation == null) return relativePath;

View File

@ -60,7 +60,7 @@ namespace RGB.NET.Devices.Logitech
/// Applies the given layout.
/// </summary>
/// <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>
protected void ApplyLayoutFromFile(string layoutPath, string imageLayout, string imageBasePath)
{

View File

@ -7,12 +7,12 @@ namespace RGB.NET.Devices.Logitech
/// <summary>
/// Offers some helper-methods for culture related things.
/// </summary>
public static class CultureHelper
internal static class CultureHelper
{
#region DLLImports
[DllImport("user32.dll")]
static extern IntPtr GetKeyboardLayout(uint thread);
private static extern IntPtr GetKeyboardLayout(uint thread);
#endregion
@ -26,7 +26,7 @@ namespace RGB.NET.Devices.Logitech
/// Gets the current keyboard-layout from the OS.
/// </summary>
/// <returns>The current keyboard-layout</returns>
public static CultureInfo GetCurrentCulture()
internal static CultureInfo GetCurrentCulture()
{
try
{

View File

@ -6,14 +6,14 @@ namespace RGB.NET.Devices.Logitech
/// <summary>
/// Offers some helper-methods for file-path related things.
/// </summary>
public static class PathHelper
internal static class PathHelper
{
/// <summary>
/// Returns an absolute path created from an relative path relatvie to the location of the executung assembly.
/// </summary>
/// <param name="relativePath">The relative path to convert.</param>
/// <returns>The absolute path.</returns>
public static string GetAbsolutePath(string relativePath)
internal static string GetAbsolutePath(string relativePath)
{
string assemblyLocation = Assembly.GetEntryAssembly()?.Location;
if (assemblyLocation == null) return relativePath;

View File

@ -3,8 +3,6 @@
using System;
using System.Globalization;
using System.IO;
using System.Reflection;
using RGB.NET.Core;
namespace RGB.NET.Devices.Logitech
@ -33,17 +31,15 @@ namespace RGB.NET.Devices.Logitech
/// <summary>
/// Internal constructor of managed <see cref="LogitechKeyboardRGBDeviceInfo"/>.
/// </summary>
/// <param name="deviceType">The type of the <see cref="IRGBDevice"/>.</param>
/// <param name="model">The represented device model.</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>
internal LogitechKeyboardRGBDeviceInfo(RGBDeviceType deviceType, string model, LogitechDeviceCaps deviceCaps, CultureInfo culture)
: base(deviceType, model, deviceCaps)
internal LogitechKeyboardRGBDeviceInfo(string model, LogitechDeviceCaps deviceCaps, CultureInfo culture)
: base(RGBDeviceType.Keyboard, model, deviceCaps)
{
SetLayouts(culture.KeyboardLayoutId);
Image = new Uri(Path.Combine(Path.GetDirectoryName(Assembly.GetEntryAssembly().Location),
$@"Images\Logitech\Keyboards\{Model.Replace(" ", string.Empty).ToUpper()}.png"), UriKind.Absolute);
Image = new Uri(PathHelper.GetAbsolutePath($@"Images\Logitech\Keyboards\{Model.Replace(" ", string.Empty).ToUpper()}.png"), UriKind.Absolute);
}
private void SetLayouts(int keyboardLayoutId)

View File

@ -261,7 +261,6 @@
<LedImageLayouts>
<LedImageLayout Layout="DE">
<LedImages>
<LedImage Id="ESC" Image="Raptor_Keys\Escape.png" />
<LedImage Id="F1" Image="Raptor_Keys\F1.png" />
<LedImage Id="F2" Image="Raptor_Keys\F2.png" />

View File

@ -76,7 +76,7 @@ namespace RGB.NET.Devices.Logitech
if (DeviceChecker.IsDeviceConnected)
{
LogitechRGBDevice device = new LogitechKeyboardRGBDevice(new LogitechKeyboardRGBDeviceInfo(
RGBDeviceType.Keyboard, DeviceChecker.ConnectedDeviceModel, LogitechDeviceCaps.PerKeyRGB, GetCulture()));
DeviceChecker.ConnectedDeviceModel, LogitechDeviceCaps.PerKeyRGB, GetCulture()));
devices.Add(device);
try