mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
Plugins - Added descriptions
Settings - Plugin settings tab UI - Catch exceptions during exception dialog display Plugins - Implemented enable/disable of plugins (WIP) Novation - Added Launchpad Mini layout and image
This commit is contained in:
1 parent
73245a3d4b
commit
16af36bc57
44 files changed
+810
-199
No files matched your search
@@ -3,7 +3,9 @@ using System.Diagnostics;
|
||||
using System.IO;
|
||||
using Artemis.Core.Extensions;
|
||||
using Artemis.Core.Plugins.Models;
|
||||
using Ninject;
|
||||
using RGB.NET.Core;
|
||||
using Serilog;
|
||||
|
||||
namespace Artemis.Core.Plugins.Abstract
|
||||
{
|
||||
@@ -20,6 +22,8 @@ namespace Artemis.Core.Plugins.Abstract
|
||||
|
||||
public IRGBDeviceProvider RgbDeviceProvider { get; }
|
||||
|
||||
[Inject]
|
||||
public ILogger Logger { get; set; }
|
||||
|
||||
protected void ResolveAbsolutePath(Type type, object sender, ResolvePathEventArgs e)
|
||||
{
|
||||
@@ -30,7 +34,24 @@ namespace Artemis.Core.Plugins.Abstract
|
||||
e.FinalPath = Path.Combine(PluginInfo.Directory.FullName, e.RelativePart, e.FileName);
|
||||
else if (e.RelativePath != null)
|
||||
e.FinalPath = Path.Combine(PluginInfo.Directory.FullName, e.RelativePath);
|
||||
|
||||
var deviceInfo = ((IRGBDevice) sender).DeviceInfo;
|
||||
if (e.FileName != null && !File.Exists(e.FinalPath))
|
||||
{
|
||||
Logger?.Information("Couldn't find a layout for device {deviceName}, model {deviceModel} at {filePath}",
|
||||
deviceInfo.DeviceName, deviceInfo.Model, e.FinalPath);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void Dispose()
|
||||
{
|
||||
// Does not happen with device providers, they require Artemis to restart
|
||||
}
|
||||
|
||||
public override void DisablePlugin()
|
||||
{
|
||||
// Does not happen with device providers, they require Artemis to restart
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user