mirror of
https://github.com/DarthAffe/RGB.NET.git
synced 2026-11-10 20:46:24 +00:00
Refactoring
This commit is contained in:
1 parent
a0a1521658
commit
6a4ebb3d2a
37 files changed
+123
-300
No files matched your search
@@ -57,7 +57,7 @@ namespace RGB.NET.Devices.SteelSeries
|
||||
#region Methods
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool Initialize(RGBDeviceType loadFilter = RGBDeviceType.All, bool exclusiveAccessIfPossible = false, bool throwExceptions = false)
|
||||
public bool Initialize(RGBDeviceType loadFilter = RGBDeviceType.All, bool throwExceptions = false)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -98,24 +98,18 @@ namespace RGB.NET.Devices.SteelSeries
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public void ResetDevices()
|
||||
{
|
||||
if (IsInitialized)
|
||||
try
|
||||
{
|
||||
SteelSeriesSDK.ResetLeds();
|
||||
}
|
||||
catch {/* shit happens */}
|
||||
}
|
||||
|
||||
|
||||
/// <inheritdoc />
|
||||
public void Dispose()
|
||||
{
|
||||
try { UpdateTrigger?.Dispose(); }
|
||||
try { UpdateTrigger.Dispose(); }
|
||||
catch { /* at least we tried */ }
|
||||
|
||||
foreach (IRGBDevice device in Devices)
|
||||
try { device.Dispose(); }
|
||||
catch { /* at least we tried */ }
|
||||
Devices = Enumerable.Empty<IRGBDevice>();
|
||||
|
||||
try { SteelSeriesSDK.Dispose(); }
|
||||
catch { /* shit happens */ }
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user