mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
Added most of the settings code, doesn't work because SQLite is weird
This commit is contained in:
1 parent
231e5e7517
commit
ac577e87cc
42 files changed
+409
-582
No files matched your search
@@ -13,7 +13,7 @@ namespace Artemis.Core.Services
|
||||
private readonly IPluginService _pluginService;
|
||||
private readonly IRgbService _rgbService;
|
||||
|
||||
public CoreService(IPluginService pluginService, IRgbService rgbService)
|
||||
internal CoreService(IPluginService pluginService, IRgbService rgbService)
|
||||
{
|
||||
_pluginService = pluginService;
|
||||
_rgbService = rgbService;
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace Artemis.Core.Services
|
||||
{
|
||||
private readonly List<DataModelExpansion> _dataModelExpansions;
|
||||
|
||||
public MainDataModelService()
|
||||
internal MainDataModelService()
|
||||
{
|
||||
_dataModelExpansions = new List<DataModelExpansion>();
|
||||
}
|
||||
|
||||
@@ -146,8 +146,12 @@ namespace Artemis.Core.Services
|
||||
var pluginType = pluginTypes.Single();
|
||||
try
|
||||
{
|
||||
var constructorArguments = new ConstructorArgument("pluginInfo", pluginInfo);
|
||||
pluginInfo.Instance = (Plugin) _childKernel.Get(pluginType, constraint: null, parameters: constructorArguments);
|
||||
var parameters = new IParameter[]
|
||||
{
|
||||
new ConstructorArgument("pluginInfo", pluginInfo),
|
||||
new Parameter("PluginInfo", pluginInfo, false)
|
||||
};
|
||||
pluginInfo.Instance = (Plugin) _childKernel.Get(pluginType, constraint: null, parameters: parameters);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace Artemis.Core.Services
|
||||
private readonly List<IRGBDevice> _loadedDevices;
|
||||
private readonly TimerUpdateTrigger _updateTrigger;
|
||||
|
||||
public RgbService()
|
||||
internal RgbService()
|
||||
{
|
||||
Surface = RGBSurface.Instance;
|
||||
LoadingDevices = false;
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
using Artemis.Core.Plugins.Models;
|
||||
using Artemis.Core.Services.Interfaces;
|
||||
using Artemis.Storage.Repositories;
|
||||
|
||||
namespace Artemis.Core.Services
|
||||
{
|
||||
// TODO: Rethink this :')
|
||||
public class SettingsService : ISettingsService
|
||||
{
|
||||
private SettingRepository _settingRepository;
|
||||
|
||||
public SettingsService()
|
||||
{
|
||||
_settingRepository = new SettingRepository();
|
||||
}
|
||||
|
||||
public PluginSettingsContainer GetPluginSettings(PluginInfo pluginInfo)
|
||||
{
|
||||
return new PluginSettingsContainer(pluginInfo, _settingRepository);
|
||||
}
|
||||
}
|
||||
|
||||
public interface ISettingsService : IArtemisService
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,7 @@ namespace Artemis.Core.Services
|
||||
private readonly IPluginService _pluginService;
|
||||
private readonly ProfileRepository _profileRepository;
|
||||
|
||||
public StorageService(IPluginService pluginService)
|
||||
internal StorageService(IPluginService pluginService)
|
||||
{
|
||||
_pluginService = pluginService;
|
||||
_profileRepository = new ProfileRepository();
|
||||
|
||||
Reference in new issue
Block a user