This commit is contained in:
meelstorm
2025-09-29 09:31:57 +02:00
parent 87c1145744
commit 1aecb79ade
16 changed files with 110 additions and 16 deletions

View File

@@ -26,7 +26,14 @@ namespace VisionBuilder.UI.Windows.Components
private void _statisticsVm_PropertyChanged(object? sender, System.ComponentModel.PropertyChangedEventArgs e)
{
switch (e.PropertyName)
if (InvokeRequired) Invoke(() => HandleStatisticsPropertyChange(e.PropertyName!));
else
HandleStatisticsPropertyChange(e.PropertyName!);
}
private void HandleStatisticsPropertyChange(string propertyName)
{
switch (propertyName)
{
case nameof(StatisticsVM.SessionStarted):
Clear();
@@ -58,7 +65,6 @@ namespace VisionBuilder.UI.Windows.Components
break;
}
}
void InitializeFields()
{
UpdateMeta(StartedAtLabel,"");

View File

@@ -1,4 +1,5 @@
using Ninject;
using VisionBuilder.UI.Common;
using VisionBuilder.UI.Common.Processing;
using VisionBuilder.UI.Common.Services;
using VisionBuilder.UI.Common.ViewModel.Interfaces.UI;
@@ -15,6 +16,7 @@ public static class ModuleExtensions
self.Bind<IRecipeSelectionDialogService>().To<WindowsRecipeSelectionDialogService>().InSingletonScope();
self.Bind<IImagePreviewService>().To<WindowsImagePreviewService>().InSingletonScope();
self.Bind<IPasswordInputService>().To<WindowsPasswordInputService>().InSingletonScope();
self.Bind<WindowsUISettings,ISettings>().To<WindowsUISettings>().InSingletonScope();
return self;
}
}

View File

@@ -0,0 +1,14 @@
using Inspectron.Settings;
using VisionBuilder.UI.Common;
namespace VisionBuilder.UI.Windows;
public class WindowsUISettings: ISettings
{
public bool FullScreen { get; set; }=false;
public void RegisterSettings(InspectronSettings settings)
{
settings.RegisterSimple(this, () => this.FullScreen,"System",nameof(FullScreen));
}
}