AssetStudio/AssetStudioGUI/GUILogger.cs
2021-05-28 03:27:50 +08:00

31 lines
628 B
C#

using AssetStudio;
using System;
using System.Windows.Forms;
namespace AssetStudioGUI
{
class GUILogger : ILogger
{
private Action<string> action;
public GUILogger(Action<string> action)
{
this.action = action;
}
public void Log(LoggerEvent loggerEvent, string message)
{
switch (loggerEvent)
{
case LoggerEvent.Error:
MessageBox.Show(message);
break;
default:
action(message);
break;
}
}
}
}