mirror of
https://github.com/aelurum/AssetStudio.git
synced 2025-05-25 05:40:21 -04:00
- improved "Copy text" option in right click menu, to display what exactly to copy - added "Dump selected assets" option to right click menu - added 'selected assets count' info to status strip when you select assets - added 'exported count / total export count` info to status strip during export - "Show error message" option on the "Debug" tab renamed to "Show all error messages" and is now disabled by default - "fixed" an issue with getting stuck during the "Building tree structure" step - fixed a bug with listSearch that could make it not work in some conditions - fixed a rare bug for resource files with the same name, that caused their data to be overwritten and become incorrect
35 lines
764 B
C#
35 lines
764 B
C#
using AssetStudio;
|
|
using System;
|
|
using System.Windows.Forms;
|
|
|
|
namespace AssetStudioGUI
|
|
{
|
|
class GUILogger : ILogger
|
|
{
|
|
public bool ShowErrorMessage = false;
|
|
private Action<string> action;
|
|
|
|
public GUILogger(Action<string> action)
|
|
{
|
|
this.action = action;
|
|
}
|
|
|
|
public void Log(LoggerEvent loggerEvent, string message)
|
|
{
|
|
switch (loggerEvent)
|
|
{
|
|
case LoggerEvent.Error:
|
|
if (ShowErrorMessage)
|
|
{
|
|
MessageBox.Show(message);
|
|
}
|
|
break;
|
|
default:
|
|
action(message);
|
|
break;
|
|
}
|
|
|
|
}
|
|
}
|
|
}
|