mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
Plugins - Simplified and streamlined the way plugins provide VMs
Plugins - Added dependency injection to all plugin VMs Plugin settings - Allow injecting plugin settings into any class defined in the plugin assembly
This commit is contained in:
1 parent
a06ad8f011
commit
625fcbafdd
29 files changed
+349
-165
No files matched your search
@@ -1,5 +1,4 @@
|
||||
using Artemis.Core.Plugins.Abstract;
|
||||
using Artemis.Core.Plugins.Abstract.ViewModels;
|
||||
using Artemis.Core.Services.Interfaces;
|
||||
using Artemis.Plugins.Devices.DMX.ViewModels;
|
||||
|
||||
@@ -13,19 +12,15 @@ namespace Artemis.Plugins.Devices.DMX
|
||||
public DMXDeviceProvider(IRgbService rgbService) : base(RGB.NET.Devices.DMX.DMXDeviceProvider.Instance)
|
||||
{
|
||||
_rgbService = rgbService;
|
||||
HasConfigurationViewModel = true;
|
||||
}
|
||||
|
||||
public override void EnablePlugin()
|
||||
{
|
||||
ConfigurationDialog = new PluginConfigurationDialog<DMXConfigurationViewModel>();
|
||||
|
||||
// TODO: Load from configuration
|
||||
// RGB.NET.Devices.DMX.DMXDeviceProvider.Instance.AddDeviceDefinition();
|
||||
_rgbService.AddDeviceProvider(RgbDeviceProvider);
|
||||
}
|
||||
|
||||
public override PluginConfigurationViewModel GetConfigurationViewModel()
|
||||
{
|
||||
return new DMXConfigurationViewModel(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user