mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
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:
1 parent
af2612f294
commit
6ebceacd13
23 files changed
+400
-229
No files matched your search
@@ -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();
|
||||
|
||||
Reference in new issue
Block a user