This commit is contained in:
meelstorm
2025-10-02 14:14:11 +02:00
parent 63afb2dcfb
commit 44748f2855
9 changed files with 193 additions and 99 deletions

View File

@@ -57,8 +57,8 @@ namespace VisionBuilder.UI.Common
public bool CanStop => IsRunning;
public bool CanStart => !IsRunning && SelectedRecipe!=null;
public bool CanPause => (IsRunning && !IsPaused)&&_uiConfiguration.ShowPauseButton;
public bool CanResume => (IsRunning && IsPaused) && _uiConfiguration.ShowPauseButton;
public bool CanPause => (IsRunning && !IsPaused);
public bool CanResume => (IsRunning && IsPaused);
@@ -129,17 +129,18 @@ namespace VisionBuilder.UI.Common
CurrentRecipeName = SelectedRecipe?.RecipeName ?? "Select recipe";
}
[RelayCommand(CanExecute = nameof(CanStart))]
public async Task Start()
{
IsRunning = true;
await Task.Run(() =>
{
_recognitionControl.Start();
});
_handlingEnabled = true;
IsRunning = true;
await Task.Run(() => { _recognitionControl.Start(); });
_handlingEnabled = true;
}
[RelayCommand(CanExecute = nameof(CanStop))]