mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
31 lines
1012 B
C#
31 lines
1012 B
C#
using Artemis.Core.Plugins.Abstract;
|
|
using Artemis.Core.Plugins.Abstract.ViewModels;
|
|
using Artemis.Core.Services.Interfaces;
|
|
using Artemis.Plugins.Devices.DMX.ViewModels;
|
|
|
|
namespace Artemis.Plugins.Devices.DMX
|
|
{
|
|
// ReSharper disable once UnusedMember.Global
|
|
public class DMXDeviceProvider : DeviceProvider
|
|
{
|
|
private readonly IRgbService _rgbService;
|
|
|
|
public DMXDeviceProvider(IRgbService rgbService) : base(RGB.NET.Devices.DMX.DMXDeviceProvider.Instance)
|
|
{
|
|
_rgbService = rgbService;
|
|
HasConfigurationViewModel = true;
|
|
}
|
|
|
|
public override void EnablePlugin()
|
|
{
|
|
// TODO: Load from configuration
|
|
// RGB.NET.Devices.DMX.DMXDeviceProvider.Instance.AddDeviceDefinition();
|
|
_rgbService.AddDeviceProvider(RgbDeviceProvider);
|
|
}
|
|
|
|
public override PluginConfigurationViewModel GetConfigurationViewModel()
|
|
{
|
|
return new DMXConfigurationViewModel(this);
|
|
}
|
|
}
|
|
} |