This commit is contained in:
EugeneTes
2026-03-23 10:30:30 +01:00
parent ac0b298644
commit 34b74ecdcd
17 changed files with 42 additions and 14 deletions

View File

@@ -47,6 +47,7 @@ public partial class MainLayout : IDisposable
};
private MudTheme _currentTheme = null!;
private bool _disposed;
protected override void OnInitialized()
{
@@ -71,6 +72,7 @@ public partial class MainLayout : IDisposable
private async void OnPropertyChanged(object? sender, PropertyChangedEventArgs e)
{
if (_disposed) return;
if (e.PropertyName == nameof(MainWindowVM.TestMode))
{
_testMode = MainWindowVm.TestMode;
@@ -98,6 +100,7 @@ public partial class MainLayout : IDisposable
public void Dispose()
{
_disposed = true;
MainWindowVm.PropertyChanged -= OnPropertyChanged;
}
}