Skip to content

Commit

Permalink
auto update
Browse files Browse the repository at this point in the history
  • Loading branch information
Jenkins committed Jul 19, 2024
1 parent 130b8f4 commit 818bc4a
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 75 deletions.
101 changes: 53 additions & 48 deletions DocumentReaderSample/DocumentReaderSample.csproj
Original file line number Diff line number Diff line change
@@ -1,48 +1,53 @@
<?xml version="1.0"?>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net8.0-android;net8.0-ios;</TargetFrameworks>
<OutputType>Exe</OutputType>
<RootNamespace>DocumentReaderSample</RootNamespace>
<UseMaui>true</UseMaui>
<SingleProject>true</SingleProject>
<ImplicitUsings>enable</ImplicitUsings>
<EmbedAssembliesIntoApk>true</EmbedAssembliesIntoApk>
<NoWarn>MT4189;MT4178;NETSDK1201</NoWarn>
<ApplicationTitle>DocumentReaderSample</ApplicationTitle>
<ApplicationId Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">regula.DocumentReader</ApplicationId>
<ApplicationId Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">com.regula.dr.fullrfid</ApplicationId>
<CodesignEntitlements>Platforms\iOS\Entitlements.plist</CodesignEntitlements>
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
<ApplicationVersion>1</ApplicationVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">11.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">23.0</SupportedOSPlatformVersion>
</PropertyGroup>
<ItemGroup>
<MauiIcon Include="Resources\AppIcon\appicon.svg" ForegroundFile="Resources\AppIcon\appiconfg.svg" Color="#512BD4"/>
<MauiSplashScreen Include="Resources\Splash\splash.svg" Color="#512BD4" BaseSize="128,128"/>
<MauiImage Include="Resources\Images\*"/>
<MauiFont Include="Resources\Fonts\*"/>
<MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)"/>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="7.0.0"/>
<PackageReference Include="Microsoft.Maui.Controls" Version="8.0.6"/>
</ItemGroup>
<ItemGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">
<PackageReference Include="Xamarin.DocumentReader.BTDevice.iOS" Version="6.8.318"/>
<PackageReference Include="Xamarin.DocumentReader.Api.iOS" Version="7.2.3545"/>
<PackageReference Include="Xamarin.DocumentReader.Core.FullRfid.iOS" Version="7.2.9111"/>
</ItemGroup>
<ItemGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">
<PackageReference Include="Xamarin.DocumentReader.BTDevice.Android" Version="1.1.394"/>
<PackageReference Include="Xamarin.DocumentReader.Api.Android" Version="7.2.9835"/>
<PackageReference Include="Xamarin.DocumentReader.Core.FullRfid.Android" Version="7.2.10867"/>
</ItemGroup>
<ItemGroup>
<AndroidAsset Include="Resources\Raw\regula.license"/>
</ItemGroup>
<ItemGroup>
<BundleResource Include="Resources\Raw\regula.license"/>
</ItemGroup>
</Project>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net8.0-android;net8.0-ios;</TargetFrameworks>
<OutputType>Exe</OutputType>
<RootNamespace>DocumentReaderSample</RootNamespace>
<UseMaui>true</UseMaui>
<SingleProject>true</SingleProject>
<ImplicitUsings>enable</ImplicitUsings>
<EmbedAssembliesIntoApk>true</EmbedAssembliesIntoApk>
<NoWarn>MT4189;MT4178;NETSDK1201;XC0022</NoWarn>

<ApplicationTitle>DocumentReaderSample</ApplicationTitle>
<ApplicationId Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">regula.DocumentReader</ApplicationId>
<ApplicationId Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">com.regula.dr.fullrfid</ApplicationId>
<CodesignEntitlements>Platforms\iOS\Entitlements.plist</CodesignEntitlements>

<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
<ApplicationVersion>1</ApplicationVersion>

<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">11.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">23.0</SupportedOSPlatformVersion>
</PropertyGroup>

<ItemGroup>
<MauiIcon Include="Resources\AppIcon\appicon.svg" ForegroundFile="Resources\AppIcon\appiconfg.svg" Color="#512BD4" />
<MauiSplashScreen Include="Resources\Splash\splash.svg" Color="#512BD4" BaseSize="128,128" />
<MauiImage Include="Resources\Images\*" />
<MauiFont Include="Resources\Fonts\*" />
<MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="7.0.0" />
<PackageReference Include="Microsoft.Maui.Controls" Version="8.0.7" />
</ItemGroup>

<ItemGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">
<PackageReference Include="Xamarin.DocumentReader.BTDevice.iOS" Version="6.8.318"/>
<PackageReference Include="Xamarin.DocumentReader.Api.iOS" Version="7.2.3545"/>
<PackageReference Include="Xamarin.DocumentReader.Core.FullAuthRFID.iOS" Version="7.3.365"/>
</ItemGroup>
<ItemGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">
<PackageReference Include="Xamarin.DocumentReader.BTDevice.Android" Version="1.1.394"/>
<PackageReference Include="Xamarin.DocumentReader.Api.Android" Version="7.2.9835"/>
<PackageReference Include="Xamarin.DocumentReader.Core.FullAuthRFID.Android" Version="7.3.365"/>
</ItemGroup>

<ItemGroup>
<AndroidAsset Include="Resources\Raw\regula.license" />
</ItemGroup>
<ItemGroup>
<BundleResource Include="Resources\Raw\regula.license" />
</ItemGroup>
</Project>
10 changes: 5 additions & 5 deletions DocumentReaderSample/MainPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@
</StackLayout>
</StackLayout>
<Label Text="Available Scenarios" HorizontalOptions="Center" Grid.Row="2" Margin="0,10,0,10"/>
<ListView x:Name="ScenariosListView" ItemsSource="{Binding Scenarios}" ItemSelected="ListView_ItemSelected" SelectionMode="Single" Grid.Row="3">
<ListView.ItemTemplate>
<CollectionView x:Name="ScenariosListView" SelectionMode="Single" Grid.Row="3">
<CollectionView.ItemTemplate>
<DataTemplate>
<TextCell Text="{Binding Name}" TextColor="Black" />
<Label Text="{Binding .}" TextColor="Black" Padding="12" VerticalTextAlignment="Center" />
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</CollectionView.ItemTemplate>
</CollectionView>
<Editor x:Name="BTDeviceName" IsVisible="false" Placeholder="Regula 0000" Grid.Row="4"/>
<StackLayout Orientation="Horizontal" Grid.Row="5">
<Button HorizontalOptions="FillAndExpand" Margin="5,15,5,0" Text="Show scanner" Clicked="ShowScanner_Clicked" />
Expand Down
17 changes: 9 additions & 8 deletions DocumentReaderSample/MainPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ public partial class MainPage : ContentPage
{
static readonly bool btDeviceSample = false;
readonly IDocReaderScanner docReaderScanner;
static List<string> Scenarios = [];
public MainPage()
{
InitializeComponent();
Expand Down Expand Up @@ -34,8 +35,14 @@ public MainPage()
{
if (e.IsSuccess)
{
BindingContext = new MainViewModel(e.Scenarios);
ScenariosListView.SelectedItem = e.Scenarios[0];
foreach (Scenario scenario in e.Scenarios) { Scenarios.Add(scenario.Name); }
ScenariosListView.ItemsSource = Scenarios;
ScenariosListView.SelectedItem = Scenarios[0];
ScenariosListView.SelectionChanged += (object sender, SelectionChangedEventArgs e) =>
{
string scenario = e.CurrentSelection.FirstOrDefault() as string;
docReaderScanner.SelectScenario(scenario);
};
RfidLayout.IsVisible = e.IsRfidAvailable;
NamesLabels.Text = "Ready";
}
Expand All @@ -52,7 +59,6 @@ void ShowScanner_Clicked(object sender, EventArgs evt)
async void RecognizeImage_Clicked(object sender, EventArgs evt)
{
ClearResults();
(sender as Button).IsEnabled = false;
Stream stream = await DependencyService.Get<IPhotoPickerService>().GetImageStreamAsync();
if (stream != null)
{
Expand All @@ -61,11 +67,6 @@ async void RecognizeImage_Clicked(object sender, EventArgs evt)
}
(sender as Button).IsEnabled = true;
}
void ListView_ItemSelected(object sender, SelectedItemChangedEventArgs e)
{
Scenario scenario = e.SelectedItem as Scenario;
docReaderScanner.SelectScenario(scenario.Name);
}
void ClearResults()
{
NamesLabels.Text = "";
Expand Down
14 changes: 0 additions & 14 deletions DocumentReaderSample/MainViewModel.cs

This file was deleted.

0 comments on commit 818bc4a

Please sign in to comment.