1
0
mirror of https://github.com/Artemis-RGB/Artemis synced 2025-12-13 05:48:35 +00:00
Artemis/src/Artemis.UI.Shared/Bootstrapper.cs
Robert 5675d1895b Conditions - Removed old systems
Data bindings - Removed old systems
Data bindings - Implemented node system
2021-08-18 23:47:14 +02:00

34 lines
1.1 KiB
C#

using Artemis.UI.Shared.Controls;
using Artemis.UI.Shared.Services;
using Ninject;
namespace Artemis.UI.Shared
{
/// <summary>
/// Represents the main entry point for the shared UI library
/// <para>The Artemis UI calls this so there's no need to deal with this in a plugin</para>
/// </summary>
public static class Bootstrapper
{
/// <summary>
/// Gets a boolean indicating whether or not the shared UI library has been initialized
/// </summary>
public static bool Initialized { get; private set; }
/// <summary>
/// Initializes the shared UI library
/// </summary>
/// <param name="kernel"></param>
public static void Initialize(IKernel kernel)
{
if (Initialized)
return;
GradientPicker.ColorPickerService = kernel.Get<IColorPickerService>();
ColorPicker.ColorPickerService = kernel.Get<IColorPickerService>();
DataModelPicker.DataModelUIService = kernel.Get<IDataModelUIService>();
Initialized = true;
}
}
}