mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2024-12-24 15:41:49 +01:00
3f68c9bcb8
The only real import one is remove System.Windows.Forms for non GUI items
31 lines
823 B
C#
31 lines
823 B
C#
using System;
|
|
|
|
namespace DS4Windows
|
|
{
|
|
public class Log
|
|
{
|
|
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));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|