Fix some osx bugs and clean up

This commit is contained in:
caesay
2024-01-01 17:17:48 +00:00
parent ea4796d64d
commit 9af45015d8
11 changed files with 194 additions and 109 deletions

View File

@@ -1,6 +1,7 @@
using System;
using System.IO;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Linq;
using Avalonia.Controls;
using Avalonia.Threading;
@@ -42,6 +43,7 @@ public partial class MainWindow : Window
} catch (Exception ex) {
Log("ERROR: " + ex.Message);
}
await Task.Delay(10);
UpdateStatus();
}
@@ -112,6 +114,7 @@ public partial class MainWindow : Window
public void Log<TState>(LogLevel logLevel, EventId eventId, TState state,
Exception exception, Func<TState, Exception, string> formatter)
{
if (logLevel < LogLevel.Information) return;
var text = formatter(state, exception);
Dispatcher.UIThread.Post(() => {
_textBox(text);