34 lines
807 B
C#
34 lines
807 B
C#
using Dalamud.Plugin;
|
|
using NotificationMasterAPI;
|
|
|
|
namespace Questionable.External;
|
|
|
|
internal sealed class NotificationMasterIpc
|
|
{
|
|
private readonly NotificationMasterApi _api;
|
|
|
|
public bool Enabled => _api.IsIPCReady();
|
|
|
|
public NotificationMasterIpc(IDalamudPluginInterface pluginInterface, Configuration configuration)
|
|
{
|
|
_003Cconfiguration_003EP = configuration;
|
|
_api = new NotificationMasterApi(pluginInterface);
|
|
base._002Ector();
|
|
}
|
|
|
|
public void Notify(string message)
|
|
{
|
|
Configuration.NotificationConfiguration notifications = _003Cconfiguration_003EP.Notifications;
|
|
if (notifications.Enabled)
|
|
{
|
|
if (notifications.ShowTrayMessage)
|
|
{
|
|
_api.DisplayTrayNotification("Questionable", message);
|
|
}
|
|
if (notifications.FlashTaskbar)
|
|
{
|
|
_api.FlashTaskbarIcon();
|
|
}
|
|
}
|
|
}
|
|
}
|