1.0.6
This commit is contained in:
@@ -15,7 +15,8 @@ namespace VisionBuilder.UI.Common
|
||||
public partial class SingleCameraVM : ObservableObject, IEventHandler<ImageProcessedEvent>
|
||||
{
|
||||
public SynchronizationContext? SynchronizationContext { get; set; }
|
||||
|
||||
|
||||
private readonly UIConfiguration _uiConfiguration;
|
||||
private readonly IRecipeSelectionDialogService _recipeSelectionDialogService;
|
||||
private readonly IRecognitionControl _recognitionControl;
|
||||
|
||||
@@ -56,8 +57,10 @@ namespace VisionBuilder.UI.Common
|
||||
|
||||
public bool CanStop => IsRunning;
|
||||
public bool CanStart => !IsRunning && SelectedRecipe!=null;
|
||||
public bool CanPause => IsRunning && !IsPaused;
|
||||
public bool CanResume => IsRunning && IsPaused;
|
||||
public bool CanPause => (IsRunning && !IsPaused)&&_uiConfiguration.ShowPauseButton;
|
||||
public bool CanResume => (IsRunning && IsPaused) && _uiConfiguration.ShowPauseButton;
|
||||
|
||||
|
||||
|
||||
public bool IsNotRunning => !IsRunning;
|
||||
private bool _handlingEnabled = true;
|
||||
@@ -77,10 +80,12 @@ namespace VisionBuilder.UI.Common
|
||||
[NotifyPropertyChangedFor(nameof(RecipeSelected))]
|
||||
[NotifyPropertyChangedFor(nameof(RecipeNotSelected))]
|
||||
private RecipeData? _selectedRecipe;
|
||||
|
||||
|
||||
|
||||
public SingleCameraVM(CameraSettings cameraSettings, UIConfiguration uiConfiguration, IRecipeSelectionDialogService recipeSelectionDialogService, IRecognitionControl recognitionControl, IImagePreviewService imagePreviewService, ILearningTool learningTool, IPasswordInputService passwordInputService)
|
||||
{
|
||||
_uiConfiguration = uiConfiguration;
|
||||
_recipeSelectionDialogService = recipeSelectionDialogService;
|
||||
|
||||
_recognitionControl = recognitionControl;
|
||||
@@ -94,6 +99,8 @@ namespace VisionBuilder.UI.Common
|
||||
|
||||
recognitionControl.SessionStarted += StatisticsVm.Handle;
|
||||
recognitionControl.SessionStarted += ErrorsVm.Handle;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user