Added logging.

This commit is contained in:
Razmoth
2023-01-29 21:04:02 +04:00
parent 964d908e66
commit 6740772656
8 changed files with 175 additions and 117 deletions

View File

@@ -128,6 +128,8 @@ namespace AssetStudioGUI
Logger.Default = logger;
ConsoleHelper.ShowWindow(handle, ConsoleHelper.SW_HIDE);
}
enableFileLogging.Checked = Properties.Settings.Default.isFileLogging;
Logger.IsFileLogging = Properties.Settings.Default.isFileLogging;
Progress.Default = new Progress<int>(SetProgressBarValue);
Studio.StatusStripUpdate = StatusStripUpdate;
specifyGame.Items.AddRange(GameManager.GetGames());
@@ -138,6 +140,10 @@ namespace AssetStudioGUI
CABManager.LoadMap(Studio.Game);
}
~AssetStudioGUIForm()
{
Logger.Dispose();
}
private void AssetStudioGUIForm_DragEnter(object sender, DragEventArgs e)
{
if (e.Data.GetDataPresent(DataFormats.FileDrop))
@@ -2214,6 +2220,14 @@ namespace AssetStudioGUI
CABManager.LoadMap(Studio.Game);
}
private void enableFileLogging_CheckedChanged(object sender, EventArgs e)
{
Properties.Settings.Default.isFileLogging = enableFileLogging.Checked;
Properties.Settings.Default.Save();
Logger.IsFileLogging = Properties.Settings.Default.isFileLogging;
}
private void SpecifyAIVersionUpdate(bool value)
{
if (InvokeRequired)