Skip to content

Commit 9c84cca

Browse files
committed
VB tutorial and MAUI sample code added
+ Code design modifications in C# tutorial + pr07_cloud saves summary documents
1 parent 0014a7e commit 9c84cca

45 files changed

Lines changed: 7034 additions & 41 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ in order to provide the possibility of comparing them to each other.
7979

8080
Shows the main capabilities of the image processing analyzer function.
8181

82-
- Reading different area of images (MRZ, VIZ, Barcode).
82+
- Reading different areas of images (MRZ, VIZ, Barcode).
8383
- Displaying details of the complex result data (called field data).
8484
- Field identification
8585
- Raw, formatted and standardized values
@@ -124,3 +124,23 @@ GDS (remote database) solution.
124124
- Generates a summary document comparing all data read.
125125
- Checking document and personal data in the remote database - if configured.
126126
- Uploads read data to remote database (GDS) - if configured.
127+
128+
### GUI program:
129+
130+
This example uses the MAUI framework.
131+
132+
#### ReadDoc
133+
134+
After opening the device via the menu, the reading process, which can be
135+
started by pressing the Scan button or by automatic motion detection, is
136+
executed according to the subtasks set in the options panel.
137+
138+
The program performs the entire reading process in the background. It captures
139+
images with selected illuminations and analyzes the image data. If configured,
140+
it uses Carmen® ID Recognition Service (cloud authentication engine).
141+
In parallel, it reads ECard data after performing the related authentications.
142+
Finally, it compares the data with the GDS database and logs the data entry,
143+
if configured.
144+
145+
The read data is displayed in various representation forms. The display
146+
elements can be opened or closed by clicking on their headers.

gui/ReadDoc/App.xaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version = "1.0" encoding = "UTF-8" ?>
2+
<Application xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
4+
xmlns:local="clr-namespace:ReadDoc"
5+
x:Class="ReadDoc.App">
6+
<Application.Resources>
7+
<ResourceDictionary>
8+
<ResourceDictionary.MergedDictionaries>
9+
<ResourceDictionary Source="Resources/Styles/Colors.xaml" />
10+
<ResourceDictionary Source="Resources/Styles/Styles.xaml" />
11+
</ResourceDictionary.MergedDictionaries>
12+
</ResourceDictionary>
13+
</Application.Resources>
14+
</Application>

gui/ReadDoc/App.xaml.cs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
namespace ReadDoc
2+
{
3+
public partial class App : Application
4+
{
5+
public App()
6+
{
7+
InitializeComponent();
8+
}
9+
10+
protected override Window CreateWindow(IActivationState? activationState)
11+
{
12+
return new Window(new AppShell());
13+
}
14+
}
15+
}

gui/ReadDoc/AppShell.xaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
<Shell
3+
x:Class="ReadDoc.AppShell"
4+
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
5+
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
6+
xmlns:local="clr-namespace:ReadDoc"
7+
Shell.FlyoutBehavior="Flyout"
8+
Title="ReadDoc">
9+
10+
<ShellContent
11+
ContentTemplate="{DataTemplate local:MainPage}"
12+
Route="MainPage" />
13+
14+
</Shell>

gui/ReadDoc/AppShell.xaml.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
namespace ReadDoc
2+
{
3+
public partial class AppShell : Shell
4+
{
5+
public AppShell()
6+
{
7+
InitializeComponent();
8+
}
9+
}
10+
}

