diff --git a/RGB.NET.Core/Color/HclColor.cs b/RGB.NET.Core/Color/HclColor.cs index 368ae8d..3adc41b 100644 --- a/RGB.NET.Core/Color/HclColor.cs +++ b/RGB.NET.Core/Color/HclColor.cs @@ -155,8 +155,8 @@ namespace RGB.NET.Core /// The color created from the values. public static Color Create(float alpha, float h, float c, float l) { - (float r, float g, float _b) = CalculateRGBFromHcl(h, c, l); - return new Color(alpha, r, g, _b); + (float r, float g, float b) = CalculateRGBFromHcl(h, c, l); + return new Color(alpha, r, g, b); } #endregion @@ -167,6 +167,7 @@ namespace RGB.NET.Core { const float RADIANS_DEGREES_CONVERSION = 180.0f / MathF.PI; + // ReSharper disable once InconsistentNaming - b is used above (float l, float a, float _b) = LabColor.CalculateLabFromRGB(r, g, b); float h, c; diff --git a/RGB.NET.Core/Color/LabColor.cs b/RGB.NET.Core/Color/LabColor.cs index 5583a79..3da5f2c 100644 --- a/RGB.NET.Core/Color/LabColor.cs +++ b/RGB.NET.Core/Color/LabColor.cs @@ -155,6 +155,7 @@ namespace RGB.NET.Core /// The color created from the values. public static Color Create(float alpha, float l, float a, float b) { + // ReSharper disable once InconsistentNaming - b is used above (float r, float g, float _b) = CalculateRGBFromLab(l, a, b); return new Color(alpha, r, g, _b); } diff --git a/RGB.NET.Core/Devices/IRGBDeviceProvider.cs b/RGB.NET.Core/Devices/IRGBDeviceProvider.cs index 5233ce9..cad53ce 100644 --- a/RGB.NET.Core/Devices/IRGBDeviceProvider.cs +++ b/RGB.NET.Core/Devices/IRGBDeviceProvider.cs @@ -1,4 +1,6 @@ -using System; +// ReSharper disable EventNeverSubscribedTo.Global + +using System; using System.Collections.Generic; using System.Collections.ObjectModel; diff --git a/RGB.NET.Core/Extensions/PointExtensions.cs b/RGB.NET.Core/Extensions/PointExtensions.cs index cdc04f7..3fdf7a7 100644 --- a/RGB.NET.Core/Extensions/PointExtensions.cs +++ b/RGB.NET.Core/Extensions/PointExtensions.cs @@ -33,7 +33,7 @@ namespace RGB.NET.Core x = (x * cos) - (y * sin); y = (x * sin) + (y * cos); - return new Point(x + origin.X, y + origin.Y); ; + return new Point(x + origin.X, y + origin.Y); } #endregion diff --git a/RGB.NET.Core/Groups/ListLedGroup.cs b/RGB.NET.Core/Groups/ListLedGroup.cs index b6be55b..06e28ae 100644 --- a/RGB.NET.Core/Groups/ListLedGroup.cs +++ b/RGB.NET.Core/Groups/ListLedGroup.cs @@ -73,7 +73,7 @@ namespace RGB.NET.Core { lock (GroupLeds) foreach (Led led in leds) - if ((led != null) && !ContainsLed(led)) + if (!ContainsLed(led)) GroupLeds.Add(led); } @@ -91,8 +91,7 @@ namespace RGB.NET.Core { lock (GroupLeds) foreach (Led led in leds) - if (led != null) - GroupLeds.Remove(led); + GroupLeds.Remove(led); } /// diff --git a/RGB.NET.Core/Positioning/IPlaceable.cs b/RGB.NET.Core/Positioning/IPlaceable.cs index dd6d79c..d7e116f 100644 --- a/RGB.NET.Core/Positioning/IPlaceable.cs +++ b/RGB.NET.Core/Positioning/IPlaceable.cs @@ -1,4 +1,6 @@ -using System; +// ReSharper disable EventNeverSubscribedTo.Global + +using System; namespace RGB.NET.Core { diff --git a/RGB.NET.Core/Positioning/Point.cs b/RGB.NET.Core/Positioning/Point.cs index 5f04a76..588d889 100644 --- a/RGB.NET.Core/Positioning/Point.cs +++ b/RGB.NET.Core/Positioning/Point.cs @@ -1,6 +1,7 @@ // ReSharper disable MemberCanBePrivate.Global // ReSharper disable UnusedMember.Global +using System; using System.Diagnostics; namespace RGB.NET.Core @@ -65,9 +66,8 @@ namespace RGB.NET.Core /// true if is a equivalent to this ; otherwise, false. public override bool Equals(object? obj) { - if (!(obj is Point)) return false; + if (obj is not Point comparePoint) return false; - Point comparePoint = (Point)obj; return ((float.IsNaN(X) && float.IsNaN(comparePoint.X)) || X.EqualsInTolerance(comparePoint.X)) && ((float.IsNaN(Y) && float.IsNaN(comparePoint.Y)) || Y.EqualsInTolerance(comparePoint.Y)); } @@ -76,15 +76,7 @@ namespace RGB.NET.Core /// Returns a hash code for this . /// /// An integer value that specifies the hash code for this . - public override int GetHashCode() - { - unchecked - { - int hashCode = X.GetHashCode(); - hashCode = (hashCode * 397) ^ Y.GetHashCode(); - return hashCode; - } - } + public override int GetHashCode() => HashCode.Combine(X, Y); #endregion diff --git a/RGB.NET.Core/Rendering/Textures/PixelTexture.cs b/RGB.NET.Core/Rendering/Textures/PixelTexture.cs index 48a5f6f..f5f1719 100644 --- a/RGB.NET.Core/Rendering/Textures/PixelTexture.cs +++ b/RGB.NET.Core/Rendering/Textures/PixelTexture.cs @@ -74,7 +74,7 @@ namespace RGB.NET.Core { T[] rent = ArrayPool.Shared.Rent(bufferSize); - Span buffer = new Span(rent).Slice(0, bufferSize); + Span buffer = new Span(rent)[..bufferSize]; GetRegionData(x, y, width, height, buffer); Span pixelData = stackalloc T[_dataPerPixel]; diff --git a/RGB.NET.Core/Update/AbstractUpdateTrigger.cs b/RGB.NET.Core/Update/AbstractUpdateTrigger.cs index 127b215..10ccd52 100644 --- a/RGB.NET.Core/Update/AbstractUpdateTrigger.cs +++ b/RGB.NET.Core/Update/AbstractUpdateTrigger.cs @@ -9,6 +9,7 @@ namespace RGB.NET.Core { #region Properties & Fields + /// public abstract double LastUpdateTime { get; protected set; } #endregion diff --git a/RGB.NET.Core/Update/Devices/UpdateQueue.cs b/RGB.NET.Core/Update/Devices/UpdateQueue.cs index 9330e26..a48a1c7 100644 --- a/RGB.NET.Core/Update/Devices/UpdateQueue.cs +++ b/RGB.NET.Core/Update/Devices/UpdateQueue.cs @@ -53,7 +53,7 @@ namespace RGB.NET.Core if (_currentDataSet.Count == 0) return; dataSet = ArrayPool<(TIdentifier, TData)>.Shared.Rent(_currentDataSet.Count); - data = new Span<(TIdentifier, TData)>(dataSet).Slice(0, _currentDataSet.Count); + data = new Span<(TIdentifier, TData)>(dataSet)[.._currentDataSet.Count]; int i = 0; foreach ((TIdentifier key, TData value) in _currentDataSet) @@ -115,6 +115,8 @@ namespace RGB.NET.Core _updateTrigger.Update -= OnUpdate; Reset(); + + GC.SuppressFinalize(this); } #endregion diff --git a/RGB.NET.Core/Update/ManualUpdateTrigger.cs b/RGB.NET.Core/Update/ManualUpdateTrigger.cs index 3832570..96877cb 100644 --- a/RGB.NET.Core/Update/ManualUpdateTrigger.cs +++ b/RGB.NET.Core/Update/ManualUpdateTrigger.cs @@ -14,7 +14,7 @@ namespace RGB.NET.Core { #region Properties & Fields - private AutoResetEvent _mutex = new(false); + private readonly AutoResetEvent _mutex = new(false); private Task? UpdateTask { get; set; } private CancellationTokenSource? UpdateTokenSource { get; set; } private CancellationToken UpdateToken { get; set; } diff --git a/RGB.NET.Core/Update/TimerUpdateTrigger.cs b/RGB.NET.Core/Update/TimerUpdateTrigger.cs index e6ef02a..5a7b7e3 100644 --- a/RGB.NET.Core/Update/TimerUpdateTrigger.cs +++ b/RGB.NET.Core/Update/TimerUpdateTrigger.cs @@ -1,5 +1,6 @@ // ReSharper disable MemberCanBePrivate.Global +using System; using System.Diagnostics; using System.Threading; using System.Threading.Tasks; @@ -14,7 +15,7 @@ namespace RGB.NET.Core { #region Properties & Fields - private object _lock = new(); + private readonly object _lock = new(); protected Task? UpdateTask { get; set; } protected CancellationTokenSource? UpdateTokenSource { get; set; } @@ -46,6 +47,7 @@ namespace RGB.NET.Core public TimerUpdateTrigger(bool autostart = true) { if (autostart) + // ReSharper disable once VirtualMemberCallInConstructor - HACK DarthAffe 01.06.2021: I've no idea how to correctly handle that case, for now just disable it Start(); } @@ -109,7 +111,11 @@ namespace RGB.NET.Core } /// - public override void Dispose() => Stop(); + public override void Dispose() + { + Stop(); + GC.SuppressFinalize(this); + } #endregion } diff --git a/RGB.NET.Devices.Asus/Keyboard/AsusKeyboardLedMapping.cs b/RGB.NET.Devices.Asus/Keyboard/AsusKeyboardLedMapping.cs index 30fd811..24f427f 100644 --- a/RGB.NET.Devices.Asus/Keyboard/AsusKeyboardLedMapping.cs +++ b/RGB.NET.Devices.Asus/Keyboard/AsusKeyboardLedMapping.cs @@ -7,160 +7,159 @@ namespace RGB.NET.Devices.Asus /// /// A LED mapping containing ASUS keyboard LED IDs /// - public static readonly LedMapping KeyboardMapping = - new() - { - {LedId.Keyboard_Escape, AsusLedId.KEY_ESCAPE}, - {LedId.Keyboard_F1, AsusLedId.KEY_F1}, - {LedId.Keyboard_F2, AsusLedId.KEY_F2}, - {LedId.Keyboard_F3, AsusLedId.KEY_F3}, - {LedId.Keyboard_F4, AsusLedId.KEY_F4}, - {LedId.Keyboard_F5, AsusLedId.KEY_F5}, - {LedId.Keyboard_F6, AsusLedId.KEY_F6}, - {LedId.Keyboard_F7, AsusLedId.KEY_F7}, - {LedId.Keyboard_F8, AsusLedId.KEY_F8}, - {LedId.Keyboard_F9, AsusLedId.KEY_F9}, - {LedId.Keyboard_F10, AsusLedId.KEY_F10}, - {LedId.Keyboard_F11, AsusLedId.KEY_F11}, - {LedId.Keyboard_F12, AsusLedId.KEY_F12}, - {LedId.Keyboard_1, AsusLedId.KEY_1}, - {LedId.Keyboard_2, AsusLedId.KEY_2}, - {LedId.Keyboard_3, AsusLedId.KEY_3}, - {LedId.Keyboard_4, AsusLedId.KEY_4}, - {LedId.Keyboard_5, AsusLedId.KEY_5}, - {LedId.Keyboard_6, AsusLedId.KEY_6}, - {LedId.Keyboard_7, AsusLedId.KEY_7}, - {LedId.Keyboard_8, AsusLedId.KEY_8}, - {LedId.Keyboard_9, AsusLedId.KEY_9}, - {LedId.Keyboard_0, AsusLedId.KEY_0}, - {LedId.Keyboard_MinusAndUnderscore, AsusLedId.KEY_MINUS}, - {LedId.Keyboard_EqualsAndPlus, AsusLedId.KEY_EQUALS}, - {LedId.Keyboard_Backspace, AsusLedId.KEY_BACK}, - {LedId.Keyboard_Tab, AsusLedId.KEY_TAB}, - {LedId.Keyboard_Q, AsusLedId.KEY_Q}, - {LedId.Keyboard_W, AsusLedId.KEY_W}, - {LedId.Keyboard_E, AsusLedId.KEY_E}, - {LedId.Keyboard_R, AsusLedId.KEY_R}, - {LedId.Keyboard_T, AsusLedId.KEY_T}, - {LedId.Keyboard_Y, AsusLedId.KEY_Y}, - {LedId.Keyboard_U, AsusLedId.KEY_U}, - {LedId.Keyboard_I, AsusLedId.KEY_I}, - {LedId.Keyboard_O, AsusLedId.KEY_O}, - {LedId.Keyboard_P, AsusLedId.KEY_P}, - {LedId.Keyboard_BracketLeft, AsusLedId.KEY_LBRACKET}, - {LedId.Keyboard_BracketRight, AsusLedId.KEY_RBRACKET}, - {LedId.Keyboard_Enter, AsusLedId.KEY_RETURN}, - {LedId.Keyboard_CapsLock, AsusLedId.KEY_CAPITAL}, - {LedId.Keyboard_A, AsusLedId.KEY_A}, - {LedId.Keyboard_S, AsusLedId.KEY_S}, - {LedId.Keyboard_D, AsusLedId.KEY_D}, - {LedId.Keyboard_F, AsusLedId.KEY_F}, - {LedId.Keyboard_G, AsusLedId.KEY_G}, - {LedId.Keyboard_H, AsusLedId.KEY_H}, - {LedId.Keyboard_J, AsusLedId.KEY_J}, - {LedId.Keyboard_K, AsusLedId.KEY_K}, - {LedId.Keyboard_L, AsusLedId.KEY_L}, - {LedId.Keyboard_SemicolonAndColon, AsusLedId.KEY_SEMICOLON}, - {LedId.Keyboard_ApostropheAndDoubleQuote, AsusLedId.KEY_APOSTROPHE}, - {LedId.Keyboard_GraveAccentAndTilde, AsusLedId.KEY_GRAVE}, - {LedId.Keyboard_LeftShift, AsusLedId.KEY_LSHIFT}, - {LedId.Keyboard_Backslash, AsusLedId.KEY_BACKSLASH}, - {LedId.Keyboard_Z, AsusLedId.KEY_Z}, - {LedId.Keyboard_X, AsusLedId.KEY_X}, - {LedId.Keyboard_C, AsusLedId.KEY_C}, - {LedId.Keyboard_V, AsusLedId.KEY_V}, - {LedId.Keyboard_B, AsusLedId.KEY_B}, - {LedId.Keyboard_N, AsusLedId.KEY_N}, - {LedId.Keyboard_M, AsusLedId.KEY_M}, - {LedId.Keyboard_CommaAndLessThan, AsusLedId.KEY_COMMA}, - {LedId.Keyboard_PeriodAndBiggerThan, AsusLedId.KEY_PERIOD}, - {LedId.Keyboard_SlashAndQuestionMark, AsusLedId.KEY_SLASH}, - {LedId.Keyboard_RightShift, AsusLedId.KEY_RSHIFT}, - {LedId.Keyboard_LeftCtrl, AsusLedId.KEY_LCONTROL}, - {LedId.Keyboard_LeftGui, AsusLedId.KEY_LWIN}, - {LedId.Keyboard_LeftAlt, AsusLedId.KEY_LMENU}, - {LedId.Keyboard_Space, AsusLedId.KEY_SPACE}, - {LedId.Keyboard_RightAlt, AsusLedId.KEY_RMENU}, - {LedId.Keyboard_RightGui, AsusLedId.KEY_RWIN}, - {LedId.Keyboard_Application, AsusLedId.KEY_APPS}, - {LedId.Keyboard_RightCtrl, AsusLedId.KEY_RCONTROL}, - {LedId.Keyboard_PrintScreen, AsusLedId.KEY_SYSRQ}, - {LedId.Keyboard_ScrollLock, AsusLedId.KEY_SCROLL}, - {LedId.Keyboard_PauseBreak, AsusLedId.KEY_PAUSE}, - {LedId.Keyboard_Insert, AsusLedId.KEY_INSERT}, - {LedId.Keyboard_Home, AsusLedId.KEY_HOME}, - {LedId.Keyboard_PageUp, AsusLedId.KEY_PRIOR}, - {LedId.Keyboard_Delete, AsusLedId.KEY_DELETE}, - {LedId.Keyboard_End, AsusLedId.KEY_END}, - {LedId.Keyboard_PageDown, AsusLedId.KEY_NEXT}, - {LedId.Keyboard_ArrowUp, AsusLedId.KEY_UP}, - {LedId.Keyboard_ArrowLeft, AsusLedId.KEY_LEFT}, - {LedId.Keyboard_ArrowDown, AsusLedId.KEY_DOWN}, - {LedId.Keyboard_ArrowRight, AsusLedId.KEY_RIGHT}, - {LedId.Keyboard_NumLock, AsusLedId.KEY_NUMLOCK}, - {LedId.Keyboard_NumSlash, AsusLedId.KEY_DIVIDE}, - {LedId.Keyboard_NumAsterisk, AsusLedId.KEY_MULTIPLY}, - {LedId.Keyboard_NumMinus, AsusLedId.KEY_SUBTRACT}, - {LedId.Keyboard_Num7, AsusLedId.KEY_NUMPAD7}, - {LedId.Keyboard_Num8, AsusLedId.KEY_NUMPAD8}, - {LedId.Keyboard_Num9, AsusLedId.KEY_NUMPAD9}, - {LedId.Keyboard_NumPeriodAndDelete, AsusLedId.KEY_DECIMAL}, - {LedId.Keyboard_NumPlus, AsusLedId.KEY_ADD}, - {LedId.Keyboard_Num4, AsusLedId.KEY_NUMPAD4}, - {LedId.Keyboard_Num5, AsusLedId.KEY_NUMPAD5}, - {LedId.Keyboard_Num6, AsusLedId.KEY_NUMPAD6}, - {LedId.Keyboard_Num1, AsusLedId.KEY_NUMPAD1}, - {LedId.Keyboard_Num2, AsusLedId.KEY_NUMPAD2}, - {LedId.Keyboard_Num3, AsusLedId.KEY_NUMPAD3}, - {LedId.Keyboard_Num0, AsusLedId.KEY_NUMPAD0}, - {LedId.Keyboard_NumEnter, AsusLedId.KEY_NUMPADENTER}, - {LedId.Keyboard_NonUsBackslash, AsusLedId.UNDOCUMENTED_1}, - {LedId.Keyboard_NonUsTilde, AsusLedId.UNDOCUMENTED_2}, - {LedId.Keyboard_NumComma, AsusLedId.KEY_NUMPADCOMMA}, - {LedId.Logo, AsusLedId.UNDOCUMENTED_3}, - {LedId.Keyboard_Function, AsusLedId.KEY_FN}, - {LedId.Keyboard_MediaMute, AsusLedId.KEY_MUTE}, - {LedId.Keyboard_MediaPlay, AsusLedId.KEY_PLAYPAUSE}, - {LedId.Keyboard_MediaStop, AsusLedId.KEY_MEDIASTOP}, - {LedId.Keyboard_MediaVolumeDown, AsusLedId.KEY_VOLUMEDOWN}, - {LedId.Keyboard_MediaVolumeUp, AsusLedId.KEY_VOLUMEUP}, - {LedId.Keyboard_Custom1, AsusLedId.KEY_F13}, - {LedId.Keyboard_Custom2, AsusLedId.KEY_F14}, - {LedId.Keyboard_Custom3, AsusLedId.KEY_F15}, - {LedId.Keyboard_Custom4, AsusLedId.KEY_KANA}, - {LedId.Keyboard_Custom5, AsusLedId.KEY_ABNT_C1}, - {LedId.Keyboard_Custom6, AsusLedId.KEY_CONVERT}, - {LedId.Keyboard_Custom7, AsusLedId.KEY_NOCONVERT}, - {LedId.Keyboard_Custom8, AsusLedId.KEY_YEN}, - {LedId.Keyboard_Custom9, AsusLedId.KEY_ABNT_C2}, - {LedId.Keyboard_Custom10, AsusLedId.KEY_NUMPADEQUALS}, - {LedId.Keyboard_Custom11, AsusLedId.KEY_CIRCUMFLEX}, - {LedId.Keyboard_Custom12, AsusLedId.KEY_AT}, - {LedId.Keyboard_Custom13, AsusLedId.KEY_COLON}, - {LedId.Keyboard_Custom14, AsusLedId.KEY_UNDERLINE}, - {LedId.Keyboard_Custom15, AsusLedId.KEY_KANJI}, - {LedId.Keyboard_Custom16, AsusLedId.KEY_STOP}, - {LedId.Keyboard_Custom17, AsusLedId.KEY_AX}, - {LedId.Keyboard_Custom18, AsusLedId.KEY_UNLABELED}, - {LedId.Keyboard_Custom19, AsusLedId.KEY_NEXTTRACK}, - {LedId.Keyboard_Custom20, AsusLedId.KEY_CALCULATOR}, - {LedId.Keyboard_Custom21, AsusLedId.KEY_POWER}, - {LedId.Keyboard_Custom22, AsusLedId.KEY_SLEEP}, - {LedId.Keyboard_Custom23, AsusLedId.KEY_WAKE}, - {LedId.Keyboard_Custom24, AsusLedId.KEY_WEBSEARCH}, - {LedId.Keyboard_Custom25, AsusLedId.KEY_WEBFAVORITES}, - {LedId.Keyboard_Custom26, AsusLedId.KEY_WEBREFRESH}, - {LedId.Keyboard_Custom27, AsusLedId.KEY_WEBSTOP}, - {LedId.Keyboard_Custom28, AsusLedId.KEY_WEBFORWARD}, - {LedId.Keyboard_Custom29, AsusLedId.KEY_WEBHOME}, - {LedId.Keyboard_Custom30, AsusLedId.KEY_WEBBACK}, - {LedId.Keyboard_Custom31, AsusLedId.KEY_MYCOMPUTER}, - {LedId.Keyboard_Custom32, AsusLedId.KEY_MAIL}, - {LedId.Keyboard_Custom33, AsusLedId.KEY_MEDIASELECT}, - {LedId.Keyboard_Custom34, AsusLedId.UNDOCUMENTED_4}, - {LedId.Keyboard_Custom35, AsusLedId.UNDOCUMENTED_5}, - {LedId.Keyboard_Custom36, AsusLedId.UNDOCUMENTED_6} - }; + public static LedMapping KeyboardMapping { get; } = new() + { + { LedId.Keyboard_Escape, AsusLedId.KEY_ESCAPE }, + { LedId.Keyboard_F1, AsusLedId.KEY_F1 }, + { LedId.Keyboard_F2, AsusLedId.KEY_F2 }, + { LedId.Keyboard_F3, AsusLedId.KEY_F3 }, + { LedId.Keyboard_F4, AsusLedId.KEY_F4 }, + { LedId.Keyboard_F5, AsusLedId.KEY_F5 }, + { LedId.Keyboard_F6, AsusLedId.KEY_F6 }, + { LedId.Keyboard_F7, AsusLedId.KEY_F7 }, + { LedId.Keyboard_F8, AsusLedId.KEY_F8 }, + { LedId.Keyboard_F9, AsusLedId.KEY_F9 }, + { LedId.Keyboard_F10, AsusLedId.KEY_F10 }, + { LedId.Keyboard_F11, AsusLedId.KEY_F11 }, + { LedId.Keyboard_F12, AsusLedId.KEY_F12 }, + { LedId.Keyboard_1, AsusLedId.KEY_1 }, + { LedId.Keyboard_2, AsusLedId.KEY_2 }, + { LedId.Keyboard_3, AsusLedId.KEY_3 }, + { LedId.Keyboard_4, AsusLedId.KEY_4 }, + { LedId.Keyboard_5, AsusLedId.KEY_5 }, + { LedId.Keyboard_6, AsusLedId.KEY_6 }, + { LedId.Keyboard_7, AsusLedId.KEY_7 }, + { LedId.Keyboard_8, AsusLedId.KEY_8 }, + { LedId.Keyboard_9, AsusLedId.KEY_9 }, + { LedId.Keyboard_0, AsusLedId.KEY_0 }, + { LedId.Keyboard_MinusAndUnderscore, AsusLedId.KEY_MINUS }, + { LedId.Keyboard_EqualsAndPlus, AsusLedId.KEY_EQUALS }, + { LedId.Keyboard_Backspace, AsusLedId.KEY_BACK }, + { LedId.Keyboard_Tab, AsusLedId.KEY_TAB }, + { LedId.Keyboard_Q, AsusLedId.KEY_Q }, + { LedId.Keyboard_W, AsusLedId.KEY_W }, + { LedId.Keyboard_E, AsusLedId.KEY_E }, + { LedId.Keyboard_R, AsusLedId.KEY_R }, + { LedId.Keyboard_T, AsusLedId.KEY_T }, + { LedId.Keyboard_Y, AsusLedId.KEY_Y }, + { LedId.Keyboard_U, AsusLedId.KEY_U }, + { LedId.Keyboard_I, AsusLedId.KEY_I }, + { LedId.Keyboard_O, AsusLedId.KEY_O }, + { LedId.Keyboard_P, AsusLedId.KEY_P }, + { LedId.Keyboard_BracketLeft, AsusLedId.KEY_LBRACKET }, + { LedId.Keyboard_BracketRight, AsusLedId.KEY_RBRACKET }, + { LedId.Keyboard_Enter, AsusLedId.KEY_RETURN }, + { LedId.Keyboard_CapsLock, AsusLedId.KEY_CAPITAL }, + { LedId.Keyboard_A, AsusLedId.KEY_A }, + { LedId.Keyboard_S, AsusLedId.KEY_S }, + { LedId.Keyboard_D, AsusLedId.KEY_D }, + { LedId.Keyboard_F, AsusLedId.KEY_F }, + { LedId.Keyboard_G, AsusLedId.KEY_G }, + { LedId.Keyboard_H, AsusLedId.KEY_H }, + { LedId.Keyboard_J, AsusLedId.KEY_J }, + { LedId.Keyboard_K, AsusLedId.KEY_K }, + { LedId.Keyboard_L, AsusLedId.KEY_L }, + { LedId.Keyboard_SemicolonAndColon, AsusLedId.KEY_SEMICOLON }, + { LedId.Keyboard_ApostropheAndDoubleQuote, AsusLedId.KEY_APOSTROPHE }, + { LedId.Keyboard_GraveAccentAndTilde, AsusLedId.KEY_GRAVE }, + { LedId.Keyboard_LeftShift, AsusLedId.KEY_LSHIFT }, + { LedId.Keyboard_Backslash, AsusLedId.KEY_BACKSLASH }, + { LedId.Keyboard_Z, AsusLedId.KEY_Z }, + { LedId.Keyboard_X, AsusLedId.KEY_X }, + { LedId.Keyboard_C, AsusLedId.KEY_C }, + { LedId.Keyboard_V, AsusLedId.KEY_V }, + { LedId.Keyboard_B, AsusLedId.KEY_B }, + { LedId.Keyboard_N, AsusLedId.KEY_N }, + { LedId.Keyboard_M, AsusLedId.KEY_M }, + { LedId.Keyboard_CommaAndLessThan, AsusLedId.KEY_COMMA }, + { LedId.Keyboard_PeriodAndBiggerThan, AsusLedId.KEY_PERIOD }, + { LedId.Keyboard_SlashAndQuestionMark, AsusLedId.KEY_SLASH }, + { LedId.Keyboard_RightShift, AsusLedId.KEY_RSHIFT }, + { LedId.Keyboard_LeftCtrl, AsusLedId.KEY_LCONTROL }, + { LedId.Keyboard_LeftGui, AsusLedId.KEY_LWIN }, + { LedId.Keyboard_LeftAlt, AsusLedId.KEY_LMENU }, + { LedId.Keyboard_Space, AsusLedId.KEY_SPACE }, + { LedId.Keyboard_RightAlt, AsusLedId.KEY_RMENU }, + { LedId.Keyboard_RightGui, AsusLedId.KEY_RWIN }, + { LedId.Keyboard_Application, AsusLedId.KEY_APPS }, + { LedId.Keyboard_RightCtrl, AsusLedId.KEY_RCONTROL }, + { LedId.Keyboard_PrintScreen, AsusLedId.KEY_SYSRQ }, + { LedId.Keyboard_ScrollLock, AsusLedId.KEY_SCROLL }, + { LedId.Keyboard_PauseBreak, AsusLedId.KEY_PAUSE }, + { LedId.Keyboard_Insert, AsusLedId.KEY_INSERT }, + { LedId.Keyboard_Home, AsusLedId.KEY_HOME }, + { LedId.Keyboard_PageUp, AsusLedId.KEY_PRIOR }, + { LedId.Keyboard_Delete, AsusLedId.KEY_DELETE }, + { LedId.Keyboard_End, AsusLedId.KEY_END }, + { LedId.Keyboard_PageDown, AsusLedId.KEY_NEXT }, + { LedId.Keyboard_ArrowUp, AsusLedId.KEY_UP }, + { LedId.Keyboard_ArrowLeft, AsusLedId.KEY_LEFT }, + { LedId.Keyboard_ArrowDown, AsusLedId.KEY_DOWN }, + { LedId.Keyboard_ArrowRight, AsusLedId.KEY_RIGHT }, + { LedId.Keyboard_NumLock, AsusLedId.KEY_NUMLOCK }, + { LedId.Keyboard_NumSlash, AsusLedId.KEY_DIVIDE }, + { LedId.Keyboard_NumAsterisk, AsusLedId.KEY_MULTIPLY }, + { LedId.Keyboard_NumMinus, AsusLedId.KEY_SUBTRACT }, + { LedId.Keyboard_Num7, AsusLedId.KEY_NUMPAD7 }, + { LedId.Keyboard_Num8, AsusLedId.KEY_NUMPAD8 }, + { LedId.Keyboard_Num9, AsusLedId.KEY_NUMPAD9 }, + { LedId.Keyboard_NumPeriodAndDelete, AsusLedId.KEY_DECIMAL }, + { LedId.Keyboard_NumPlus, AsusLedId.KEY_ADD }, + { LedId.Keyboard_Num4, AsusLedId.KEY_NUMPAD4 }, + { LedId.Keyboard_Num5, AsusLedId.KEY_NUMPAD5 }, + { LedId.Keyboard_Num6, AsusLedId.KEY_NUMPAD6 }, + { LedId.Keyboard_Num1, AsusLedId.KEY_NUMPAD1 }, + { LedId.Keyboard_Num2, AsusLedId.KEY_NUMPAD2 }, + { LedId.Keyboard_Num3, AsusLedId.KEY_NUMPAD3 }, + { LedId.Keyboard_Num0, AsusLedId.KEY_NUMPAD0 }, + { LedId.Keyboard_NumEnter, AsusLedId.KEY_NUMPADENTER }, + { LedId.Keyboard_NonUsBackslash, AsusLedId.UNDOCUMENTED_1 }, + { LedId.Keyboard_NonUsTilde, AsusLedId.UNDOCUMENTED_2 }, + { LedId.Keyboard_NumComma, AsusLedId.KEY_NUMPADCOMMA }, + { LedId.Logo, AsusLedId.UNDOCUMENTED_3 }, + { LedId.Keyboard_Function, AsusLedId.KEY_FN }, + { LedId.Keyboard_MediaMute, AsusLedId.KEY_MUTE }, + { LedId.Keyboard_MediaPlay, AsusLedId.KEY_PLAYPAUSE }, + { LedId.Keyboard_MediaStop, AsusLedId.KEY_MEDIASTOP }, + { LedId.Keyboard_MediaVolumeDown, AsusLedId.KEY_VOLUMEDOWN }, + { LedId.Keyboard_MediaVolumeUp, AsusLedId.KEY_VOLUMEUP }, + { LedId.Keyboard_Custom1, AsusLedId.KEY_F13 }, + { LedId.Keyboard_Custom2, AsusLedId.KEY_F14 }, + { LedId.Keyboard_Custom3, AsusLedId.KEY_F15 }, + { LedId.Keyboard_Custom4, AsusLedId.KEY_KANA }, + { LedId.Keyboard_Custom5, AsusLedId.KEY_ABNT_C1 }, + { LedId.Keyboard_Custom6, AsusLedId.KEY_CONVERT }, + { LedId.Keyboard_Custom7, AsusLedId.KEY_NOCONVERT }, + { LedId.Keyboard_Custom8, AsusLedId.KEY_YEN }, + { LedId.Keyboard_Custom9, AsusLedId.KEY_ABNT_C2 }, + { LedId.Keyboard_Custom10, AsusLedId.KEY_NUMPADEQUALS }, + { LedId.Keyboard_Custom11, AsusLedId.KEY_CIRCUMFLEX }, + { LedId.Keyboard_Custom12, AsusLedId.KEY_AT }, + { LedId.Keyboard_Custom13, AsusLedId.KEY_COLON }, + { LedId.Keyboard_Custom14, AsusLedId.KEY_UNDERLINE }, + { LedId.Keyboard_Custom15, AsusLedId.KEY_KANJI }, + { LedId.Keyboard_Custom16, AsusLedId.KEY_STOP }, + { LedId.Keyboard_Custom17, AsusLedId.KEY_AX }, + { LedId.Keyboard_Custom18, AsusLedId.KEY_UNLABELED }, + { LedId.Keyboard_Custom19, AsusLedId.KEY_NEXTTRACK }, + { LedId.Keyboard_Custom20, AsusLedId.KEY_CALCULATOR }, + { LedId.Keyboard_Custom21, AsusLedId.KEY_POWER }, + { LedId.Keyboard_Custom22, AsusLedId.KEY_SLEEP }, + { LedId.Keyboard_Custom23, AsusLedId.KEY_WAKE }, + { LedId.Keyboard_Custom24, AsusLedId.KEY_WEBSEARCH }, + { LedId.Keyboard_Custom25, AsusLedId.KEY_WEBFAVORITES }, + { LedId.Keyboard_Custom26, AsusLedId.KEY_WEBREFRESH }, + { LedId.Keyboard_Custom27, AsusLedId.KEY_WEBSTOP }, + { LedId.Keyboard_Custom28, AsusLedId.KEY_WEBFORWARD }, + { LedId.Keyboard_Custom29, AsusLedId.KEY_WEBHOME }, + { LedId.Keyboard_Custom30, AsusLedId.KEY_WEBBACK }, + { LedId.Keyboard_Custom31, AsusLedId.KEY_MYCOMPUTER }, + { LedId.Keyboard_Custom32, AsusLedId.KEY_MAIL }, + { LedId.Keyboard_Custom33, AsusLedId.KEY_MEDIASELECT }, + { LedId.Keyboard_Custom34, AsusLedId.UNDOCUMENTED_4 }, + { LedId.Keyboard_Custom35, AsusLedId.UNDOCUMENTED_5 }, + { LedId.Keyboard_Custom36, AsusLedId.UNDOCUMENTED_6 } + }; /// /// A LED mapping containing extra lights for the ROG Zephyrus Duo 15 @@ -170,20 +169,19 @@ namespace RGB.NET.Devices.Asus /// /// You may add more of these by further populating . /// - public static readonly LedMapping ROGZephyrusDuo15 = - new() - { - {LedId.Keyboard_Custom50, 39}, // Mapping starts at Custom50 to avoid possible conflicts with KeyboardMapping above - {LedId.Keyboard_Custom51, 40}, - {LedId.Keyboard_Custom52, 55}, - {LedId.Keyboard_Custom53, 57}, - {LedId.Keyboard_Custom54, 97}, - {LedId.Keyboard_Custom55, 99}, - {LedId.Keyboard_Custom56, 118}, - {LedId.Keyboard_Custom57, 120}, - {LedId.Keyboard_Custom58, 130}, - {LedId.Keyboard_Custom59, 131}, - {LedId.Keyboard_Custom60, 133}, - }; + public static LedMapping ROGZephyrusDuo15 { get; } = new() + { + { LedId.Keyboard_Custom50, 39 }, // Mapping starts at Custom50 to avoid possible conflicts with KeyboardMapping above + { LedId.Keyboard_Custom51, 40 }, + { LedId.Keyboard_Custom52, 55 }, + { LedId.Keyboard_Custom53, 57 }, + { LedId.Keyboard_Custom54, 97 }, + { LedId.Keyboard_Custom55, 99 }, + { LedId.Keyboard_Custom56, 118 }, + { LedId.Keyboard_Custom57, 120 }, + { LedId.Keyboard_Custom58, 130 }, + { LedId.Keyboard_Custom59, 131 }, + { LedId.Keyboard_Custom60, 133 }, + }; } } diff --git a/RGB.NET.Devices.Asus/Keyboard/AsusKeyboardRGBDeviceInfo.cs b/RGB.NET.Devices.Asus/Keyboard/AsusKeyboardRGBDeviceInfo.cs index 0301934..f5074e6 100644 --- a/RGB.NET.Devices.Asus/Keyboard/AsusKeyboardRGBDeviceInfo.cs +++ b/RGB.NET.Devices.Asus/Keyboard/AsusKeyboardRGBDeviceInfo.cs @@ -15,7 +15,7 @@ namespace RGB.NET.Devices.Asus /// The ASUS SDK returns useless names for notebook keyboards, possibly for others as well. /// Keep a list of those and rely on to get the real model /// - private static List GenericDeviceNames = new() {"NotebookKeyboard"}; + private static readonly List GENERIC_DEVICE_NAMES = new() { "NotebookKeyboard" }; /// public KeyboardLayoutType Layout => KeyboardLayoutType.Unknown; @@ -37,10 +37,7 @@ namespace RGB.NET.Devices.Asus #region Methods - private static string? GetKeyboardModel(string deviceName) - { - return GenericDeviceNames.Contains(deviceName) ? WMIHelper.GetSystemModelInfo() : deviceName; - } + private static string? GetKeyboardModel(string deviceName) => GENERIC_DEVICE_NAMES.Contains(deviceName) ? WMIHelper.GetSystemModelInfo() : deviceName; #endregion } diff --git a/RGB.NET.Devices.CoolerMaster/Generic/CoolerMasterRGBDeviceInfo.cs b/RGB.NET.Devices.CoolerMaster/Generic/CoolerMasterRGBDeviceInfo.cs index 4e868b4..3efe8eb 100644 --- a/RGB.NET.Devices.CoolerMaster/Generic/CoolerMasterRGBDeviceInfo.cs +++ b/RGB.NET.Devices.CoolerMaster/Generic/CoolerMasterRGBDeviceInfo.cs @@ -44,7 +44,7 @@ namespace RGB.NET.Devices.CoolerMaster this.DeviceType = deviceType; this.DeviceIndex = deviceIndex; - Model = deviceIndex.GetDescription() ?? "Unknown"; + Model = deviceIndex.GetDescription(); DeviceName = DeviceHelper.CreateDeviceName(Manufacturer, Model); } diff --git a/RGB.NET.Devices.CoolerMaster/Generic/CoolerMasterUpdateQueue.cs b/RGB.NET.Devices.CoolerMaster/Generic/CoolerMasterUpdateQueue.cs index 42c96fe..7851bd3 100644 --- a/RGB.NET.Devices.CoolerMaster/Generic/CoolerMasterUpdateQueue.cs +++ b/RGB.NET.Devices.CoolerMaster/Generic/CoolerMasterUpdateQueue.cs @@ -12,7 +12,7 @@ namespace RGB.NET.Devices.CoolerMaster { #region Properties & Fields - private CoolerMasterDevicesIndexes _deviceIndex; + private readonly CoolerMasterDevicesIndexes _deviceIndex; private readonly _CoolerMasterColorMatrix _deviceMatrix; #endregion @@ -29,8 +29,7 @@ namespace RGB.NET.Devices.CoolerMaster { this._deviceIndex = deviceIndex; - _deviceMatrix = new _CoolerMasterColorMatrix(); - _deviceMatrix.KeyColor = new _CoolerMasterKeyColor[_CoolerMasterColorMatrix.ROWS, _CoolerMasterColorMatrix.COLUMNS]; + _deviceMatrix = new _CoolerMasterColorMatrix { KeyColor = new _CoolerMasterKeyColor[_CoolerMasterColorMatrix.ROWS, _CoolerMasterColorMatrix.COLUMNS] }; } #endregion diff --git a/RGB.NET.Devices.CoolerMaster/Helper/EnumExtension.cs b/RGB.NET.Devices.CoolerMaster/Helper/EnumExtension.cs index 9cd05ce..63e9479 100644 --- a/RGB.NET.Devices.CoolerMaster/Helper/EnumExtension.cs +++ b/RGB.NET.Devices.CoolerMaster/Helper/EnumExtension.cs @@ -15,7 +15,7 @@ namespace RGB.NET.Devices.CoolerMaster.Helper /// /// The enum value to get the description from. /// The value of the or the result of the source. - internal static string? GetDescription(this Enum source) + internal static string GetDescription(this Enum source) => source.GetAttribute()?.Description ?? source.ToString(); /// diff --git a/RGB.NET.Devices.CoolerMaster/Mouse/CoolerMasterMouseRGBDevice.cs b/RGB.NET.Devices.CoolerMaster/Mouse/CoolerMasterMouseRGBDevice.cs index aa4c3aa..f67d587 100644 --- a/RGB.NET.Devices.CoolerMaster/Mouse/CoolerMasterMouseRGBDevice.cs +++ b/RGB.NET.Devices.CoolerMaster/Mouse/CoolerMasterMouseRGBDevice.cs @@ -18,7 +18,9 @@ namespace RGB.NET.Devices.CoolerMaster /// The specific information provided by CoolerMaster for the mouse internal CoolerMasterMouseRGBDevice(CoolerMasterMouseRGBDeviceInfo info, IDeviceUpdateTrigger updateTrigger) : base(info, updateTrigger) - { } + { + InitializeLayout(); + } #endregion diff --git a/RGB.NET.Devices.CoolerMaster/Native/_CoolerMasterSDK.cs b/RGB.NET.Devices.CoolerMaster/Native/_CoolerMasterSDK.cs index 28f5776..bb05b71 100644 --- a/RGB.NET.Devices.CoolerMaster/Native/_CoolerMasterSDK.cs +++ b/RGB.NET.Devices.CoolerMaster/Native/_CoolerMasterSDK.cs @@ -1,4 +1,5 @@ -// ReSharper disable UnusedMethodReturnValue.Global +#pragma warning disable IDE1006 // Naming Styles +// ReSharper disable UnusedMethodReturnValue.Global // ReSharper disable UnusedMember.Global using System; @@ -53,13 +54,10 @@ namespace RGB.NET.Devices.CoolerMaster.Native _setAllLedColorPointer = (SetAllLedColorPointer)Marshal.GetDelegateForFunctionPointer(GetProcAddress(_dllHandle, "SetAllLedColor"), typeof(SetAllLedColorPointer)); } - [DllImport("kernel32.dll")] + [DllImport("kernel32.dll", CharSet = CharSet.Unicode)] private static extern IntPtr LoadLibrary(string dllToLoad); - - [DllImport("kernel32.dll")] - private static extern bool FreeLibrary(IntPtr dllHandle); - - [DllImport("kernel32.dll")] + + [DllImport("kernel32.dll", CharSet = CharSet.Unicode)] private static extern IntPtr GetProcAddress(IntPtr dllHandle, string name); #endregion diff --git a/RGB.NET.Devices.Corsair/CorsairDeviceProvider.cs b/RGB.NET.Devices.Corsair/CorsairDeviceProvider.cs index 8884945..33fcd75 100644 --- a/RGB.NET.Devices.Corsair/CorsairDeviceProvider.cs +++ b/RGB.NET.Devices.Corsair/CorsairDeviceProvider.cs @@ -80,7 +80,7 @@ namespace RGB.NET.Devices.Corsair // DarthAffe 02.02.2021: 127 is iCUE if (!_CUESDK.CorsairSetLayerPriority(128)) - Throw(new CUEException(LastError), false); + Throw(new CUEException(LastError)); } /// diff --git a/RGB.NET.Devices.Corsair/Native/_CUESDK.cs b/RGB.NET.Devices.Corsair/Native/_CUESDK.cs index b10feb0..05483a5 100644 --- a/RGB.NET.Devices.Corsair/Native/_CUESDK.cs +++ b/RGB.NET.Devices.Corsair/Native/_CUESDK.cs @@ -1,4 +1,5 @@ -// ReSharper disable UnusedMethodReturnValue.Global +#pragma warning disable IDE1006 // Naming Styles +// ReSharper disable UnusedMethodReturnValue.Global // ReSharper disable UnusedMember.Global using System; @@ -61,13 +62,13 @@ namespace RGB.NET.Devices.Corsair.Native _dllHandle = IntPtr.Zero; } - [DllImport("kernel32.dll")] + [DllImport("kernel32.dll", CharSet = CharSet.Unicode)] private static extern IntPtr LoadLibrary(string dllToLoad); [DllImport("kernel32.dll")] private static extern bool FreeLibrary(IntPtr dllHandle); - [DllImport("kernel32.dll")] + [DllImport("kernel32.dll", CharSet = CharSet.Unicode)] private static extern IntPtr GetProcAddress(IntPtr dllHandle, string name); #endregion diff --git a/RGB.NET.Devices.Corsair/Native/_CorsairLedColor.cs b/RGB.NET.Devices.Corsair/Native/_CorsairLedColor.cs index 349b6c1..429e7c0 100644 --- a/RGB.NET.Devices.Corsair/Native/_CorsairLedColor.cs +++ b/RGB.NET.Devices.Corsair/Native/_CorsairLedColor.cs @@ -1,6 +1,8 @@ #pragma warning disable 169 // Field 'x' is never used #pragma warning disable 414 // Field 'x' is assigned but its value never used #pragma warning disable 649 // Field 'x' is never assigned +#pragma warning disable IDE1006 // Naming Styles +// ReSharper disable NotAccessedField.Global using System.Runtime.InteropServices; diff --git a/RGB.NET.Devices.DMX/E131/E131UpdateQueue.cs b/RGB.NET.Devices.DMX/E131/E131UpdateQueue.cs index e7a3f96..c99e7c4 100644 --- a/RGB.NET.Devices.DMX/E131/E131UpdateQueue.cs +++ b/RGB.NET.Devices.DMX/E131/E131UpdateQueue.cs @@ -15,7 +15,7 @@ namespace RGB.NET.Devices.DMX.E131 /// /// The UDP-Connection used to send data. /// - private UdpClient _socket; + private readonly UdpClient _socket; /// /// Gets the byte-representation of a E1.31 packet as described in http://tsp.esta.org/tsp/documents/docs/E1-31-2016.pdf. @@ -26,7 +26,7 @@ namespace RGB.NET.Devices.DMX.E131 /// /// The sequence-number used to detect the order in which packages where sent. /// - private byte _sequenceNumber = 0; + private byte _sequenceNumber; #endregion diff --git a/RGB.NET.Devices.Logitech/Enum/LogitechLedId.cs b/RGB.NET.Devices.Logitech/Enum/LogitechLedId.cs index b879ab4..799ab70 100644 --- a/RGB.NET.Devices.Logitech/Enum/LogitechLedId.cs +++ b/RGB.NET.Devices.Logitech/Enum/LogitechLedId.cs @@ -1,4 +1,4 @@ -#pragma warning disable 1591 // Missing XML comment for publicly visible type or member +// ReSharper disable InconsistentNaming namespace RGB.NET.Devices.Logitech { diff --git a/RGB.NET.Devices.Logitech/LogitechDeviceProvider.cs b/RGB.NET.Devices.Logitech/LogitechDeviceProvider.cs index 0fc08e8..661dd83 100644 --- a/RGB.NET.Devices.Logitech/LogitechDeviceProvider.cs +++ b/RGB.NET.Devices.Logitech/LogitechDeviceProvider.cs @@ -140,10 +140,10 @@ namespace RGB.NET.Devices.Logitech //TODO DarthAffe 04.03.2021: Rework device selection and configuration for HID-based providers protected override IEnumerable LoadDevices() { - IEnumerable<(HIDDeviceDefinition definition, HidDevice device)> perKeyDevices = PerKeyDeviceDefinitions.GetConnectedDevices(); - if ((_perKeyUpdateQueue != null) && perKeyDevices.Any()) + (HIDDeviceDefinition definition, HidDevice device) perKeyDevice = PerKeyDeviceDefinitions.GetConnectedDevices().FirstOrDefault(); + if ((_perKeyUpdateQueue != null) && (perKeyDevice != default)) { - (HIDDeviceDefinition definition, _) = perKeyDevices.First(); + (HIDDeviceDefinition definition, _) = perKeyDevice; yield return new LogitechPerKeyRGBDevice(new LogitechRGBDeviceInfo(definition.DeviceType, definition.Name, LogitechDeviceCaps.PerKeyRGB, 0), _perKeyUpdateQueue, definition.LedMapping); } @@ -154,10 +154,10 @@ namespace RGB.NET.Devices.Logitech yield return new LogitechZoneRGBDevice(new LogitechRGBDeviceInfo(definition.DeviceType, definition.Name, LogitechDeviceCaps.DeviceRGB, definition.CustomData.zones), updateQueue, definition.LedMapping); } - IEnumerable<(HIDDeviceDefinition definition, HidDevice device)> perDeviceDevices = PerDeviceDeviceDefinitions.GetConnectedDevices(); - if ((_perDeviceUpdateQueue != null) && perDeviceDevices.Any()) + (HIDDeviceDefinition definition, HidDevice device) perDeviceDevice = PerDeviceDeviceDefinitions.GetConnectedDevices().FirstOrDefault(); + if ((_perDeviceUpdateQueue != null) && (perDeviceDevice != default)) { - (HIDDeviceDefinition definition, _) = perDeviceDevices.First(); + (HIDDeviceDefinition definition, _) = perDeviceDevice; yield return new LogitechPerDeviceRGBDevice(new LogitechRGBDeviceInfo(definition.DeviceType, definition.Name, LogitechDeviceCaps.DeviceRGB, 0), _perDeviceUpdateQueue, definition.LedMapping); } } @@ -172,6 +172,8 @@ namespace RGB.NET.Devices.Logitech try { _LogitechGSDK.UnloadLogitechGSDK(); } catch { /* at least we tried */ } + + GC.SuppressFinalize(this); } #endregion diff --git a/RGB.NET.Devices.Logitech/Native/_LogitechGSDK.cs b/RGB.NET.Devices.Logitech/Native/_LogitechGSDK.cs index ebec0c7..1f34dab 100644 --- a/RGB.NET.Devices.Logitech/Native/_LogitechGSDK.cs +++ b/RGB.NET.Devices.Logitech/Native/_LogitechGSDK.cs @@ -1,4 +1,5 @@ -// ReSharper disable UnusedMethodReturnValue.Global +#pragma warning disable IDE1006 // Naming Styles +// ReSharper disable UnusedMethodReturnValue.Global // ReSharper disable UnusedMember.Global // ReSharper disable MemberCanBePrivate.Global @@ -62,13 +63,13 @@ namespace RGB.NET.Devices.Logitech.Native _dllHandle = IntPtr.Zero; } - [DllImport("kernel32.dll")] + [DllImport("kernel32.dll", CharSet = CharSet.Unicode)] private static extern IntPtr LoadLibrary(string dllToLoad); [DllImport("kernel32.dll")] private static extern bool FreeLibrary(IntPtr dllHandle); - [DllImport("kernel32.dll")] + [DllImport("kernel32.dll", CharSet = CharSet.Unicode)] private static extern IntPtr GetProcAddress(IntPtr dllHandle, string name); #endregion diff --git a/RGB.NET.Devices.Logitech/Zone/LogitechZoneRGBDevice.cs b/RGB.NET.Devices.Logitech/Zone/LogitechZoneRGBDevice.cs index c4c18b3..2563a2b 100644 --- a/RGB.NET.Devices.Logitech/Zone/LogitechZoneRGBDevice.cs +++ b/RGB.NET.Devices.Logitech/Zone/LogitechZoneRGBDevice.cs @@ -40,7 +40,7 @@ namespace RGB.NET.Devices.Logitech } /// - protected override object? GetLedCustomData(LedId ledId) => _ledMapping[ledId]; + protected override object GetLedCustomData(LedId ledId) => _ledMapping[ledId]; /// protected override void UpdateLeds(IEnumerable ledsToUpdate) => UpdateQueue.SetData(GetUpdateData(ledsToUpdate)); diff --git a/RGB.NET.Devices.Msi/Native/_MsiSDK.cs b/RGB.NET.Devices.Msi/Native/_MsiSDK.cs index e5c0700..faa9dfe 100644 --- a/RGB.NET.Devices.Msi/Native/_MsiSDK.cs +++ b/RGB.NET.Devices.Msi/Native/_MsiSDK.cs @@ -1,4 +1,5 @@ -// ReSharper disable UnusedMethodReturnValue.Global +#pragma warning disable IDE1006 // Naming Styles +// ReSharper disable UnusedMethodReturnValue.Global // ReSharper disable UnusedMember.Global using System; @@ -65,16 +66,16 @@ namespace RGB.NET.Devices.Msi.Native _dllHandle = IntPtr.Zero; } - [DllImport("kernel32.dll")] + [DllImport("kernel32.dll", CharSet = CharSet.Unicode)] private static extern bool SetDllDirectory(string lpPathName); - [DllImport("kernel32.dll")] + [DllImport("kernel32.dll", CharSet = CharSet.Unicode)] private static extern IntPtr LoadLibrary(string dllToLoad); [DllImport("kernel32.dll")] private static extern bool FreeLibrary(IntPtr dllHandle); - [DllImport("kernel32.dll")] + [DllImport("kernel32.dll", CharSet = CharSet.Unicode)] private static extern IntPtr GetProcAddress(IntPtr dllHandle, string name); #endregion diff --git a/RGB.NET.Devices.Novation/Generic/LimitedColorUpdateQueue.cs b/RGB.NET.Devices.Novation/Generic/LimitedColorUpdateQueue.cs index 959e360..c468ccd 100644 --- a/RGB.NET.Devices.Novation/Generic/LimitedColorUpdateQueue.cs +++ b/RGB.NET.Devices.Novation/Generic/LimitedColorUpdateQueue.cs @@ -41,16 +41,13 @@ namespace RGB.NET.Devices.Novation { (double hue, double _, double value) = color.GetHSV(); - if ((hue >= 330) || (hue < 30)) - return (int)Math.Ceiling(value * 3); // red with brightness 1, 2 or 3 - - if ((hue >= 30) && (hue < 90)) // yellow with brightness 17, 34 or 51 - return (int)Math.Ceiling(value * 3) * 17; - - if ((hue >= 90) && (hue < 150)) // green with brightness 16, 32 or 48 - return (int)Math.Ceiling(value * 3) * 16; - - return 0; + return hue switch + { + >= 330 or < 30 => (int)Math.Ceiling(value * 3), // red with brightness 1, 2 or 3 + >= 30 and < 90 => (int)Math.Ceiling(value * 3) * 17, // yellow with brightness 17, 34 or 51 + >= 90 and < 150 => (int)Math.Ceiling(value * 3) * 16, // green with brightness 16, 32 or 48 + _ => 0 + }; } /// diff --git a/RGB.NET.Devices.Novation/Generic/MidiUpdateQueue.cs b/RGB.NET.Devices.Novation/Generic/MidiUpdateQueue.cs index f29241b..9c39612 100644 --- a/RGB.NET.Devices.Novation/Generic/MidiUpdateQueue.cs +++ b/RGB.NET.Devices.Novation/Generic/MidiUpdateQueue.cs @@ -5,11 +5,10 @@ using Sanford.Multimedia.Midi; namespace RGB.NET.Devices.Novation { /// - /// /// /// Represents the update-queue performing updates for midi devices. /// - public abstract class MidiUpdateQueue : UpdateQueue, IDisposable + public abstract class MidiUpdateQueue : UpdateQueue { #region Properties & Fields @@ -66,6 +65,8 @@ namespace RGB.NET.Devices.Novation base.Dispose(); _outputDevice.Dispose(); + + GC.SuppressFinalize(this); } #endregion diff --git a/RGB.NET.Devices.Novation/Launchpad/NovationLaunchpadRGBDevice.cs b/RGB.NET.Devices.Novation/Launchpad/NovationLaunchpadRGBDevice.cs index 6be8738..1b9f073 100644 --- a/RGB.NET.Devices.Novation/Launchpad/NovationLaunchpadRGBDevice.cs +++ b/RGB.NET.Devices.Novation/Launchpad/NovationLaunchpadRGBDevice.cs @@ -40,7 +40,9 @@ namespace RGB.NET.Devices.Novation } /// + // ReSharper disable RedundantCast protected override object GetLedCustomData(LedId ledId) => GetDeviceMapping().TryGetValue(ledId, out (byte mode, byte id, int _, int __) data) ? (data.mode, data.id) : ((byte)0x00, (byte)0x00); + // ReSharper restore RedundantCast protected virtual Dictionary GetDeviceMapping() => DeviceInfo.LedIdMapping switch diff --git a/RGB.NET.Devices.PicoPi/Enum/UpdateMode.cs b/RGB.NET.Devices.PicoPi/Enum/UpdateMode.cs index 6be450c..99b0ff0 100644 --- a/RGB.NET.Devices.PicoPi/Enum/UpdateMode.cs +++ b/RGB.NET.Devices.PicoPi/Enum/UpdateMode.cs @@ -1,4 +1,6 @@ -namespace RGB.NET.Devices.PicoPi.Enum +// ReSharper disable InconsistentNaming + +namespace RGB.NET.Devices.PicoPi.Enum { public enum UpdateMode { diff --git a/RGB.NET.Devices.PicoPi/PicoPi/PicoPiSDK.cs b/RGB.NET.Devices.PicoPi/PicoPi/PicoPiSDK.cs index 8c61776..f3a8248 100644 --- a/RGB.NET.Devices.PicoPi/PicoPi/PicoPiSDK.cs +++ b/RGB.NET.Devices.PicoPi/PicoPi/PicoPiSDK.cs @@ -38,7 +38,7 @@ namespace RGB.NET.Devices.PicoPi private readonly byte[] _hidSendBuffer; private readonly byte[] _bulkSendBuffer; - private int _bulkTransferLength = 0; + private int _bulkTransferLength; public bool IsBulkSupported { get; private set; } @@ -181,7 +181,7 @@ namespace RGB.NET.Devices.PicoPi { if ((data.Length == 0) || !IsBulkSupported) return; - Span sendBuffer = new Span(_bulkSendBuffer).Slice(2); + Span sendBuffer = new Span(_bulkSendBuffer)[2..]; int payloadSize = data.Length; sendBuffer[_bulkTransferLength++] = (byte)((channel << 4) | COMMAND_UPDATE_BULK); @@ -212,6 +212,8 @@ namespace RGB.NET.Devices.PicoPi _hidStream.Dispose(); _bulkDevice?.Dispose(); _usbContext?.Dispose(); + + GC.SuppressFinalize(this); } #endregion diff --git a/RGB.NET.Devices.Razer/Enum/RazerError.cs b/RGB.NET.Devices.Razer/Enum/RazerError.cs index 3400792..4ee6a39 100644 --- a/RGB.NET.Devices.Razer/Enum/RazerError.cs +++ b/RGB.NET.Devices.Razer/Enum/RazerError.cs @@ -3,7 +3,7 @@ /// /// Razer-SDK: Error codes for Chroma SDK. If the error is not defined here, refer to WinError.h from the Windows SDK. /// - public enum RazerError : int + public enum RazerError { /// /// Razer-SDK: Invalid. diff --git a/RGB.NET.Devices.Razer/Generic/LedMappings.cs b/RGB.NET.Devices.Razer/Generic/LedMappings.cs index a71e91f..d136b54 100644 --- a/RGB.NET.Devices.Razer/Generic/LedMappings.cs +++ b/RGB.NET.Devices.Razer/Generic/LedMappings.cs @@ -5,7 +5,7 @@ namespace RGB.NET.Devices.Razer { public static class LedMappings { - public static readonly LedMapping Keyboard = new() + public static LedMapping Keyboard { get; } = new() { //Row 0 is empty @@ -154,7 +154,7 @@ namespace RGB.NET.Devices.Razer //Row 7 is also empty }; - public static readonly LedMapping LaptopKeyboard = new() + public static LedMapping LaptopKeyboard { get; } = new() { //Row 0 is empty @@ -272,7 +272,7 @@ namespace RGB.NET.Devices.Razer //Row 7 is also empty }; - public static readonly LedMapping Mouse = new() + public static LedMapping Mouse { get; } = new() { //row 0 empty @@ -316,12 +316,12 @@ namespace RGB.NET.Devices.Razer }; //TODO DarthAffe 27.04.2021: Are mappings for these possible? - public static readonly LedMapping Mousepad = new(); + public static LedMapping Mousepad { get; } = new(); - public static readonly LedMapping Headset = new(); + public static LedMapping Headset { get; } = new(); - public static readonly LedMapping Keypad = new(); + public static LedMapping Keypad { get; } = new(); - public static readonly LedMapping ChromaLink = new(); + public static LedMapping ChromaLink { get; } = new(); } } diff --git a/RGB.NET.Devices.Razer/Generic/RazerRGBDevice.cs b/RGB.NET.Devices.Razer/Generic/RazerRGBDevice.cs index 7b516dd..6a7208c 100644 --- a/RGB.NET.Devices.Razer/Generic/RazerRGBDevice.cs +++ b/RGB.NET.Devices.Razer/Generic/RazerRGBDevice.cs @@ -1,4 +1,5 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; using RGB.NET.Core; namespace RGB.NET.Devices.Razer @@ -32,10 +33,12 @@ namespace RGB.NET.Devices.Razer /// public override void Dispose() { - try { UpdateQueue?.Dispose(); } + try { UpdateQueue.Dispose(); } catch { /* at least we tried */ } base.Dispose(); + + GC.SuppressFinalize(this); } #endregion diff --git a/RGB.NET.Devices.Razer/Keyboard/RazerKeyboardRGBDevice.cs b/RGB.NET.Devices.Razer/Keyboard/RazerKeyboardRGBDevice.cs index b15a948..2d17914 100644 --- a/RGB.NET.Devices.Razer/Keyboard/RazerKeyboardRGBDevice.cs +++ b/RGB.NET.Devices.Razer/Keyboard/RazerKeyboardRGBDevice.cs @@ -48,7 +48,7 @@ namespace RGB.NET.Devices.Razer } /// - protected override object? GetLedCustomData(LedId ledId) => _ledMapping[ledId]; + protected override object GetLedCustomData(LedId ledId) => _ledMapping[ledId]; #endregion } diff --git a/RGB.NET.Devices.Razer/Mouse/RazerMouseRGBDevice.cs b/RGB.NET.Devices.Razer/Mouse/RazerMouseRGBDevice.cs index 6513b40..eec4dab 100644 --- a/RGB.NET.Devices.Razer/Mouse/RazerMouseRGBDevice.cs +++ b/RGB.NET.Devices.Razer/Mouse/RazerMouseRGBDevice.cs @@ -46,7 +46,7 @@ namespace RGB.NET.Devices.Razer } /// - protected override object? GetLedCustomData(LedId ledId) => _ledMapping[ledId]; + protected override object GetLedCustomData(LedId ledId) => _ledMapping[ledId]; #endregion } diff --git a/RGB.NET.Devices.Razer/Native/_ChromaLinkCustomEffect.cs b/RGB.NET.Devices.Razer/Native/_ChromaLinkCustomEffect.cs index 267dbe0..e1e77d0 100644 --- a/RGB.NET.Devices.Razer/Native/_ChromaLinkCustomEffect.cs +++ b/RGB.NET.Devices.Razer/Native/_ChromaLinkCustomEffect.cs @@ -1,4 +1,7 @@ -using System.Runtime.InteropServices; +#pragma warning disable IDE1006 // Naming Styles +// ReSharper disable InconsistentNaming + +using System.Runtime.InteropServices; namespace RGB.NET.Devices.Razer.Native { diff --git a/RGB.NET.Devices.Razer/Native/_Defines.cs b/RGB.NET.Devices.Razer/Native/_Defines.cs index 9db44a2..835c2b4 100644 --- a/RGB.NET.Devices.Razer/Native/_Defines.cs +++ b/RGB.NET.Devices.Razer/Native/_Defines.cs @@ -1,4 +1,7 @@ -namespace RGB.NET.Devices.Razer.Native +#pragma warning disable IDE1006 // Naming Styles +// ReSharper disable InconsistentNaming + +namespace RGB.NET.Devices.Razer.Native { internal static class _Defines { diff --git a/RGB.NET.Devices.Razer/Native/_HeadsetCustomEffect.cs b/RGB.NET.Devices.Razer/Native/_HeadsetCustomEffect.cs index d3bcdb3..911198f 100644 --- a/RGB.NET.Devices.Razer/Native/_HeadsetCustomEffect.cs +++ b/RGB.NET.Devices.Razer/Native/_HeadsetCustomEffect.cs @@ -1,4 +1,7 @@ -using System.Runtime.InteropServices; +#pragma warning disable IDE1006 // Naming Styles +// ReSharper disable InconsistentNaming + +using System.Runtime.InteropServices; namespace RGB.NET.Devices.Razer.Native { diff --git a/RGB.NET.Devices.Razer/Native/_KeyboardCustomEffect.cs b/RGB.NET.Devices.Razer/Native/_KeyboardCustomEffect.cs index 0cef396..0515865 100644 --- a/RGB.NET.Devices.Razer/Native/_KeyboardCustomEffect.cs +++ b/RGB.NET.Devices.Razer/Native/_KeyboardCustomEffect.cs @@ -1,4 +1,7 @@ -using System.Runtime.InteropServices; +#pragma warning disable IDE1006 // Naming Styles +// ReSharper disable InconsistentNaming + +using System.Runtime.InteropServices; namespace RGB.NET.Devices.Razer.Native { diff --git a/RGB.NET.Devices.Razer/Native/_KeypadCustomEffect.cs b/RGB.NET.Devices.Razer/Native/_KeypadCustomEffect.cs index a08a175..657d6ca 100644 --- a/RGB.NET.Devices.Razer/Native/_KeypadCustomEffect.cs +++ b/RGB.NET.Devices.Razer/Native/_KeypadCustomEffect.cs @@ -1,4 +1,7 @@ -using System.Runtime.InteropServices; +#pragma warning disable IDE1006 // Naming Styles +// ReSharper disable InconsistentNaming + +using System.Runtime.InteropServices; namespace RGB.NET.Devices.Razer.Native { diff --git a/RGB.NET.Devices.Razer/Native/_MouseCustomEffect.cs b/RGB.NET.Devices.Razer/Native/_MouseCustomEffect.cs index a5e1599..488cc53 100644 --- a/RGB.NET.Devices.Razer/Native/_MouseCustomEffect.cs +++ b/RGB.NET.Devices.Razer/Native/_MouseCustomEffect.cs @@ -1,4 +1,7 @@ -using System.Runtime.InteropServices; +#pragma warning disable IDE1006 // Naming Styles +// ReSharper disable InconsistentNaming + +using System.Runtime.InteropServices; namespace RGB.NET.Devices.Razer.Native { diff --git a/RGB.NET.Devices.Razer/Native/_MousepadCustomEffect.cs b/RGB.NET.Devices.Razer/Native/_MousepadCustomEffect.cs index 01368bf..24ee8c1 100644 --- a/RGB.NET.Devices.Razer/Native/_MousepadCustomEffect.cs +++ b/RGB.NET.Devices.Razer/Native/_MousepadCustomEffect.cs @@ -1,4 +1,7 @@ -using System.Runtime.InteropServices; +#pragma warning disable IDE1006 // Naming Styles +// ReSharper disable InconsistentNaming + +using System.Runtime.InteropServices; namespace RGB.NET.Devices.Razer.Native { diff --git a/RGB.NET.Devices.Razer/Native/_RazerSDK.cs b/RGB.NET.Devices.Razer/Native/_RazerSDK.cs index 47d9b18..cd377e1 100644 --- a/RGB.NET.Devices.Razer/Native/_RazerSDK.cs +++ b/RGB.NET.Devices.Razer/Native/_RazerSDK.cs @@ -1,4 +1,5 @@ -// ReSharper disable UnusedMethodReturnValue.Global +#pragma warning disable IDE1006 // Naming Styles +// ReSharper disable UnusedMethodReturnValue.Global // ReSharper disable UnusedMember.Global using System; @@ -61,13 +62,13 @@ namespace RGB.NET.Devices.Razer.Native _dllHandle = IntPtr.Zero; } - [DllImport("kernel32.dll")] + [DllImport("kernel32.dll", CharSet = CharSet.Unicode)] private static extern IntPtr LoadLibrary(string dllToLoad); [DllImport("kernel32.dll")] private static extern bool FreeLibrary(IntPtr dllHandle); - [DllImport("kernel32.dll")] + [DllImport("kernel32.dll", CharSet = CharSet.Unicode)] private static extern IntPtr GetProcAddress(IntPtr dllHandle, string name); #endregion diff --git a/RGB.NET.Devices.SteelSeries/API/Model/Event.cs b/RGB.NET.Devices.SteelSeries/API/Model/Event.cs index 0a7935c..13894be 100644 --- a/RGB.NET.Devices.SteelSeries/API/Model/Event.cs +++ b/RGB.NET.Devices.SteelSeries/API/Model/Event.cs @@ -13,6 +13,7 @@ namespace RGB.NET.Devices.SteelSeries.API.Model [JsonPropertyName("event")] public string? Name { get; set; } + // ReSharper disable once CollectionNeverQueried.Global [JsonPropertyName("data")] public Dictionary Data { get; } = new(); diff --git a/RGB.NET.Devices.SteelSeries/API/SteelSeriesSDK.cs b/RGB.NET.Devices.SteelSeries/API/SteelSeriesSDK.cs index 4d36107..49d5b6b 100644 --- a/RGB.NET.Devices.SteelSeries/API/SteelSeriesSDK.cs +++ b/RGB.NET.Devices.SteelSeries/API/SteelSeriesSDK.cs @@ -114,6 +114,9 @@ namespace RGB.NET.Devices.SteelSeries.API _client.Dispose(); } +#pragma warning disable IDE0051 // Remove unused private members + // ReSharper disable UnusedMethodReturnValue.Local + // ReSharper disable UnusedMember.Local private static string TriggerEvent(Event e) => PostJson("/game_event", e); private static string RegisterGoLispHandler(GoLispHandler handler) => PostJson("/load_golisp_handlers", handler); private static string RegisterEvent(Event e) => PostJson("/register_game_event", e); @@ -122,6 +125,9 @@ namespace RGB.NET.Devices.SteelSeries.API private static string UnregisterGame(Game game) => PostJson("/remove_game", game); private static string StopGame(Game game) => PostJson("/stop_game", game); private static string SendHeartbeat(Game game) => PostJson("/game_heartbeat", game); + // ReSharper restore UnusedMember.Local + // ReSharper restore UnusedMethodReturnValue.Local +#pragma warning restore IDE0051 // Remove unused private members private static string PostJson(string urlSuffix, object o) { diff --git a/RGB.NET.Devices.SteelSeries/Enum/SteelSeriesLedId.cs b/RGB.NET.Devices.SteelSeries/Enum/SteelSeriesLedId.cs index 4c3baa1..29a4035 100644 --- a/RGB.NET.Devices.SteelSeries/Enum/SteelSeriesLedId.cs +++ b/RGB.NET.Devices.SteelSeries/Enum/SteelSeriesLedId.cs @@ -1,4 +1,6 @@ -namespace RGB.NET.Devices.SteelSeries +// ReSharper disable InconsistentNaming + +namespace RGB.NET.Devices.SteelSeries { public enum SteelSeriesLedId { diff --git a/RGB.NET.Devices.Wooting/Enum/WootingDeviceType.cs b/RGB.NET.Devices.Wooting/Enum/WootingDeviceType.cs index 86f79cf..473ff2e 100644 --- a/RGB.NET.Devices.Wooting/Enum/WootingDeviceType.cs +++ b/RGB.NET.Devices.Wooting/Enum/WootingDeviceType.cs @@ -1,4 +1,6 @@ -namespace RGB.NET.Devices.Wooting.Enum +// ReSharper disable InconsistentNaming + +namespace RGB.NET.Devices.Wooting.Enum { public enum WootingDeviceType { diff --git a/RGB.NET.Devices.Wooting/Native/_WootingDeviceInfo.cs b/RGB.NET.Devices.Wooting/Native/_WootingDeviceInfo.cs index d22a518..b1a7d51 100644 --- a/RGB.NET.Devices.Wooting/Native/_WootingDeviceInfo.cs +++ b/RGB.NET.Devices.Wooting/Native/_WootingDeviceInfo.cs @@ -1,4 +1,7 @@ -using System.Runtime.InteropServices; +#pragma warning disable IDE1006 // Naming Styles +// ReSharper disable InconsistentNaming + +using System.Runtime.InteropServices; using RGB.NET.Devices.Wooting.Enum; namespace RGB.NET.Devices.Wooting.Native diff --git a/RGB.NET.Layout/DeviceLayout.cs b/RGB.NET.Layout/DeviceLayout.cs index dbcaa88..77049e9 100644 --- a/RGB.NET.Layout/DeviceLayout.cs +++ b/RGB.NET.Layout/DeviceLayout.cs @@ -149,8 +149,6 @@ namespace RGB.NET.Layout XmlNode? node = (customData as XmlNode) ?? (customData as IEnumerable)?.FirstOrDefault()?.ParentNode; //HACK DarthAffe 16.01.2021: This gives us the CustomData-Node if ((node == null) || (type == null)) return null; - if (type == null) return null; - using MemoryStream ms = new(); using StreamWriter writer = new(ms); diff --git a/RGB.NET.Presets/Textures/Gradients/IGradient.cs b/RGB.NET.Presets/Textures/Gradients/IGradient.cs index 1917256..21c5d07 100644 --- a/RGB.NET.Presets/Textures/Gradients/IGradient.cs +++ b/RGB.NET.Presets/Textures/Gradients/IGradient.cs @@ -1,4 +1,6 @@ -using System; +// ReSharper disable EventNeverSubscribedTo.Global + +using System; using RGB.NET.Core; using RGB.NET.Presets.Decorators; diff --git a/RGB.NET.sln.DotSettings b/RGB.NET.sln.DotSettings index de2906a..f0e61dd 100644 --- a/RGB.NET.sln.DotSettings +++ b/RGB.NET.sln.DotSettings @@ -258,13 +258,16 @@ False False False + 131DMX AFBG API ARGB + BGR BWZ CID CM CMSDK + CUE CUESDK DB DG @@ -273,6 +276,7 @@ EK FM GEZ + GSDK HID HS HSV @@ -284,6 +288,7 @@ PDF PLZ RGB + ROG SAP SDK SQL