mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-11 11:26:27 +00:00
Fixed plugin binding and reworked some interfaces to abstract classes
This commit is contained in:
1 parent
571a3fe168
commit
3689db9325
17 files changed
+88
-82
No files matched your search
@@ -0,0 +1,15 @@
|
||||
using Artemis.Core.Plugins.Interfaces;
|
||||
using Stylet;
|
||||
|
||||
namespace Artemis.Core.Plugins.Abstract
|
||||
{
|
||||
public abstract class ModuleDataModel
|
||||
{
|
||||
protected ModuleDataModel(IModule module)
|
||||
{
|
||||
Module = module;
|
||||
}
|
||||
|
||||
public IModule Module { get; }
|
||||
}
|
||||
}
|
||||
@@ -4,8 +4,13 @@ using Stylet;
|
||||
|
||||
namespace Artemis.Core.Plugins.Abstract
|
||||
{
|
||||
public abstract class ModuleViewModel : Screen, IModuleViewModel
|
||||
public abstract class ModuleViewModel : Screen
|
||||
{
|
||||
public PluginInfo PluginInfo { get; set; }
|
||||
protected ModuleViewModel(IModule module)
|
||||
{
|
||||
Module = module;
|
||||
}
|
||||
|
||||
public IModule Module { get; }
|
||||
}
|
||||
}
|
||||
@@ -11,6 +11,9 @@ namespace Artemis.Core.Plugins.Abstract
|
||||
{
|
||||
public Profile ActiveProfile { get; private set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public abstract string DisplayName { get; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public abstract bool ExpandsMainDataModel { get; }
|
||||
|
||||
|
||||
@@ -11,7 +11,12 @@ namespace Artemis.Core.Plugins.Interfaces
|
||||
public interface IModule : IPlugin
|
||||
{
|
||||
/// <summary>
|
||||
/// Wether or not this module expands upon the main data model. If set to true any data in main data model can be
|
||||
/// The modules display name that's shown in the menu
|
||||
/// </summary>
|
||||
string DisplayName { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Whether or not this module expands upon the main data model. If set to true any data in main data model can be
|
||||
/// accessed by profiles in this module
|
||||
/// </summary>
|
||||
bool ExpandsMainDataModel { get; }
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
namespace Artemis.Core.Plugins.Interfaces
|
||||
{
|
||||
public interface IModuleDataModel
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
using Artemis.Core.Plugins.Models;
|
||||
using Stylet;
|
||||
|
||||
namespace Artemis.Core.Plugins.Interfaces
|
||||
{
|
||||
/// <inheritdoc />
|
||||
/// <summary>
|
||||
/// Allows you to create a view model for a module
|
||||
/// </summary>
|
||||
public interface IModuleViewModel : IScreen
|
||||
{
|
||||
PluginInfo PluginInfo { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -7,6 +7,11 @@ namespace Artemis.Core.Plugins.Models
|
||||
{
|
||||
public class PluginInfo
|
||||
{
|
||||
public PluginInfo()
|
||||
{
|
||||
Instances = new List<IPlugin>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The plugins GUID
|
||||
/// </summary>
|
||||
|
||||
Reference in new issue
Block a user