CurrencyAlertClassic/CurrencyAlert/Plugin.cs

36 lines
1.1 KiB
C#
Raw Normal View History

using CurrencyAlert.Localization;
using CurrencyAlert.System.cs;
using CurrencyAlert.Windows;
2022-09-14 16:35:53 +00:00
using Dalamud.Plugin;
using KamiLib;
2022-09-14 16:35:53 +00:00
namespace CurrencyAlert;
public sealed class Plugin : IDalamudPlugin
2022-09-14 16:35:53 +00:00
{
public string Name => "CurrencyAlert";
public Plugin(DalamudPluginInterface pluginInterface)
2022-09-14 16:35:53 +00:00
{
pluginInterface.Create<Service>();
KamiCommon.Initialize(pluginInterface, Name, () => Service.Configuration.Save());
LocalizationManager.Instance.Initialize();
Service.Configuration = Service.PluginInterface.GetPluginConfig() as Configuration ?? new Configuration();
Service.Configuration.Initialize(Service.PluginInterface);
KamiCommon.WindowManager.AddConfigurationWindow(new ConfigurationWindow());
KamiCommon.WindowManager.AddWindow(new OverlayWindow());
Service.CurrencyTracker = new CurrencyTracker();
}
2022-09-14 16:35:53 +00:00
public void Dispose()
{
KamiCommon.Dispose();
Service.CurrencyTracker.Dispose();
LocalizationManager.Cleanup();
2022-09-14 16:35:53 +00:00
}
}