parent
d1c24c19d2
commit
a480a564ad
@ -0,0 +1,61 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
|
xmlns:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/toolkit"
|
||||||
|
xmlns:cv="clr-namespace:Camera.MAUI;assembly=Camera.MAUI"
|
||||||
|
x:Class="LivreLand.View.ScanView"
|
||||||
|
Title="ScanView">
|
||||||
|
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="*"/>
|
||||||
|
<RowDefinition Height="auto"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<Grid Grid.Row="0">
|
||||||
|
<cv:CameraView BarCodeDetectionEnabled="True"
|
||||||
|
Camera="{Binding ScanVM.Camera}"
|
||||||
|
Cameras="{Binding ScanVM.Cameras}"
|
||||||
|
NumCamerasDetected="{Binding ScanVM.CamerasCount}"
|
||||||
|
AutoStartPreview="{Binding ScanVM.AutoStartPreview}"
|
||||||
|
AutoStartRecording="{Binding ScanVM.AutoStartRecording}"
|
||||||
|
WidthRequest="300"
|
||||||
|
HeightRequest="200">
|
||||||
|
<cv:CameraView.Behaviors>
|
||||||
|
<toolkit:EventToCommandBehavior EventName="BarcodeDetected"
|
||||||
|
Command="{Binding ScanVM.BarcodeDetectCommand}"/>
|
||||||
|
<toolkit:EventToCommandBehavior EventName="CamerasLoaded"
|
||||||
|
Command="{Binding ScanVM.CamerasLoadCommand}"/>
|
||||||
|
</cv:CameraView.Behaviors>
|
||||||
|
</cv:CameraView>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
<Grid Margin="2"
|
||||||
|
Grid.Row="1">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="auto"/>
|
||||||
|
<ColumnDefinition Width="*"/>
|
||||||
|
<ColumnDefinition Width="auto"/>
|
||||||
|
<ColumnDefinition Width="*"/>
|
||||||
|
<ColumnDefinition Width="auto"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<Label Text="Annuler"
|
||||||
|
TextColor="{StaticResource Blue100Accent}"
|
||||||
|
Grid.Column="0"/>
|
||||||
|
|
||||||
|
<Button Text="Start Camera"
|
||||||
|
Command="{Binding ScanVM.StartCameraCommand}"
|
||||||
|
Grid.Column="2"/>
|
||||||
|
|
||||||
|
<Button Text="Start Record"
|
||||||
|
Command="{Binding ScanVM.StartRecordingCommand}"/>
|
||||||
|
|
||||||
|
<Label Text="{Binding ScanVM.BarcodeText}"
|
||||||
|
TextColor="{StaticResource Blue100Accent}"
|
||||||
|
Grid.Column="4"/>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
</ContentPage>
|
@ -0,0 +1,23 @@
|
|||||||
|
using LivreLand.ViewModel;
|
||||||
|
|
||||||
|
namespace LivreLand.View;
|
||||||
|
|
||||||
|
public partial class ScanView : ContentPage
|
||||||
|
{
|
||||||
|
#region Properties
|
||||||
|
|
||||||
|
public ScanVM ScanVM { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Constructor
|
||||||
|
|
||||||
|
public ScanView(ScanVM scanVM)
|
||||||
|
{
|
||||||
|
ScanVM = scanVM;
|
||||||
|
InitializeComponent();
|
||||||
|
BindingContext = this;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
Loading…
Reference in new issue