Core - Added ColorGradient type to use for.. gradients!

Core - Initialisation process no longer takes place in core constructor and is no longer async
UI - Fixed exceptions during init not being shown
Gradient editor - Started work on this
This commit is contained in:
Robert committed 2020-02-28 23:19:38 +01:00
1 parent 9b62ba5f3d
commit c3b2c981da
29 files changed
+1517 -113

No files matched your search

+5 -6
View File
@@ -49,7 +49,6 @@ namespace Artemis.Core.Services
_pluginService.PluginDisabled += (sender, args) => _modules = _pluginService.GetPluginsOfType<Module>();
ConfigureJsonConvert();
Task.Run(Initialize);
}
public bool ModuleUpdatingDisabled { get; set; }
@@ -81,7 +80,7 @@ namespace Artemis.Core.Services
};
}
private async Task Initialize()
public void Initialize()
{
if (IsInitialized)
throw new ArtemisCoreException("Cannot initialize the core as it is already initialized.");
@@ -90,8 +89,8 @@ namespace Artemis.Core.Services
ApplyLoggingLevel();
// Initialize the services
await Task.Run(() => _pluginService.CopyBuiltInPlugins());
await Task.Run(() => _pluginService.LoadPlugins());
_pluginService.CopyBuiltInPlugins();
_pluginService.LoadPlugins();
var surfaceConfig = _surfaceService.ActiveSurface;
if (surfaceConfig != null)
@@ -99,8 +98,8 @@ namespace Artemis.Core.Services
else
_logger.Information("Initialized without an active surface entity");
await Task.Run(() => _profileService.ActivateDefaultProfiles());
_profileService.ActivateDefaultProfiles();
OnInitialized();
}
@@ -20,6 +20,11 @@ namespace Artemis.Core.Services.Interfaces
/// </summary>
bool ModuleRenderingDisabled { get; set; }
/// <summary>
/// Initializes the core, only call once
/// </summary>
void Initialize();
/// <summary>
/// Occurs the core has finished initializing
/// </summary>