- [Core] Project restructure

This commit is contained in:
Razmoth
2023-10-03 01:39:59 +04:00
parent caaab48cc0
commit ebf626d10a
127 changed files with 156 additions and 228 deletions

View File

@@ -0,0 +1,35 @@
using System;
using System.Windows.Forms;
namespace AssetStudio.GUI
{
class GUILogger : ILogger
{
public bool ShowErrorMessage = true;
private Action<string> action;
public GUILogger(Action<string> action)
{
this.action = action;
}
public void Log(LoggerEvent loggerEvent, string message, bool silent = false)
{
if (silent)
return;
switch (loggerEvent)
{
case LoggerEvent.Error:
if (ShowErrorMessage)
{
MessageBox.Show(message);
}
break;
default:
action(message);
break;
}
}
}
}