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
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using RGB.NET.Core;
|
||||
using RGB.NET.Core;
|
||||
|
||||
namespace RGB.NET.Devices.Novation
|
||||
{
|
||||
|
||||
@@ -59,7 +59,7 @@ namespace RGB.NET.Devices.Novation
|
||||
#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)
|
||||
{
|
||||
IsInitialized = false;
|
||||
|
||||
@@ -106,22 +106,17 @@ namespace RGB.NET.Devices.Novation
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public void ResetDevices()
|
||||
{
|
||||
foreach (IRGBDevice device in Devices)
|
||||
{
|
||||
NovationLaunchpadRGBDevice? novationDevice = device as NovationLaunchpadRGBDevice;
|
||||
novationDevice?.Reset();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <inheritdoc />
|
||||
public void 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>();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
Reference in new issue
Block a user