mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
Plugins - Moved plugins to their own directory Device providers - Added all RGB.NET device providers
37 lines
1.2 KiB
C#
37 lines
1.2 KiB
C#
using Artemis.Core.Plugins.Abstract;
|
|
using Artemis.Core.Plugins.Models;
|
|
using Artemis.Core.Services.Interfaces;
|
|
using RGB.NET.Core;
|
|
using RGB.NET.Devices.Novation;
|
|
|
|
namespace Artemis.Plugins.Devices.Novation
|
|
{
|
|
// ReSharper disable once UnusedMember.Global
|
|
public class NovationDeviceProvider : DeviceProvider
|
|
{
|
|
private readonly IRgbService _rgbService;
|
|
|
|
public NovationDeviceProvider(PluginInfo pluginInfo, IRgbService rgbService) : base(pluginInfo, RGB.NET.Devices.Novation.NovationDeviceProvider.Instance)
|
|
{
|
|
_rgbService = rgbService;
|
|
}
|
|
|
|
public override void EnablePlugin()
|
|
{
|
|
PathHelper.ResolvingAbsolutePath += (sender, args) => ResolveAbsolutePath(typeof(NovationRGBDevice<>), sender, args);
|
|
_rgbService.AddDeviceProvider(RgbDeviceProvider);
|
|
}
|
|
|
|
public override void DisablePlugin()
|
|
{
|
|
// TODO: Remove the device provider from the surface
|
|
}
|
|
|
|
public override void Dispose()
|
|
{
|
|
// TODO: This will probably not go well without first removing the device provider
|
|
// NovationDeviceProvider.Instance.ResetDevices();
|
|
// NovationDeviceProvider.Instance.Dispose();
|
|
}
|
|
}
|
|
} |