cemu-DS4Windows/DS4Windows/DS4Control/Log.cs
2018-09-29 04:42:22 -05:00

31 lines
829 B
C#

using System;
namespace DS4Windows
{
public class AppLogger
{
public static event EventHandler<DebugEventArgs> TrayIconLog;
public static event EventHandler<DebugEventArgs> GuiLog;
public static void LogToGui(string data, bool warning)
{
if (GuiLog != null)
{
GuiLog(null, new DebugEventArgs(data, warning));
}
}
public static void LogToTray(string data, bool warning = false, bool ignoreSettings = false)
{
if (TrayIconLog != null)
{
if (ignoreSettings)
TrayIconLog(ignoreSettings, new DebugEventArgs(data, warning));
else
TrayIconLog(null, new DebugEventArgs(data, warning));
}
}
}
}