gui/ReadDoc/DevicesPage.xaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<toolkit:Popup xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
4+
x:Class="ReadDoc.DevicesPage"
5+
xmlns:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/toolkit" CanBeDismissedByTappingOutsideOfPopup="False">
6+
<VerticalStackLayout WidthRequest="300">
7+
<Label Text="Select a device and click Open" FontAttributes="Bold" FontSize="14" Margin="0,10,0,0"/>
8+
<Border Stroke="Gray" StrokeShape="RoundRectangle 5,5,5,5" Padding="8" Margin="3">
9+
<Grid x:Name="Devices" >
10+
<Grid.RowDefinitions>
11+
<RowDefinition Height="40"/>
12+
<RowDefinition Height="100"/>
13+
<RowDefinition Height="50"/>
14+
</Grid.RowDefinitions>
15+
<Grid.ColumnDefinitions>
16+
<ColumnDefinition Width="*" />
17+
<ColumnDefinition Width="*" />
18+
</Grid.ColumnDefinitions>
19+
<Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Text="Available Devices" VerticalOptions="Center" HorizontalTextAlignment="Center" BackgroundColor="#BC9C6A" TextColor="White"/>
20+
<CollectionView Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" x:Name="DevicesListBox" SelectionMode="Single">
21+
<CollectionView.ItemTemplate>
22+
<DataTemplate x:DataType="x:String">
23+
<Grid>
24+
<Label Text="{Binding .}" VerticalOptions="Center" TextColor="Black" Padding="10,0,0,0" />
25+
</Grid>
26+
</DataTemplate>
27+
</CollectionView.ItemTemplate>
28+
</CollectionView>
29+
<Button Grid.Row="2" Grid.Column="0" x:Name="cmdOpen" Text="Open" HeightRequest="40" Clicked="cmdOpen_Clicked"/>
30+
<Button Grid.Row="2" Grid.Column="1" x:Name="cmdCancel" Text="Cancel" HeightRequest="40" Clicked="cmdCancel_Clicked"/>
31+
</Grid>
32+
</Border>
33+
</VerticalStackLayout>
34+
</toolkit:Popup>

gui/ReadDoc/DevicesPage.xaml.cs

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
using CommunityToolkit.Maui.Views;
2+
3+
namespace ReadDoc;
4+
5+
public partial class DevicesPage : Popup
6+
{
7+
string? selected = null;
8+
9+
public DevicesPage()
10+
{
11+
InitializeComponent();
12+
}
13+
14+
public void SetDeviceList(List<String> devices)
15+
{
16+
DevicesListBox.ItemsSource = devices;
17+
if (devices != null && devices.Count > 0)
18+
{
19+
DevicesListBox.SelectedItem = devices[0];
20+
}
21+
}
22+
23+
public string? Selected { get { return selected; } }
24+
25+
private void cmdOpen_Clicked(object sender, EventArgs e)
26+
{
27+
selected = (string?)DevicesListBox.SelectedItem;
28+
CloseAsync(selected);
29+
}
30+
31+
private void cmdCancel_Clicked(object sender, EventArgs e)
32+
{
33+
selected = null;
34+
CloseAsync(selected);
35+
}
36+
}

gui/ReadDoc/ImageViewerPage.xaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<toolkit:Popup xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
4+
x:Class="ReadDoc.ImageViewerPage"
5+
xmlns:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/toolkit">
6+
7+
<Grid VerticalOptions="Fill" >
8+
<Grid.RowDefinitions>
9+
<RowDefinition Height="*"/>
10+
<RowDefinition Height="50"/>
11+
</Grid.RowDefinitions>
12+
<Image Grid.Row="0" Grid.Column="0" x:Name="Popup_Image" Aspect="AspectFit"/>
13+
<Button Grid.Row="1" Grid.Column="0" x:Name="cmdClose" Text="Close" HeightRequest="40" HorizontalOptions="Center" Clicked="cmdClose_Clicked"/>
14+
</Grid>
15+
16+
</toolkit:Popup>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
using CommunityToolkit.Maui.Views;
2+
3+
namespace ReadDoc;
4+
5+
public partial class ImageViewerPage : Popup
6+
{
7+
public ImageViewerPage()
8+
{
9+
InitializeComponent();
10+
}
11+
12+
public void SetImage(ImageSource image)
13+
{
14+
Popup_Image.Source = image;
15+
}
16+
17+
private void cmdClose_Clicked(object sender, EventArgs e)
18+
{
19+
Close();
20+
}
21+
}

0 commit comments

Comments
 (0)