finished candybox

This commit is contained in:
meelstorm
2025-09-18 10:50:50 +02:00
parent dc12b3e51a
commit 6c0b778ba6
9 changed files with 535 additions and 55 deletions

View File

@@ -28,6 +28,8 @@ namespace VisionBuilder.UI.Common
[ObservableProperty]
[NotifyPropertyChangedFor(nameof(CanStart))]
[NotifyPropertyChangedFor(nameof(CanStop))]
[NotifyPropertyChangedFor(nameof(CanPause))]
[NotifyPropertyChangedFor(nameof(CanResume))]
[NotifyCanExecuteChangedFor(nameof(SelectRecipeCommand))]
[NotifyCanExecuteChangedFor(nameof(StartCommand))]
[NotifyCanExecuteChangedFor(nameof(StopCommand))]
@@ -42,13 +44,20 @@ namespace VisionBuilder.UI.Common
[ObservableProperty]
[NotifyPropertyChangedFor(nameof(CameraLabelAndStatus))]
[NotifyPropertyChangedFor(nameof(IsResumed))]
[NotifyPropertyChangedFor(nameof(CanPause))]
[NotifyPropertyChangedFor(nameof(CanResume))]
[NotifyCanExecuteChangedFor(nameof(ResumeCommand))]
[NotifyCanExecuteChangedFor(nameof(PauseCommand))]
private bool _isPaused;
public bool IsResumed => !IsPaused;
public bool CanStop => IsRunning;
public bool CanStart => !IsRunning && SelectedRecipe!=null;
public bool CanPause => IsRunning && !IsPaused;
public bool CanResume => IsRunning && IsPaused;
public bool IsNotRunning => !IsRunning;
private bool _handlingEnabled = true;
@@ -62,6 +71,8 @@ namespace VisionBuilder.UI.Common
[NotifyCanExecuteChangedFor(nameof(SelectRecipeCommand))]
[NotifyCanExecuteChangedFor(nameof(StartCommand))]
[NotifyCanExecuteChangedFor(nameof(StopCommand))]
[NotifyCanExecuteChangedFor(nameof(ResumeCommand))]
[NotifyCanExecuteChangedFor(nameof(PauseCommand))]
[NotifyPropertyChangedFor(nameof(RecipeSelected))]
[NotifyPropertyChangedFor(nameof(RecipeNotSelected))]
private RecipeData? _selectedRecipe;