Made devices aware of the plugin that loaded them

Fixed Corsair LL Fans layout
Expanded render events
Added identify option to device settings, must move this to be reusable though
This commit is contained in:
SpoinkyNL committed 2019-11-03 11:38:28 +01:00
1 parent af2612f294
commit 6ebceacd13
23 files changed
+400 -229

No files matched your search

+7 -1
View File
@@ -14,6 +14,7 @@ using Newtonsoft.Json;
using Ninject;
using Ninject.Extensions.ChildKernel;
using Ninject.Parameters;
using RGB.NET.Core;
namespace Artemis.Core.Services
{
@@ -102,7 +103,7 @@ namespace Artemis.Core.Services
// Create a child kernel and app domain that will only contain the plugins
_childKernel = new ChildKernel(_kernel);
// Load the plugin assemblies into the plugin context
var pluginDirectory = new DirectoryInfo(Path.Combine(Constants.DataFolder, "plugins"));
foreach (var subDirectory in pluginDirectory.EnumerateDirectories())
@@ -282,6 +283,11 @@ namespace Artemis.Core.Services
}
}
public Plugin GetDevicePlugin(IRGBDevice rgbDevice)
{
return GetPluginsOfType<Device>().First(d => d.DeviceProvider.Devices.Contains(rgbDevice));
}
public void Dispose()
{
UnloadPlugins();