Profile editor - Many runtime fixes, UI is back to usable!

This commit is contained in:
SpoinkyNL committed 2020-09-12 23:11:08 +02:00
1 parent db9d9fb4e6
commit 7fff1a593f
38 files changed
+309 -352

No files matched your search

+5 -4
View File
@@ -23,8 +23,9 @@ namespace Artemis.Core.Services
/// </summary>
internal class CoreService : ICoreService
{
internal static IKernel Kernel;
private readonly Stopwatch _frameStopWatch;
private readonly IKernel _kernel;
private readonly ILogger _logger;
private readonly PluginSetting<LogEventLevel> _loggingLevel;
private readonly IPluginService _pluginService;
@@ -37,9 +38,9 @@ namespace Artemis.Core.Services
// ReSharper disable once UnusedParameter.Local - Storage migration service is injected early to ensure it runs before anything else
public CoreService(IKernel kernel, ILogger logger, StorageMigrationService _, ISettingsService settingsService, IPluginService pluginService,
IRgbService rgbService, ISurfaceService surfaceService, IProfileService profileService)
IRgbService rgbService, ISurfaceService surfaceService, IProfileService profileService, IModuleService moduleService)
{
_kernel = kernel;
Kernel = kernel;
_logger = logger;
_pluginService = pluginService;
_rgbService = rgbService;
@@ -80,7 +81,7 @@ namespace Artemis.Core.Services
_logger.Information("Initializing Artemis Core version {version}", versionAttribute?.InformationalVersion);
ApplyLoggingLevel();
DeserializationLogger.Initialize(_kernel);
DeserializationLogger.Initialize(Kernel);
// Initialize the services
_pluginService.CopyBuiltInPlugins();
@@ -2,24 +2,16 @@
using System.Collections.Generic;
using System.Linq;
using Artemis.Core.LayerBrushes;
using Ninject;
namespace Artemis.Core.Services
{
internal class LayerBrushService : ILayerBrushService
{
private readonly IKernel _kernel;
public LayerBrushService(IKernel kernel)
{
_kernel = kernel;
}
public LayerBrushRegistration RegisterLayerBrush(LayerBrushDescriptor descriptor)
{
if (descriptor == null)
throw new ArgumentNullException(nameof(descriptor));
descriptor.Kernel = _kernel;
return LayerBrushStore.Add(descriptor);
}
@@ -35,4 +27,4 @@ namespace Artemis.Core.Services
return LayerBrushStore.GetAll().Select(r => r.LayerBrushDescriptor).ToList();
}
}
}
}
@@ -2,25 +2,16 @@
using System.Collections.Generic;
using System.Linq;
using Artemis.Core.LayerEffects;
using Ninject;
namespace Artemis.Core.Services
{
internal class LayerEffectService : ILayerEffectService
{
private readonly IKernel _kernel;
public LayerEffectService(IKernel kernel)
{
_kernel = kernel;
}
public LayerEffectRegistration RegisterLayerEffect(LayerEffectDescriptor descriptor)
{
if (descriptor == null)
throw new ArgumentNullException(nameof(descriptor));
descriptor.Kernel = _kernel;
return LayerEffectStore.Add(descriptor);
}