forked from amkovkov/GranuSightSoftware2
feat: IlluminatorController
This commit is contained in:
@@ -15,5 +15,7 @@ public static class DependencyInjectionHelper
|
||||
.AddSingleton<ResourcesView>()
|
||||
.AddSingleton<ResourcesViewModel>()
|
||||
.AddSingleton<CameraView>()
|
||||
.AddSingleton<CameraViewModel>();
|
||||
.AddSingleton<CameraViewModel>()
|
||||
.AddSingleton<IlluminatorControllerView>()
|
||||
.AddSingleton<IlluminatorControllerViewModel>();
|
||||
}
|
||||
@@ -13,6 +13,7 @@ public partial class MainViewModel : ViewModelBase
|
||||
private readonly IlluminatorService _illuminatorService;
|
||||
[ObservableProperty] private CameraViewModel _cameraViewModel;
|
||||
[ObservableProperty] private ResourcesViewModel _resourcesViewModel;
|
||||
[ObservableProperty] private IlluminatorControllerViewModel _illuminatorControllerViewModel;
|
||||
[ObservableProperty] private OpenCvSharp.Mat? _image1;
|
||||
[ObservableProperty] private OpenCvSharp.Mat? _image2;
|
||||
[ObservableProperty] private OpenCvSharp.Mat? _image3;
|
||||
@@ -24,13 +25,14 @@ public partial class MainViewModel : ViewModelBase
|
||||
[ObservableProperty] private bool _canScrollForward;
|
||||
[ObservableProperty] private bool _canScrollBackward;
|
||||
|
||||
public MainViewModel(ILogger<MainViewModel> logger, CameraViewModel cameraViewModel, ResourcesViewModel resourcesViewModel, CameraService cameraService, IlluminatorService illuminatorService)
|
||||
public MainViewModel(ILogger<MainViewModel> logger, CameraViewModel cameraViewModel, ResourcesViewModel resourcesViewModel, IlluminatorControllerViewModel illuminatorControllerViewModel, CameraService cameraService, IlluminatorService illuminatorService)
|
||||
{
|
||||
_logger = logger;
|
||||
_cameraService = cameraService;
|
||||
_illuminatorService = illuminatorService;
|
||||
CameraViewModel = cameraViewModel;
|
||||
ResourcesViewModel = resourcesViewModel;
|
||||
IlluminatorControllerViewModel = illuminatorControllerViewModel;
|
||||
ButtonCaptureClick = new RelayCommand(() =>
|
||||
{
|
||||
Task.Run(async () =>
|
||||
|
||||
@@ -9,7 +9,12 @@
|
||||
<Grid ColumnDefinitions="*,100" RowDefinitions="*,*">
|
||||
<Button Grid.Row="0" Grid.Column="1" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" IsEnabled="{Binding CanScrollBackward}" Command="{Binding ButtonUpClick}"/>
|
||||
<Button Grid.Row="1" Grid.Column="1" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" IsEnabled="{Binding CanScrollForward}" Command="{Binding ButtonDownClick}"/>
|
||||
|
||||
<core:SectionPanel Grid.Row="0" Grid.RowSpan="2" Grid.Column="0" ClipToBounds="True" CanScrollForward="{Binding CanScrollForward}" CanScrollBackward="{Binding CanScrollBackward}" CurrentIndex="{Binding CurrentIndex}">
|
||||
<Grid ColumnDefinitions="300,*">
|
||||
<ContentControl Grid.Column="0" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Content="{Binding IlluminatorControllerViewModel}" />
|
||||
<ContentControl Grid.Column="1" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Content="{Binding CameraViewModel}" />
|
||||
</Grid>
|
||||
<Grid ColumnDefinitions="100,*">
|
||||
<Button Grid.Column="0" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Command="{Binding ButtonCaptureClick}"/>
|
||||
<Grid Grid.Column="1" ColumnDefinitions="*,*" RowDefinitions="*,*" >
|
||||
@@ -20,7 +25,6 @@
|
||||
</Grid>
|
||||
</Grid>
|
||||
<ContentControl VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Content="{Binding ResourcesViewModel}" />
|
||||
<!-- <ContentControl VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Content="{Binding CameraViewModel}" /> -->
|
||||
</core:SectionPanel>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
Reference in New Issue
Block a user