punish v6.8.18.0
This commit is contained in:
commit
cfb4dea47e
316 changed files with 554088 additions and 0 deletions
34
Questionable/Questionable.External/NotificationMasterIpc.cs
Normal file
34
Questionable/Questionable.External/NotificationMasterIpc.cs
Normal file
|
@ -0,0 +1,34 @@
|
|||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue