check point
This commit is contained in:
18
VisionBuilder.UI.Common/ViewModel/PreviewVM.cs
Normal file
18
VisionBuilder.UI.Common/ViewModel/PreviewVM.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using OpenCvSharp;
|
||||
using VisionBuilder.UI.Common.Commands;
|
||||
using VisionBuilder.UI.Common.Commands.Interfaces;
|
||||
|
||||
namespace VisionBuilder.UI.Common.ViewModel;
|
||||
|
||||
public partial class PreviewVM:ObservableObject, IEventHandler<ImageProcessedEvent>
|
||||
{
|
||||
[ObservableProperty] private Mat _imagePreview;
|
||||
[ObservableProperty] private bool _isError;
|
||||
|
||||
public void Handle(ImageProcessedEvent @event)
|
||||
{
|
||||
IsError = @event.HasError;
|
||||
ImagePreview = @event.ImageAnalysis.Clone();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user