Plugins - Added optional configuration window

Plugins - Moved plugins to their own directory
Device providers - Added all RGB.NET device providers
This commit is contained in:
Robert committed 2020-02-27 13:25:38 +01:00
1 parent e15bf3688b
commit 2bcee30e11
752 files changed
+2198 -73

No files matched your search

@@ -0,0 +1,44 @@
using Artemis.Core.Plugins.Abstract;
using Artemis.Core.Plugins.Abstract.ViewModels;
using Artemis.Core.Plugins.Models;
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(PluginInfo pluginInfo, IRgbService rgbService) : base(pluginInfo, 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 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
// DMXDeviceProvider.Instance.ResetDevices();
// DMXDeviceProvider.Instance.Dispose();
}
public override PluginConfigurationViewModel GetConfigurationViewModel()
{
return new DMXConfigurationViewModel(this);
}
}
}