io commander

This commit is contained in:
meelstorm
2025-07-19 15:57:59 +02:00
parent 40d74d6da6
commit cd70088d9a
46 changed files with 2198 additions and 28 deletions

View File

@@ -10,7 +10,12 @@ namespace VisionBuilder.UI.Common.ViewModel;
public partial class MainWindowVM:ObservableObject
{
private readonly ISettingsService _settingsService;
public event Action ProgramStarted = delegate { };
public event Action ProgramClosed = delegate { };
public event Action<bool> TestModeChanged = delegate { };
[ObservableProperty]
private bool _testMode;
public MainWindowVM(ISettingsService settingsService)
{
@@ -27,4 +32,21 @@ public partial class MainWindowVM:ObservableObject
_settingsService.ShowSettingsDialog();
}
[RelayCommand]
public void ToggleTestMode()
{
TestMode = !TestMode;
TestModeChanged(TestMode);
}
public void OnProgramStarted()
{
ProgramStarted?.Invoke();
}
public void OnProgramClosed()
{
ProgramClosed?.Invoke();
}
}