cemu-DS4Windows/DS4Windows/DS4Control/Log.cs

34 lines
895 B
C#
Raw Normal View History

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace DS4Windows
{
public class Log
{
public static event EventHandler<DebugEventArgs> TrayIconLog;
public static event EventHandler<DebugEventArgs> GuiLog;
2015-01-17 21:16:48 +01:00
public static void LogToGui(string data, bool warning)
{
if (GuiLog != null)
{
2015-01-17 21:16:48 +01:00
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));
}
}
}
}