From a480a564add55311ac9e7304bfda0046a7f0909e Mon Sep 17 00:00:00 2001 From: lobroda Date: Fri, 20 Oct 2023 09:12:27 +0100 Subject: [PATCH] ADD : Start Camera Scan implementation --- LivreLand/AppShell.xaml.cs | 1 + LivreLand/LivreLand.csproj | 4 + LivreLand/MauiProgram.cs | 8 +- .../Platforms/Android/AndroidManifest.xml | 1 + .../ContentViews/PopupHomePlusButtonView.xaml | 8 +- LivreLand/View/DetailsLivreView.xaml | 3 +- LivreLand/View/ScanView.xaml | 61 +++++++++ LivreLand/View/ScanView.xaml.cs | 23 ++++ LivreLand/ViewModel/ScanVM.cs | 129 ++++++++++++++++++ ViewModels/ManagerVM.cs | 3 + 10 files changed, 234 insertions(+), 7 deletions(-) create mode 100644 LivreLand/View/ScanView.xaml create mode 100644 LivreLand/View/ScanView.xaml.cs create mode 100644 LivreLand/ViewModel/ScanVM.cs diff --git a/LivreLand/AppShell.xaml.cs b/LivreLand/AppShell.xaml.cs index 3a9374d..83caf95 100644 --- a/LivreLand/AppShell.xaml.cs +++ b/LivreLand/AppShell.xaml.cs @@ -15,6 +15,7 @@ public partial class AppShell : Shell Routing.RegisterRoute("library/date/", typeof(FiltrageDateView)); Routing.RegisterRoute("library/note/", typeof(FiltrageNoteView)); Routing.RegisterRoute("library/contacts/", typeof(ContactsView)); + Routing.RegisterRoute("library/scan/", typeof(ScanView)); Routing.RegisterRoute("library/tous/details/", typeof(DetailsLivreView)); InitializeComponent(); } diff --git a/LivreLand/LivreLand.csproj b/LivreLand/LivreLand.csproj index 47c0609..8fac7be 100644 --- a/LivreLand/LivreLand.csproj +++ b/LivreLand/LivreLand.csproj @@ -53,6 +53,7 @@ + @@ -137,6 +138,9 @@ MSBuild:Compile + + MSBuild:Compile + MSBuild:Compile diff --git a/LivreLand/MauiProgram.cs b/LivreLand/MauiProgram.cs index 64b132b..5844d00 100644 --- a/LivreLand/MauiProgram.cs +++ b/LivreLand/MauiProgram.cs @@ -1,4 +1,5 @@ -using CommunityToolkit.Maui; +using Camera.MAUI; +using CommunityToolkit.Maui; using LivreLand.View; using LivreLand.View.ContentViews; using LivreLand.ViewModel; @@ -17,6 +18,7 @@ public static class MauiProgram builder .UseMauiApp() .UseMauiCommunityToolkit() + .UseMauiCameraView() .ConfigureFonts(fonts => { fonts.AddFont("SF-Compact-Display-Black.otf", "SFCompactDisplayBlack"); @@ -35,6 +37,7 @@ public static class MauiProgram .AddSingleton() .AddSingleton() .AddSingleton() + .AddSingleton() .AddSingleton() @@ -54,7 +57,8 @@ public static class MauiProgram .AddSingleton() .AddSingleton() .AddSingleton() - .AddSingleton(); + .AddSingleton() + .AddSingleton(); #if DEBUG builder.Logging.AddDebug(); diff --git a/LivreLand/Platforms/Android/AndroidManifest.xml b/LivreLand/Platforms/Android/AndroidManifest.xml index e9937ad..f89971c 100644 --- a/LivreLand/Platforms/Android/AndroidManifest.xml +++ b/LivreLand/Platforms/Android/AndroidManifest.xml @@ -3,4 +3,5 @@ + \ No newline at end of file diff --git a/LivreLand/View/ContentViews/PopupHomePlusButtonView.xaml b/LivreLand/View/ContentViews/PopupHomePlusButtonView.xaml index 8185e04..9b3b577 100644 --- a/LivreLand/View/ContentViews/PopupHomePlusButtonView.xaml +++ b/LivreLand/View/ContentViews/PopupHomePlusButtonView.xaml @@ -26,10 +26,6 @@ Margin="10,5,10,5">