mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-11 11:26:27 +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
57d82fafa8
commit
c62997ca41
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
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -31,6 +31,12 @@ namespace Artemis.Core.Plugins.Models
|
||||
/// </summary>
|
||||
public string Description { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The plugins display icon that's shown in the settings see <see href="https://materialdesignicons.com" /> for available
|
||||
/// icons
|
||||
/// </summary>
|
||||
public string Icon { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The version of the plugin
|
||||
/// </summary>
|
||||
@@ -78,7 +84,7 @@ namespace Artemis.Core.Plugins.Models
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
internal PluginEntity PluginEntity { get; set; }
|
||||
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return $"{nameof(Guid)}: {Guid}, {nameof(Name)}: {Name}, {nameof(Version)}: {Version}";
|
||||
|
||||
Reference in new issue
Block a user