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
2020-11-18 19:28:05 +01:00

33 lines
1.0 KiB
C#

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;
IColorPickerService colorPickerService = kernel.Get<IColorPickerService>();
GradientPicker.ColorPickerService = colorPickerService;
ColorPicker.ColorPickerService = colorPickerService;
Initialized = true;
}
}
}