diff --git a/.github/dependabot.yml b/.github/dependabot.yml
index 5e8f8094..d6ab3d47 100644
--- a/.github/dependabot.yml
+++ b/.github/dependabot.yml
@@ -9,16 +9,16 @@ updates:
assignees:
- "VladislavAntonyuk"
open-pull-requests-limit: 10
-groups:
- Microsoft:
- patterns:
- - "Microsoft*"
- Syncfusion:
- patterns:
- - "Syncfusion*"
- CommunityToolkit:
- patterns:
- - "CommunityToolkit*"
- SQLitePCLRaw:
- patterns:
- - "SQLitePCLRaw*"
+ groups:
+ Microsoft:
+ patterns:
+ - "Microsoft*"
+ Syncfusion:
+ patterns:
+ - "Syncfusion*"
+ CommunityToolkit:
+ patterns:
+ - "CommunityToolkit*"
+ SQLitePCLRaw:
+ patterns:
+ - "SQLitePCLRaw*"
diff --git a/task-list-app-maui/App.xaml b/Database/MauiTaskListApp/App.xaml
similarity index 82%
rename from task-list-app-maui/App.xaml
rename to Database/MauiTaskListApp/App.xaml
index c04bf21c..e58561f7 100644
--- a/task-list-app-maui/App.xaml
+++ b/Database/MauiTaskListApp/App.xaml
@@ -1,14 +1,14 @@
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
diff --git a/task-list-app-maui/App.xaml.cs b/Database/MauiTaskListApp/App.xaml.cs
similarity index 73%
rename from task-list-app-maui/App.xaml.cs
rename to Database/MauiTaskListApp/App.xaml.cs
index c8095f68..a78fb116 100644
--- a/task-list-app-maui/App.xaml.cs
+++ b/Database/MauiTaskListApp/App.xaml.cs
@@ -1,11 +1,11 @@
-namespace task_list_app_maui;
-
-public partial class App : Application
-{
- public App()
- {
- InitializeComponent();
-
- MainPage = new AppShell();
- }
+namespace MauiTaskListApp;
+
+public partial class App : Application
+{
+ public App()
+ {
+ InitializeComponent();
+
+ MainPage = new AppShell();
+ }
}
\ No newline at end of file
diff --git a/task-list-app-maui/AppShell.xaml b/Database/MauiTaskListApp/AppShell.xaml
similarity index 68%
rename from task-list-app-maui/AppShell.xaml
rename to Database/MauiTaskListApp/AppShell.xaml
index 39337c60..3bb205e4 100644
--- a/task-list-app-maui/AppShell.xaml
+++ b/Database/MauiTaskListApp/AppShell.xaml
@@ -1,34 +1,34 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/task-list-app-maui/AppShell.xaml.cs b/Database/MauiTaskListApp/AppShell.xaml.cs
similarity index 86%
rename from task-list-app-maui/AppShell.xaml.cs
rename to Database/MauiTaskListApp/AppShell.xaml.cs
index 709f5a97..36d159a8 100644
--- a/task-list-app-maui/AppShell.xaml.cs
+++ b/Database/MauiTaskListApp/AppShell.xaml.cs
@@ -1,19 +1,19 @@
-namespace task_list_app_maui;
-
-public partial class AppShell : Shell
-{
- public AppShell()
- {
- InitializeComponent();
- }
-
- private void OnSearchClicked(object sender, EventArgs e)
- {
- DisplayAlert(Title, "Search Tasks", "OK");
- }
-
- private void OnAboutClicked(object sender, EventArgs e)
- {
- DisplayAlert(Title, "Information about the Task List app", "OK");
- }
+namespace MauiTaskListApp;
+
+public partial class AppShell : Shell
+{
+ public AppShell()
+ {
+ InitializeComponent();
+ }
+
+ private void OnSearchClicked(object sender, EventArgs e)
+ {
+ DisplayAlert(Title, "Search Tasks", "OK");
+ }
+
+ private void OnAboutClicked(object sender, EventArgs e)
+ {
+ DisplayAlert(Title, "Information about the Task List app", "OK");
+ }
}
\ No newline at end of file
diff --git a/Database/MauiTaskListApp/Data/AppDbContext.cs b/Database/MauiTaskListApp/Data/AppDbContext.cs
new file mode 100644
index 00000000..e1cf1b40
--- /dev/null
+++ b/Database/MauiTaskListApp/Data/AppDbContext.cs
@@ -0,0 +1,9 @@
+namespace MauiTaskListApp.Data;
+
+using Microsoft.EntityFrameworkCore;
+using Models;
+
+public class AppDbContext(DbContextOptions options) : DbContext(options)
+{
+ public DbSet Tasks => Set();
+}
\ No newline at end of file
diff --git a/task-list-app-maui/MauiProgram.cs b/Database/MauiTaskListApp/MauiProgram.cs
similarity index 53%
rename from task-list-app-maui/MauiProgram.cs
rename to Database/MauiTaskListApp/MauiProgram.cs
index 5042fc3b..9d02bb8b 100644
--- a/task-list-app-maui/MauiProgram.cs
+++ b/Database/MauiTaskListApp/MauiProgram.cs
@@ -1,32 +1,32 @@
-using CommunityToolkit.Maui;
-using Microsoft.EntityFrameworkCore;
-using task_list_app_maui.Data;
-using task_list_app_maui.ViewModels;
-using task_list_app_maui.Views;
-
-namespace task_list_app_maui;
-
-public static class MauiProgram
-{
- public static MauiApp CreateMauiApp()
- {
- var builder = MauiApp.CreateBuilder();
- builder
- .UseMauiApp()
- .UseMauiCommunityToolkit()
- .ConfigureFonts(fonts =>
- {
- fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
- fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
- });
-
- builder.Services.AddDbContext(options => { options.UseInMemoryDatabase("task-list-app-maui"); });
-
- builder.Services.AddSingleton();
-
- builder.Services.AddSingleton();
- builder.Services.AddSingleton();
-
- return builder.Build();
- }
+namespace MauiTaskListApp;
+
+using CommunityToolkit.Maui;
+using Data;
+using Microsoft.EntityFrameworkCore;
+using ViewModels;
+using Views;
+
+public static class MauiProgram
+{
+ public static MauiApp CreateMauiApp()
+ {
+ var builder = MauiApp.CreateBuilder();
+ builder
+ .UseMauiApp()
+ .UseMauiCommunityToolkit()
+ .ConfigureFonts(fonts =>
+ {
+ fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
+ fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
+ });
+
+ builder.Services.AddDbContext(options => { options.UseInMemoryDatabase("MauiTaskListApp"); });
+
+ builder.Services.AddSingleton();
+
+ builder.Services.AddSingleton();
+ builder.Services.AddSingleton();
+
+ return builder.Build();
+ }
}
\ No newline at end of file
diff --git a/task-list-app-maui/task-list-app-maui.csproj b/Database/MauiTaskListApp/MauiTaskListApp.csproj
similarity index 86%
rename from task-list-app-maui/task-list-app-maui.csproj
rename to Database/MauiTaskListApp/MauiTaskListApp.csproj
index 0f4fa6c7..890745bd 100644
--- a/task-list-app-maui/task-list-app-maui.csproj
+++ b/Database/MauiTaskListApp/MauiTaskListApp.csproj
@@ -1,38 +1,38 @@
-
-
-
- Exe
- task_list_app_maui
-
-
- Task List
-
-
- jfs-dev.task-list-app-maui
-
-
- 1.0
- 1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+ Exe
+ MauiTaskListApp
+
+
+ Task List
+
+
+ jfs-dev.task-list-app-maui
+
+
+ 1.0
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Database/MauiTaskListApp/Models/Task.cs b/Database/MauiTaskListApp/Models/Task.cs
new file mode 100644
index 00000000..fe0bd8b5
--- /dev/null
+++ b/Database/MauiTaskListApp/Models/Task.cs
@@ -0,0 +1,26 @@
+namespace MauiTaskListApp.Models;
+
+using System.ComponentModel.DataAnnotations;
+using CommunityToolkit.Mvvm.ComponentModel;
+
+public class Task : ObservableValidator
+{
+ private int id;
+ private string description = string.Empty;
+ private DateTime date;
+ private bool isFinished;
+
+ [Key]
+ [Required]
+ public int Id { get => id; set => SetProperty(ref id, value, true); }
+
+ [Required]
+ [MaxLength(60)]
+ public string Description { get => description; set => SetProperty(ref description, value, true); }
+
+ [Required]
+ public DateTime Date { get => date; set => SetProperty(ref date, value, true); }
+
+ [Required]
+ public bool IsFinished { get => isFinished; set => SetProperty(ref isFinished, value, true); }
+}
\ No newline at end of file
diff --git a/task-list-app-maui/Platforms/Android/AndroidManifest.xml b/Database/MauiTaskListApp/Platforms/Android/AndroidManifest.xml
similarity index 98%
rename from task-list-app-maui/Platforms/Android/AndroidManifest.xml
rename to Database/MauiTaskListApp/Platforms/Android/AndroidManifest.xml
index bdec9b59..e9937ad7 100644
--- a/task-list-app-maui/Platforms/Android/AndroidManifest.xml
+++ b/Database/MauiTaskListApp/Platforms/Android/AndroidManifest.xml
@@ -1,6 +1,6 @@
-
-
-
-
-
+
+
+
+
+
\ No newline at end of file
diff --git a/task-list-app-maui/Platforms/Android/MainActivity.cs b/Database/MauiTaskListApp/Platforms/Android/MainActivity.cs
similarity index 80%
rename from task-list-app-maui/Platforms/Android/MainActivity.cs
rename to Database/MauiTaskListApp/Platforms/Android/MainActivity.cs
index 9cf2b675..696da56b 100644
--- a/task-list-app-maui/Platforms/Android/MainActivity.cs
+++ b/Database/MauiTaskListApp/Platforms/Android/MainActivity.cs
@@ -1,10 +1,9 @@
-using Android.App;
-using Android.Content.PM;
-using Android.OS;
-
-namespace task_list_app_maui;
-
-[Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize | ConfigChanges.Density)]
-public class MainActivity : MauiAppCompatActivity
-{
+namespace MauiTaskListApp;
+
+using Android.App;
+using Android.Content.PM;
+
+[Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize | ConfigChanges.Density)]
+public class MainActivity : MauiAppCompatActivity
+{
}
\ No newline at end of file
diff --git a/task-list-app-maui/Platforms/Android/MainApplication.cs b/Database/MauiTaskListApp/Platforms/Android/MainApplication.cs
similarity index 80%
rename from task-list-app-maui/Platforms/Android/MainApplication.cs
rename to Database/MauiTaskListApp/Platforms/Android/MainApplication.cs
index 3151ac9e..7bc26add 100644
--- a/task-list-app-maui/Platforms/Android/MainApplication.cs
+++ b/Database/MauiTaskListApp/Platforms/Android/MainApplication.cs
@@ -1,15 +1,15 @@
-using Android.App;
-using Android.Runtime;
-
-namespace task_list_app_maui;
-
-[Application]
-public class MainApplication : MauiApplication
-{
- public MainApplication(IntPtr handle, JniHandleOwnership ownership)
- : base(handle, ownership)
- {
- }
-
- protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
+namespace MauiTaskListApp;
+
+using Android.App;
+using Android.Runtime;
+
+[Application]
+public class MainApplication : MauiApplication
+{
+ public MainApplication(IntPtr handle, JniHandleOwnership ownership)
+ : base(handle, ownership)
+ {
+ }
+
+ protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
}
\ No newline at end of file
diff --git a/task-list-app-maui/Platforms/Android/Resources/values/colors.xml b/Database/MauiTaskListApp/Platforms/Android/Resources/values/colors.xml
similarity index 97%
rename from task-list-app-maui/Platforms/Android/Resources/values/colors.xml
rename to Database/MauiTaskListApp/Platforms/Android/Resources/values/colors.xml
index 830abf19..61482f35 100644
--- a/task-list-app-maui/Platforms/Android/Resources/values/colors.xml
+++ b/Database/MauiTaskListApp/Platforms/Android/Resources/values/colors.xml
@@ -1,6 +1,6 @@
-
-
- #006400
- #006400
- #006400
-
+
+
+ #006400
+ #006400
+ #006400
+
diff --git a/task-list-app-maui/Platforms/MacCatalyst/AppDelegate.cs b/Database/MauiTaskListApp/Platforms/MacCatalyst/AppDelegate.cs
similarity index 73%
rename from task-list-app-maui/Platforms/MacCatalyst/AppDelegate.cs
rename to Database/MauiTaskListApp/Platforms/MacCatalyst/AppDelegate.cs
index e43a7ed6..cafcb44f 100644
--- a/task-list-app-maui/Platforms/MacCatalyst/AppDelegate.cs
+++ b/Database/MauiTaskListApp/Platforms/MacCatalyst/AppDelegate.cs
@@ -1,9 +1,9 @@
-using Foundation;
-
-namespace task_list_app_maui;
-
-[Register("AppDelegate")]
-public class AppDelegate : MauiUIApplicationDelegate
-{
- protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
+namespace MauiTaskListApp;
+
+using Foundation;
+
+[Register("AppDelegate")]
+public class AppDelegate : MauiUIApplicationDelegate
+{
+ protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
}
\ No newline at end of file
diff --git a/Sqlite/MauiSqlite/Platforms/MacCatalyst/Entitlements.Debug.plist b/Database/MauiTaskListApp/Platforms/MacCatalyst/Entitlements.Debug.plist
similarity index 100%
rename from Sqlite/MauiSqlite/Platforms/MacCatalyst/Entitlements.Debug.plist
rename to Database/MauiTaskListApp/Platforms/MacCatalyst/Entitlements.Debug.plist
diff --git a/Sqlite/MauiSqlite/Platforms/MacCatalyst/Entitlements.Release.plist b/Database/MauiTaskListApp/Platforms/MacCatalyst/Entitlements.Release.plist
similarity index 100%
rename from Sqlite/MauiSqlite/Platforms/MacCatalyst/Entitlements.Release.plist
rename to Database/MauiTaskListApp/Platforms/MacCatalyst/Entitlements.Release.plist
diff --git a/task-list-app-maui/Platforms/MacCatalyst/Info.plist b/Database/MauiTaskListApp/Platforms/MacCatalyst/Info.plist
similarity index 97%
rename from task-list-app-maui/Platforms/MacCatalyst/Info.plist
rename to Database/MauiTaskListApp/Platforms/MacCatalyst/Info.plist
index f24aacc0..72689771 100644
--- a/task-list-app-maui/Platforms/MacCatalyst/Info.plist
+++ b/Database/MauiTaskListApp/Platforms/MacCatalyst/Info.plist
@@ -1,38 +1,38 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
- UIDeviceFamily
-
- 2
-
- UIRequiredDeviceCapabilities
-
- arm64
-
- UISupportedInterfaceOrientations
-
- UIInterfaceOrientationPortrait
- UIInterfaceOrientationLandscapeLeft
- UIInterfaceOrientationLandscapeRight
-
- UISupportedInterfaceOrientations~ipad
-
- UIInterfaceOrientationPortrait
- UIInterfaceOrientationPortraitUpsideDown
- UIInterfaceOrientationLandscapeLeft
- UIInterfaceOrientationLandscapeRight
-
- XSAppIconAssets
- Assets.xcassets/appicon.appiconset
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+ UIDeviceFamily
+
+ 2
+
+ UIRequiredDeviceCapabilities
+
+ arm64
+
+ UISupportedInterfaceOrientations
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ UISupportedInterfaceOrientations~ipad
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationPortraitUpsideDown
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ XSAppIconAssets
+ Assets.xcassets/appicon.appiconset
+
+
diff --git a/task-list-app-maui/Platforms/iOS/Program.cs b/Database/MauiTaskListApp/Platforms/MacCatalyst/Program.cs
similarity index 81%
rename from task-list-app-maui/Platforms/iOS/Program.cs
rename to Database/MauiTaskListApp/Platforms/MacCatalyst/Program.cs
index f0bdb273..e5b3a76d 100644
--- a/task-list-app-maui/Platforms/iOS/Program.cs
+++ b/Database/MauiTaskListApp/Platforms/MacCatalyst/Program.cs
@@ -1,15 +1,14 @@
-using ObjCRuntime;
-using UIKit;
-
-namespace task_list_app_maui;
-
-public class Program
-{
- // This is the main entry point of the application.
- static void Main(string[] args)
- {
- // if you want to use a different Application Delegate class from "AppDelegate"
- // you can specify it here.
- UIApplication.Main(args, null, typeof(AppDelegate));
- }
+namespace MauiTaskListApp;
+
+using UIKit;
+
+public class Program
+{
+ // This is the main entry point of the application.
+ static void Main(string[] args)
+ {
+ // if you want to use a different Application Delegate class from "AppDelegate"
+ // you can specify it here.
+ UIApplication.Main(args, null, typeof(AppDelegate));
+ }
}
\ No newline at end of file
diff --git a/task-list-app-maui/Platforms/Tizen/Main.cs b/Database/MauiTaskListApp/Platforms/Tizen/Main.cs
similarity index 85%
rename from task-list-app-maui/Platforms/Tizen/Main.cs
rename to Database/MauiTaskListApp/Platforms/Tizen/Main.cs
index 7d362d1e..892307bb 100644
--- a/task-list-app-maui/Platforms/Tizen/Main.cs
+++ b/Database/MauiTaskListApp/Platforms/Tizen/Main.cs
@@ -1,16 +1,16 @@
-using System;
-using Microsoft.Maui;
-using Microsoft.Maui.Hosting;
-
-namespace task_list_app_maui;
-
-class Program : MauiApplication
-{
- protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
-
- static void Main(string[] args)
- {
- var app = new Program();
- app.Run(args);
- }
+using System;
+using Microsoft.Maui;
+using Microsoft.Maui.Hosting;
+
+namespace MauiTaskListApp;
+
+class Program : MauiApplication
+{
+ protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
+
+ static void Main(string[] args)
+ {
+ var app = new Program();
+ app.Run(args);
+ }
}
\ No newline at end of file
diff --git a/task-list-app-maui/Platforms/Tizen/tizen-manifest.xml b/Database/MauiTaskListApp/Platforms/Tizen/tizen-manifest.xml
similarity index 83%
rename from task-list-app-maui/Platforms/Tizen/tizen-manifest.xml
rename to Database/MauiTaskListApp/Platforms/Tizen/tizen-manifest.xml
index 81aeafab..d22821b8 100644
--- a/task-list-app-maui/Platforms/Tizen/tizen-manifest.xml
+++ b/Database/MauiTaskListApp/Platforms/Tizen/tizen-manifest.xml
@@ -1,15 +1,15 @@
-
-
-
-
-
- maui-appicon-placeholder
-
-
-
-
- http://tizen.org/privilege/internet
-
-
-
+
+
+
+
+
+ maui-appicon-placeholder
+
+
+
+
+ http://tizen.org/privilege/internet
+
+
+
\ No newline at end of file
diff --git a/task-list-app-maui/Platforms/Windows/App.xaml b/Database/MauiTaskListApp/Platforms/Windows/App.xaml
similarity index 69%
rename from task-list-app-maui/Platforms/Windows/App.xaml
rename to Database/MauiTaskListApp/Platforms/Windows/App.xaml
index 50457c20..ba13d3d8 100644
--- a/task-list-app-maui/Platforms/Windows/App.xaml
+++ b/Database/MauiTaskListApp/Platforms/Windows/App.xaml
@@ -1,8 +1,8 @@
-
-
-
+
+
+
diff --git a/task-list-app-maui/Platforms/Windows/App.xaml.cs b/Database/MauiTaskListApp/Platforms/Windows/App.xaml.cs
similarity index 88%
rename from task-list-app-maui/Platforms/Windows/App.xaml.cs
rename to Database/MauiTaskListApp/Platforms/Windows/App.xaml.cs
index b8abd746..863676f1 100644
--- a/task-list-app-maui/Platforms/Windows/App.xaml.cs
+++ b/Database/MauiTaskListApp/Platforms/Windows/App.xaml.cs
@@ -1,23 +1,23 @@
-using Microsoft.UI.Xaml;
-
-// To learn more about WinUI, the WinUI project structure,
-// and more about our project templates, see: http://aka.ms/winui-project-info.
-
-namespace task_list_app_maui.WinUI;
-
-///
-/// Provides application-specific behavior to supplement the default Application class.
-///
-public partial class App : MauiWinUIApplication
-{
- ///
- /// Initializes the singleton application object. This is the first line of authored code
- /// executed, and as such is the logical equivalent of main() or WinMain().
- ///
- public App()
- {
- this.InitializeComponent();
- }
-
- protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
+
+
+// To learn more about WinUI, the WinUI project structure,
+// and more about our project templates, see: http://aka.ms/winui-project-info.
+
+namespace MauiTaskListApp.WinUI;
+
+///
+/// Provides application-specific behavior to supplement the default Application class.
+///
+public partial class App : MauiWinUIApplication
+{
+ ///
+ /// Initializes the singleton application object. This is the first line of authored code
+ /// executed, and as such is the logical equivalent of main() or WinMain().
+ ///
+ public App()
+ {
+ this.InitializeComponent();
+ }
+
+ protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
}
\ No newline at end of file
diff --git a/task-list-app-maui/Platforms/Windows/Package.appxmanifest b/Database/MauiTaskListApp/Platforms/Windows/Package.appxmanifest
similarity index 97%
rename from task-list-app-maui/Platforms/Windows/Package.appxmanifest
rename to Database/MauiTaskListApp/Platforms/Windows/Package.appxmanifest
index 4d0e61bf..d8c2dde9 100644
--- a/task-list-app-maui/Platforms/Windows/Package.appxmanifest
+++ b/Database/MauiTaskListApp/Platforms/Windows/Package.appxmanifest
@@ -1,46 +1,46 @@
-
-
-
-
-
-
-
-
- $placeholder$
- User Name
- $placeholder$.png
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+ $placeholder$
+ User Name
+ $placeholder$.png
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/task-list-app-maui/Platforms/Windows/app.manifest b/Database/MauiTaskListApp/Platforms/Windows/app.manifest
similarity index 98%
rename from task-list-app-maui/Platforms/Windows/app.manifest
rename to Database/MauiTaskListApp/Platforms/Windows/app.manifest
index 655f75d1..cdd95935 100644
--- a/task-list-app-maui/Platforms/Windows/app.manifest
+++ b/Database/MauiTaskListApp/Platforms/Windows/app.manifest
@@ -1,15 +1,15 @@
-
-
-
-
-
-
-
- true/PM
- PerMonitorV2, PerMonitor
-
-
-
+
+
+
+
+
+
+
+ true/PM
+ PerMonitorV2, PerMonitor
+
+
+
diff --git a/task-list-app-maui/Platforms/iOS/AppDelegate.cs b/Database/MauiTaskListApp/Platforms/iOS/AppDelegate.cs
similarity index 73%
rename from task-list-app-maui/Platforms/iOS/AppDelegate.cs
rename to Database/MauiTaskListApp/Platforms/iOS/AppDelegate.cs
index e43a7ed6..cafcb44f 100644
--- a/task-list-app-maui/Platforms/iOS/AppDelegate.cs
+++ b/Database/MauiTaskListApp/Platforms/iOS/AppDelegate.cs
@@ -1,9 +1,9 @@
-using Foundation;
-
-namespace task_list_app_maui;
-
-[Register("AppDelegate")]
-public class AppDelegate : MauiUIApplicationDelegate
-{
- protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
+namespace MauiTaskListApp;
+
+using Foundation;
+
+[Register("AppDelegate")]
+public class AppDelegate : MauiUIApplicationDelegate
+{
+ protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
}
\ No newline at end of file
diff --git a/Sqlite/MauiSqlite/Platforms/iOS/Info.plist b/Database/MauiTaskListApp/Platforms/iOS/Info.plist
similarity index 100%
rename from Sqlite/MauiSqlite/Platforms/iOS/Info.plist
rename to Database/MauiTaskListApp/Platforms/iOS/Info.plist
diff --git a/task-list-app-maui/Platforms/MacCatalyst/Program.cs b/Database/MauiTaskListApp/Platforms/iOS/Program.cs
similarity index 81%
rename from task-list-app-maui/Platforms/MacCatalyst/Program.cs
rename to Database/MauiTaskListApp/Platforms/iOS/Program.cs
index f0bdb273..e5b3a76d 100644
--- a/task-list-app-maui/Platforms/MacCatalyst/Program.cs
+++ b/Database/MauiTaskListApp/Platforms/iOS/Program.cs
@@ -1,15 +1,14 @@
-using ObjCRuntime;
-using UIKit;
-
-namespace task_list_app_maui;
-
-public class Program
-{
- // This is the main entry point of the application.
- static void Main(string[] args)
- {
- // if you want to use a different Application Delegate class from "AppDelegate"
- // you can specify it here.
- UIApplication.Main(args, null, typeof(AppDelegate));
- }
+namespace MauiTaskListApp;
+
+using UIKit;
+
+public class Program
+{
+ // This is the main entry point of the application.
+ static void Main(string[] args)
+ {
+ // if you want to use a different Application Delegate class from "AppDelegate"
+ // you can specify it here.
+ UIApplication.Main(args, null, typeof(AppDelegate));
+ }
}
\ No newline at end of file
diff --git a/Sqlite/MauiSqlite/Properties/launchSettings.json b/Database/MauiTaskListApp/Properties/launchSettings.json
similarity index 100%
rename from Sqlite/MauiSqlite/Properties/launchSettings.json
rename to Database/MauiTaskListApp/Properties/launchSettings.json
diff --git a/Database/MauiTaskListApp/README.md b/Database/MauiTaskListApp/README.md
new file mode 100644
index 00000000..50f328c0
--- /dev/null
+++ b/Database/MauiTaskListApp/README.md
@@ -0,0 +1,7 @@
+# MauiTaskListApp
+
+[![Buy Me A Coffee](https://ik.imagekit.io/VladislavAntonyuk/vladislavantonyuk/misc/bmc-button.png)](https://www.buymeacoffee.com/vlad.antonyuk)
+
+Cross-platform .NET MAUI app using MVVM development architecture performing CRUD operations with EF Core InMemory.
+
+[![Stand With Ukraine](https://img.shields.io/badge/made_in-ukraine-ffd700.svg?labelColor=0057b7)](https://stand-with-ukraine.pp.ua)
\ No newline at end of file
diff --git a/Database/MauiTaskListApp/README.mdpp b/Database/MauiTaskListApp/README.mdpp
new file mode 100644
index 00000000..7b8b415d
--- /dev/null
+++ b/Database/MauiTaskListApp/README.mdpp
@@ -0,0 +1,7 @@
+# MauiTaskListApp
+
+!INCLUDE "./md/header.mdpp"
+
+Cross-platform .NET MAUI app using MVVM development architecture performing CRUD operations with EF Core InMemory.
+
+!INCLUDE "./md/footer.mdpp"
\ No newline at end of file
diff --git a/task-list-app-maui/Resources/AppIcon/appicon.svg b/Database/MauiTaskListApp/Resources/AppIcon/appicon.svg
similarity index 100%
rename from task-list-app-maui/Resources/AppIcon/appicon.svg
rename to Database/MauiTaskListApp/Resources/AppIcon/appicon.svg
diff --git a/task-list-app-maui/Resources/Fonts/OpenSans-Regular.ttf b/Database/MauiTaskListApp/Resources/Fonts/OpenSans-Regular.ttf
similarity index 100%
rename from task-list-app-maui/Resources/Fonts/OpenSans-Regular.ttf
rename to Database/MauiTaskListApp/Resources/Fonts/OpenSans-Regular.ttf
diff --git a/task-list-app-maui/Resources/Fonts/OpenSans-Semibold.ttf b/Database/MauiTaskListApp/Resources/Fonts/OpenSans-Semibold.ttf
similarity index 100%
rename from task-list-app-maui/Resources/Fonts/OpenSans-Semibold.ttf
rename to Database/MauiTaskListApp/Resources/Fonts/OpenSans-Semibold.ttf
diff --git a/task-list-app-maui/Resources/Images/delete.svg b/Database/MauiTaskListApp/Resources/Images/delete.svg
similarity index 98%
rename from task-list-app-maui/Resources/Images/delete.svg
rename to Database/MauiTaskListApp/Resources/Images/delete.svg
index c628695b..c6dee2bc 100644
--- a/task-list-app-maui/Resources/Images/delete.svg
+++ b/Database/MauiTaskListApp/Resources/Images/delete.svg
@@ -1,35 +1,35 @@
-
-
+
+ Layer 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/task-list-app-maui/Resources/Images/dotnet_bot.svg b/Database/MauiTaskListApp/Resources/Images/dotnet_bot.svg
similarity index 99%
rename from task-list-app-maui/Resources/Images/dotnet_bot.svg
rename to Database/MauiTaskListApp/Resources/Images/dotnet_bot.svg
index 51b1c330..abfaff26 100644
--- a/task-list-app-maui/Resources/Images/dotnet_bot.svg
+++ b/Database/MauiTaskListApp/Resources/Images/dotnet_bot.svg
@@ -1,93 +1,93 @@
-
+
diff --git a/task-list-app-maui/Resources/Images/edit.svg b/Database/MauiTaskListApp/Resources/Images/edit.svg
similarity index 100%
rename from task-list-app-maui/Resources/Images/edit.svg
rename to Database/MauiTaskListApp/Resources/Images/edit.svg
diff --git a/task-list-app-maui/Resources/Images/home.svg b/Database/MauiTaskListApp/Resources/Images/home.svg
similarity index 100%
rename from task-list-app-maui/Resources/Images/home.svg
rename to Database/MauiTaskListApp/Resources/Images/home.svg
diff --git a/task-list-app-maui/Resources/Images/save.svg b/Database/MauiTaskListApp/Resources/Images/save.svg
similarity index 100%
rename from task-list-app-maui/Resources/Images/save.svg
rename to Database/MauiTaskListApp/Resources/Images/save.svg
diff --git a/task-list-app-maui/Resources/Images/search.svg b/Database/MauiTaskListApp/Resources/Images/search.svg
similarity index 100%
rename from task-list-app-maui/Resources/Images/search.svg
rename to Database/MauiTaskListApp/Resources/Images/search.svg
diff --git a/task-list-app-maui/Resources/Images/task_check.svg b/Database/MauiTaskListApp/Resources/Images/task_check.svg
similarity index 100%
rename from task-list-app-maui/Resources/Images/task_check.svg
rename to Database/MauiTaskListApp/Resources/Images/task_check.svg
diff --git a/task-list-app-maui/Resources/Images/task_list.svg b/Database/MauiTaskListApp/Resources/Images/task_list.svg
similarity index 100%
rename from task-list-app-maui/Resources/Images/task_list.svg
rename to Database/MauiTaskListApp/Resources/Images/task_list.svg
diff --git a/task-list-app-maui/Resources/Raw/AboutAssets.txt b/Database/MauiTaskListApp/Resources/Raw/AboutAssets.txt
similarity index 97%
rename from task-list-app-maui/Resources/Raw/AboutAssets.txt
rename to Database/MauiTaskListApp/Resources/Raw/AboutAssets.txt
index 50b8a7b8..15d62448 100644
--- a/task-list-app-maui/Resources/Raw/AboutAssets.txt
+++ b/Database/MauiTaskListApp/Resources/Raw/AboutAssets.txt
@@ -1,15 +1,15 @@
-Any raw assets you want to be deployed with your application can be placed in
-this directory (and child directories). Deployment of the asset to your application
-is automatically handled by the following `MauiAsset` Build Action within your `.csproj`.
-
-
-
-These files will be deployed with you package and will be accessible using Essentials:
-
- async Task LoadMauiAsset()
- {
- using var stream = await FileSystem.OpenAppPackageFileAsync("AboutAssets.txt");
- using var reader = new StreamReader(stream);
-
- var contents = reader.ReadToEnd();
- }
+Any raw assets you want to be deployed with your application can be placed in
+this directory (and child directories). Deployment of the asset to your application
+is automatically handled by the following `MauiAsset` Build Action within your `.csproj`.
+
+
+
+These files will be deployed with you package and will be accessible using Essentials:
+
+ async Task LoadMauiAsset()
+ {
+ using var stream = await FileSystem.OpenAppPackageFileAsync("AboutAssets.txt");
+ using var reader = new StreamReader(stream);
+
+ var contents = reader.ReadToEnd();
+ }
diff --git a/task-list-app-maui/Resources/Splash/splash.svg b/Database/MauiTaskListApp/Resources/Splash/splash.svg
similarity index 100%
rename from task-list-app-maui/Resources/Splash/splash.svg
rename to Database/MauiTaskListApp/Resources/Splash/splash.svg
diff --git a/task-list-app-maui/Resources/Styles/Colors.xaml b/Database/MauiTaskListApp/Resources/Styles/Colors.xaml
similarity index 98%
rename from task-list-app-maui/Resources/Styles/Colors.xaml
rename to Database/MauiTaskListApp/Resources/Styles/Colors.xaml
index d19b6c19..f25c2905 100644
--- a/task-list-app-maui/Resources/Styles/Colors.xaml
+++ b/Database/MauiTaskListApp/Resources/Styles/Colors.xaml
@@ -1,46 +1,46 @@
-
-
-
-
-
-
- #006400
- #006400
- #006400
- White
- Black
- #E1E1E1
- #C8C8C8
- #ACACAC
- #919191
- #6E6E6E
- #404040
- #212121
- #141414
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- #F7B548
- #FFD590
- #FFE5B9
- #28C2D1
- #7BDDEF
- #C3F2F4
- #3E8EED
- #72ACF1
- #A7CBF6
-
-
+
+
+
+
+
+
+ #006400
+ #006400
+ #006400
+ White
+ Black
+ #E1E1E1
+ #C8C8C8
+ #ACACAC
+ #919191
+ #6E6E6E
+ #404040
+ #212121
+ #141414
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ #F7B548
+ #FFD590
+ #FFE5B9
+ #28C2D1
+ #7BDDEF
+ #C3F2F4
+ #3E8EED
+ #72ACF1
+ #A7CBF6
+
+
diff --git a/task-list-app-maui/Resources/Styles/Styles.xaml b/Database/MauiTaskListApp/Resources/Styles/Styles.xaml
similarity index 98%
rename from task-list-app-maui/Resources/Styles/Styles.xaml
rename to Database/MauiTaskListApp/Resources/Styles/Styles.xaml
index 2915ca1d..890ced07 100644
--- a/task-list-app-maui/Resources/Styles/Styles.xaml
+++ b/Database/MauiTaskListApp/Resources/Styles/Styles.xaml
@@ -1,408 +1,408 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Database/MauiTaskListApp/ViewModels/TasksViewModel.cs b/Database/MauiTaskListApp/ViewModels/TasksViewModel.cs
new file mode 100644
index 00000000..79d72c4a
--- /dev/null
+++ b/Database/MauiTaskListApp/ViewModels/TasksViewModel.cs
@@ -0,0 +1,119 @@
+namespace MauiTaskListApp.ViewModels;
+
+using System.Collections.ObjectModel;
+using CommunityToolkit.Mvvm.ComponentModel;
+using CommunityToolkit.Mvvm.Input;
+using Data;
+using Models;
+
+public sealed partial class TasksViewModel(AppDbContext context) : ObservableObject, IDisposable
+{
+ public ObservableCollection ActiveTasks { get; set; } = [];
+ public ObservableCollection FinishedTasks { get; set; } = [];
+
+ [ObservableProperty]
+ private Task task = new();
+
+ public Task TaskEditMode { get; set; } = new();
+
+ [ObservableProperty]
+ private string hasErrorsCodeBehind = string.Empty;
+
+ [RelayCommand]
+ private void New()
+ {
+ Task = new()
+ {
+ Date = DateTime.Now
+ };
+ }
+
+ [RelayCommand]
+ private void EditModeOn()
+ {
+ TaskEditMode.Id = Task.Id;
+ TaskEditMode.Description = Task.Description;
+ TaskEditMode.Date = Task.Date;
+ TaskEditMode.IsFinished = Task.IsFinished;
+ }
+
+ [RelayCommand]
+ private void EditModeOff()
+ {
+ Task.Id = TaskEditMode.Id;
+ Task.Description = TaskEditMode.Description;
+ Task.Date = TaskEditMode.Date;
+ Task.IsFinished = TaskEditMode.IsFinished;
+ }
+
+ [RelayCommand]
+ private void Create()
+ {
+ try
+ {
+ HasErrorsCodeBehind = string.Empty;
+
+ context.Add(Task);
+ context.SaveChanges();
+ }
+ catch (Exception ex)
+ {
+ HasErrorsCodeBehind = ex.Message;
+ }
+ }
+
+ [RelayCommand]
+ private void Edit()
+ {
+ try
+ {
+ HasErrorsCodeBehind = string.Empty;
+
+ context.SaveChanges();
+
+ EditModeOn();
+ }
+ catch (Exception ex)
+ {
+ HasErrorsCodeBehind = ex.Message;
+ }
+ }
+
+ [RelayCommand]
+ private void Delete()
+ {
+ try
+ {
+ HasErrorsCodeBehind = string.Empty;
+
+ context.Remove(Task);
+ context.SaveChanges();
+ }
+ catch (Exception ex)
+ {
+ HasErrorsCodeBehind = ex.Message;
+ }
+ }
+
+ [RelayCommand]
+ private void GetAll()
+ {
+ var tasks = context.Tasks.ToList();
+
+ ActiveTasks.Clear();
+
+ foreach (var unfinishedTask in tasks.Where(x => !x.IsFinished).OrderBy(x => x.Date))
+ {
+ ActiveTasks.Add(unfinishedTask);
+ }
+
+ FinishedTasks.Clear();
+
+ foreach (var finishedTask in tasks.Where(x => x.IsFinished).OrderByDescending(x => x.Date))
+ {
+ FinishedTasks.Add(finishedTask);
+ }
+ }
+
+ public void Dispose() => context.Dispose();
+}
\ No newline at end of file
diff --git a/task-list-app-maui/Views/AdicionarTarefaView.xaml b/Database/MauiTaskListApp/Views/AddTaskView.xaml
similarity index 83%
rename from task-list-app-maui/Views/AdicionarTarefaView.xaml
rename to Database/MauiTaskListApp/Views/AddTaskView.xaml
index f781bc85..e2c9227c 100644
--- a/task-list-app-maui/Views/AdicionarTarefaView.xaml
+++ b/Database/MauiTaskListApp/Views/AddTaskView.xaml
@@ -1,91 +1,93 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Database/MauiTaskListApp/Views/AddTaskView.xaml.cs b/Database/MauiTaskListApp/Views/AddTaskView.xaml.cs
new file mode 100644
index 00000000..100694d6
--- /dev/null
+++ b/Database/MauiTaskListApp/Views/AddTaskView.xaml.cs
@@ -0,0 +1,38 @@
+namespace MauiTaskListApp.Views;
+
+using ViewModels;
+
+public partial class AddTaskView : ContentPage
+{
+ private readonly TasksViewModel tasksViewModel;
+
+ public AddTaskView(TasksViewModel tasksViewModel)
+ {
+ InitializeComponent();
+
+ this.tasksViewModel = tasksViewModel;
+
+ BindingContext = this.tasksViewModel;
+ }
+
+ private async void OnSaveTaskClicked(object sender, EventArgs e)
+ {
+ tasksViewModel.CreateCommand.Execute(null);
+
+ if (!string.IsNullOrEmpty(tasksViewModel.HasErrorsCodeBehind))
+ {
+ await DisplayAlert(Title, tasksViewModel.HasErrorsCodeBehind, "OK");
+ }
+ else
+ {
+ tasksViewModel.GetAllCommand.Execute(null);
+
+ await Navigation.PopModalAsync();
+ }
+ }
+
+ private async void OnCloseAddTaskClicked(object sender, EventArgs e)
+ {
+ await Navigation.PopModalAsync();
+ }
+}
\ No newline at end of file
diff --git a/task-list-app-maui/Views/TarefasConcluidasView.xaml b/Database/MauiTaskListApp/Views/CompletedTasksView.xaml
similarity index 75%
rename from task-list-app-maui/Views/TarefasConcluidasView.xaml
rename to Database/MauiTaskListApp/Views/CompletedTasksView.xaml
index 271a55f3..f34faa12 100644
--- a/task-list-app-maui/Views/TarefasConcluidasView.xaml
+++ b/Database/MauiTaskListApp/Views/CompletedTasksView.xaml
@@ -1,62 +1,65 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Database/MauiTaskListApp/Views/CompletedTasksView.xaml.cs b/Database/MauiTaskListApp/Views/CompletedTasksView.xaml.cs
new file mode 100644
index 00000000..3caf5ff9
--- /dev/null
+++ b/Database/MauiTaskListApp/Views/CompletedTasksView.xaml.cs
@@ -0,0 +1,55 @@
+namespace MauiTaskListApp.Views;
+
+using Models;
+using ViewModels;
+
+public partial class CompletedTasksView : ContentPage
+{
+ private readonly TasksViewModel tasksViewModel;
+
+ public CompletedTasksView(TasksViewModel tasksViewModel)
+ {
+ InitializeComponent();
+
+ this.tasksViewModel = tasksViewModel;
+ this.tasksViewModel.GetAllCommand.Execute(null);
+
+ BindingContext = this.tasksViewModel;
+ }
+
+ private async void OnEditClicked(object sender, EventArgs e)
+ {
+ var imageButton = (ImageButton)sender;
+ var task = (Task)imageButton.BindingContext;
+
+ CollectionViewTarefasConcluidas.SelectedItem = task;
+
+ if (CollectionViewTarefasConcluidas.SelectedItem == null) return;
+
+ await Navigation.PushModalAsync(new EditTaskView(tasksViewModel));
+ }
+
+ private async void OnDeleteClicked(object sender, EventArgs e)
+ {
+ var imageButton = (ImageButton)sender;
+ var task = (Task)imageButton.BindingContext;
+
+ CollectionViewTarefasConcluidas.SelectedItem = task;
+
+ if (CollectionViewTarefasConcluidas.SelectedItem == null) return;
+
+ bool answer = await DisplayAlert(Title, "Do you confirm the deletion of this task?", "Yes", "No");
+ if (!answer) return;
+
+ tasksViewModel.DeleteCommand.Execute(null);
+
+ if (!string.IsNullOrEmpty(tasksViewModel.HasErrorsCodeBehind))
+ {
+ await DisplayAlert(Title, tasksViewModel.HasErrorsCodeBehind, "OK");
+ }
+ else
+ {
+ tasksViewModel.GetAllCommand.Execute(null);
+ }
+ }
+}
\ No newline at end of file
diff --git a/task-list-app-maui/Views/EditarTarefaView.xaml b/Database/MauiTaskListApp/Views/EditTaskView.xaml
similarity index 83%
rename from task-list-app-maui/Views/EditarTarefaView.xaml
rename to Database/MauiTaskListApp/Views/EditTaskView.xaml
index b9c29390..1889c4cb 100644
--- a/task-list-app-maui/Views/EditarTarefaView.xaml
+++ b/Database/MauiTaskListApp/Views/EditTaskView.xaml
@@ -1,101 +1,103 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/task-list-app-maui/Views/EditarTarefaView.xaml.cs b/Database/MauiTaskListApp/Views/EditTaskView.xaml.cs
similarity index 55%
rename from task-list-app-maui/Views/EditarTarefaView.xaml.cs
rename to Database/MauiTaskListApp/Views/EditTaskView.xaml.cs
index b8b81b79..e941aef8 100644
--- a/task-list-app-maui/Views/EditarTarefaView.xaml.cs
+++ b/Database/MauiTaskListApp/Views/EditTaskView.xaml.cs
@@ -1,42 +1,42 @@
-using task_list_app_maui.ViewModels;
-
-namespace task_list_app_maui.Views;
-
-public partial class EditarTarefaView : ContentPage
-{
- private readonly TarefasViewModel tarefasViewModel;
-
- public EditarTarefaView(TarefasViewModel tarefasViewModel)
- {
- InitializeComponent();
-
- this.tarefasViewModel = tarefasViewModel;
-
- BindingContext = this.tarefasViewModel;
-
- this.tarefasViewModel.EditModeOn();
- }
-
- private async void OnSaveTaskClicked(object sender, EventArgs e)
- {
- tarefasViewModel.Edit();
-
- if (!string.IsNullOrEmpty(tarefasViewModel.HasErrorsCodeBehind))
- {
- await DisplayAlert(Title, tarefasViewModel.HasErrorsCodeBehind, "OK");
- }
- else
- {
- tarefasViewModel.GetAll();
-
- await Navigation.PopModalAsync();
- }
- }
-
- private async void OnCloseEditTaskClicked(object sender, EventArgs e)
- {
- tarefasViewModel.EditModeOff();
-
- await Navigation.PopModalAsync();
- }
+namespace MauiTaskListApp.Views;
+
+using ViewModels;
+
+public partial class EditTaskView : ContentPage
+{
+ private readonly TasksViewModel tarefasViewModel;
+
+ public EditTaskView(TasksViewModel tarefasViewModel)
+ {
+ InitializeComponent();
+
+ this.tarefasViewModel = tarefasViewModel;
+
+ BindingContext = this.tarefasViewModel;
+
+ this.tarefasViewModel.EditModeOnCommand.Execute(null);
+ }
+
+ private async void OnSaveTaskClicked(object sender, EventArgs e)
+ {
+ tarefasViewModel.EditCommand.Execute(null);
+
+ if (!string.IsNullOrEmpty(tarefasViewModel.HasErrorsCodeBehind))
+ {
+ await DisplayAlert(Title, tarefasViewModel.HasErrorsCodeBehind, "OK");
+ }
+ else
+ {
+ tarefasViewModel.GetAllCommand.Execute(null);
+
+ await Navigation.PopModalAsync();
+ }
+ }
+
+ private async void OnCloseEditTaskClicked(object sender, EventArgs e)
+ {
+ tarefasViewModel.EditModeOffCommand.Execute(null);
+
+ await Navigation.PopModalAsync();
+ }
}
\ No newline at end of file
diff --git a/task-list-app-maui/Views/TarefasPendentesView.xaml b/Database/MauiTaskListApp/Views/PendingTasksView.xaml
similarity index 78%
rename from task-list-app-maui/Views/TarefasPendentesView.xaml
rename to Database/MauiTaskListApp/Views/PendingTasksView.xaml
index 0f1931c1..90114f46 100644
--- a/task-list-app-maui/Views/TarefasPendentesView.xaml
+++ b/Database/MauiTaskListApp/Views/PendingTasksView.xaml
@@ -1,74 +1,77 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Database/MauiTaskListApp/Views/PendingTasksView.xaml.cs b/Database/MauiTaskListApp/Views/PendingTasksView.xaml.cs
new file mode 100644
index 00000000..32dc19fe
--- /dev/null
+++ b/Database/MauiTaskListApp/Views/PendingTasksView.xaml.cs
@@ -0,0 +1,64 @@
+namespace MauiTaskListApp.Views;
+
+using Models;
+using ViewModels;
+
+public partial class PendingTasksView : ContentPage
+{
+ private readonly TasksViewModel tasksViewModel;
+
+ public PendingTasksView(TasksViewModel tasksViewModel)
+ {
+ InitializeComponent();
+
+ this.tasksViewModel = tasksViewModel;
+ this.tasksViewModel.GetAllCommand.Execute(null);
+
+ BindingContext = this.tasksViewModel;
+ }
+
+ private async void OnEditClicked(object sender, EventArgs e)
+ {
+ var imageButton = (ImageButton)sender;
+ var task = (Task)imageButton.BindingContext;
+
+ CollectionViewTarefasPendentes.SelectedItem = task;
+
+ if (CollectionViewTarefasPendentes.SelectedItem == null) return;
+
+ await Navigation.PushModalAsync(new EditTaskView(tasksViewModel));
+ }
+
+ private async void OnDeleteClicked(object sender, EventArgs e)
+ {
+ var imageButton = (ImageButton)sender;
+ var task = (Task)imageButton.BindingContext;
+
+ CollectionViewTarefasPendentes.SelectedItem = task;
+
+ if (CollectionViewTarefasPendentes.SelectedItem == null) return;
+
+ bool answer = await DisplayAlert(Title, "Do you confirm the exclusion of this task?", "Yes", "No");
+ if (!answer) return;
+
+ tasksViewModel.DeleteCommand.Execute(null);
+
+ if (!string.IsNullOrEmpty(tasksViewModel.HasErrorsCodeBehind))
+ {
+ await DisplayAlert(Title, tasksViewModel.HasErrorsCodeBehind, "OK");
+ }
+ else
+ {
+ tasksViewModel.GetAllCommand.Execute(null);
+ }
+ }
+
+ private async void OnAddTaskClicked(object sender, EventArgs e)
+ {
+ tasksViewModel.NewCommand.Execute(null);
+
+ await Navigation.PushModalAsync(new AddTaskView(tasksViewModel));
+
+ tasksViewModel.GetAllCommand.Execute(null);
+ }
+}
\ No newline at end of file
diff --git a/Sqlite/MauiSqlite/App.xaml b/Database/Sqlite/MauiSqlite/App.xaml
similarity index 100%
rename from Sqlite/MauiSqlite/App.xaml
rename to Database/Sqlite/MauiSqlite/App.xaml
diff --git a/Sqlite/MauiSqlite/App.xaml.cs b/Database/Sqlite/MauiSqlite/App.xaml.cs
similarity index 100%
rename from Sqlite/MauiSqlite/App.xaml.cs
rename to Database/Sqlite/MauiSqlite/App.xaml.cs
diff --git a/Sqlite/MauiSqlite/MainPage.xaml b/Database/Sqlite/MauiSqlite/MainPage.xaml
similarity index 100%
rename from Sqlite/MauiSqlite/MainPage.xaml
rename to Database/Sqlite/MauiSqlite/MainPage.xaml
diff --git a/Sqlite/MauiSqlite/MainPage.xaml.cs b/Database/Sqlite/MauiSqlite/MainPage.xaml.cs
similarity index 100%
rename from Sqlite/MauiSqlite/MainPage.xaml.cs
rename to Database/Sqlite/MauiSqlite/MainPage.xaml.cs
diff --git a/Sqlite/MauiSqlite/MauiProgram.cs b/Database/Sqlite/MauiSqlite/MauiProgram.cs
similarity index 100%
rename from Sqlite/MauiSqlite/MauiProgram.cs
rename to Database/Sqlite/MauiSqlite/MauiProgram.cs
diff --git a/Sqlite/MauiSqlite/MauiSqlite.csproj b/Database/Sqlite/MauiSqlite/MauiSqlite.csproj
similarity index 100%
rename from Sqlite/MauiSqlite/MauiSqlite.csproj
rename to Database/Sqlite/MauiSqlite/MauiSqlite.csproj
diff --git a/Sqlite/MauiSqlite/Platforms/Android/AndroidManifest.xml b/Database/Sqlite/MauiSqlite/Platforms/Android/AndroidManifest.xml
similarity index 100%
rename from Sqlite/MauiSqlite/Platforms/Android/AndroidManifest.xml
rename to Database/Sqlite/MauiSqlite/Platforms/Android/AndroidManifest.xml
diff --git a/Sqlite/MauiSqlite/Platforms/Android/MainActivity.cs b/Database/Sqlite/MauiSqlite/Platforms/Android/MainActivity.cs
similarity index 100%
rename from Sqlite/MauiSqlite/Platforms/Android/MainActivity.cs
rename to Database/Sqlite/MauiSqlite/Platforms/Android/MainActivity.cs
diff --git a/Sqlite/MauiSqlite/Platforms/Android/MainApplication.cs b/Database/Sqlite/MauiSqlite/Platforms/Android/MainApplication.cs
similarity index 100%
rename from Sqlite/MauiSqlite/Platforms/Android/MainApplication.cs
rename to Database/Sqlite/MauiSqlite/Platforms/Android/MainApplication.cs
diff --git a/Sqlite/MauiSqlite/Platforms/Android/Resources/values/colors.xml b/Database/Sqlite/MauiSqlite/Platforms/Android/Resources/values/colors.xml
similarity index 100%
rename from Sqlite/MauiSqlite/Platforms/Android/Resources/values/colors.xml
rename to Database/Sqlite/MauiSqlite/Platforms/Android/Resources/values/colors.xml
diff --git a/Sqlite/MauiSqlite/Platforms/MacCatalyst/AppDelegate.cs b/Database/Sqlite/MauiSqlite/Platforms/MacCatalyst/AppDelegate.cs
similarity index 100%
rename from Sqlite/MauiSqlite/Platforms/MacCatalyst/AppDelegate.cs
rename to Database/Sqlite/MauiSqlite/Platforms/MacCatalyst/AppDelegate.cs
diff --git a/Sqlite/MauiSqliteBlazor/Platforms/MacCatalyst/Entitlements.Debug.plist b/Database/Sqlite/MauiSqlite/Platforms/MacCatalyst/Entitlements.Debug.plist
similarity index 100%
rename from Sqlite/MauiSqliteBlazor/Platforms/MacCatalyst/Entitlements.Debug.plist
rename to Database/Sqlite/MauiSqlite/Platforms/MacCatalyst/Entitlements.Debug.plist
diff --git a/Sqlite/MauiSqliteBlazor/Platforms/MacCatalyst/Entitlements.Release.plist b/Database/Sqlite/MauiSqlite/Platforms/MacCatalyst/Entitlements.Release.plist
similarity index 100%
rename from Sqlite/MauiSqliteBlazor/Platforms/MacCatalyst/Entitlements.Release.plist
rename to Database/Sqlite/MauiSqlite/Platforms/MacCatalyst/Entitlements.Release.plist
diff --git a/Sqlite/MauiSqlite/Platforms/MacCatalyst/Info.plist b/Database/Sqlite/MauiSqlite/Platforms/MacCatalyst/Info.plist
similarity index 100%
rename from Sqlite/MauiSqlite/Platforms/MacCatalyst/Info.plist
rename to Database/Sqlite/MauiSqlite/Platforms/MacCatalyst/Info.plist
diff --git a/Sqlite/MauiSqlite/Platforms/MacCatalyst/Program.cs b/Database/Sqlite/MauiSqlite/Platforms/MacCatalyst/Program.cs
similarity index 100%
rename from Sqlite/MauiSqlite/Platforms/MacCatalyst/Program.cs
rename to Database/Sqlite/MauiSqlite/Platforms/MacCatalyst/Program.cs
diff --git a/Sqlite/MauiSqlite/Platforms/Tizen/Main.cs b/Database/Sqlite/MauiSqlite/Platforms/Tizen/Main.cs
similarity index 100%
rename from Sqlite/MauiSqlite/Platforms/Tizen/Main.cs
rename to Database/Sqlite/MauiSqlite/Platforms/Tizen/Main.cs
diff --git a/Sqlite/MauiSqlite/Platforms/Tizen/tizen-manifest.xml b/Database/Sqlite/MauiSqlite/Platforms/Tizen/tizen-manifest.xml
similarity index 100%
rename from Sqlite/MauiSqlite/Platforms/Tizen/tizen-manifest.xml
rename to Database/Sqlite/MauiSqlite/Platforms/Tizen/tizen-manifest.xml
diff --git a/Sqlite/MauiSqlite/Platforms/Windows/App.xaml b/Database/Sqlite/MauiSqlite/Platforms/Windows/App.xaml
similarity index 100%
rename from Sqlite/MauiSqlite/Platforms/Windows/App.xaml
rename to Database/Sqlite/MauiSqlite/Platforms/Windows/App.xaml
diff --git a/Sqlite/MauiSqlite/Platforms/Windows/App.xaml.cs b/Database/Sqlite/MauiSqlite/Platforms/Windows/App.xaml.cs
similarity index 100%
rename from Sqlite/MauiSqlite/Platforms/Windows/App.xaml.cs
rename to Database/Sqlite/MauiSqlite/Platforms/Windows/App.xaml.cs
diff --git a/Sqlite/MauiSqlite/Platforms/Windows/Package.appxmanifest b/Database/Sqlite/MauiSqlite/Platforms/Windows/Package.appxmanifest
similarity index 100%
rename from Sqlite/MauiSqlite/Platforms/Windows/Package.appxmanifest
rename to Database/Sqlite/MauiSqlite/Platforms/Windows/Package.appxmanifest
diff --git a/Sqlite/MauiSqlite/Platforms/Windows/app.manifest b/Database/Sqlite/MauiSqlite/Platforms/Windows/app.manifest
similarity index 100%
rename from Sqlite/MauiSqlite/Platforms/Windows/app.manifest
rename to Database/Sqlite/MauiSqlite/Platforms/Windows/app.manifest
diff --git a/Sqlite/MauiSqlite/Platforms/iOS/AppDelegate.cs b/Database/Sqlite/MauiSqlite/Platforms/iOS/AppDelegate.cs
similarity index 100%
rename from Sqlite/MauiSqlite/Platforms/iOS/AppDelegate.cs
rename to Database/Sqlite/MauiSqlite/Platforms/iOS/AppDelegate.cs
diff --git a/Sqlite/MauiSqliteBlazor/Platforms/iOS/Info.plist b/Database/Sqlite/MauiSqlite/Platforms/iOS/Info.plist
similarity index 100%
rename from Sqlite/MauiSqliteBlazor/Platforms/iOS/Info.plist
rename to Database/Sqlite/MauiSqlite/Platforms/iOS/Info.plist
diff --git a/Sqlite/MauiSqlite/Platforms/iOS/Program.cs b/Database/Sqlite/MauiSqlite/Platforms/iOS/Program.cs
similarity index 100%
rename from Sqlite/MauiSqlite/Platforms/iOS/Program.cs
rename to Database/Sqlite/MauiSqlite/Platforms/iOS/Program.cs
diff --git a/Sqlite/MauiSqliteBlazor/Properties/launchSettings.json b/Database/Sqlite/MauiSqlite/Properties/launchSettings.json
similarity index 100%
rename from Sqlite/MauiSqliteBlazor/Properties/launchSettings.json
rename to Database/Sqlite/MauiSqlite/Properties/launchSettings.json
diff --git a/Sqlite/MauiSqlite/Resources/AppIcon/appicon.svg b/Database/Sqlite/MauiSqlite/Resources/AppIcon/appicon.svg
similarity index 100%
rename from Sqlite/MauiSqlite/Resources/AppIcon/appicon.svg
rename to Database/Sqlite/MauiSqlite/Resources/AppIcon/appicon.svg
diff --git a/Sqlite/MauiSqlite/Resources/AppIcon/appiconfg.svg b/Database/Sqlite/MauiSqlite/Resources/AppIcon/appiconfg.svg
similarity index 100%
rename from Sqlite/MauiSqlite/Resources/AppIcon/appiconfg.svg
rename to Database/Sqlite/MauiSqlite/Resources/AppIcon/appiconfg.svg
diff --git a/Sqlite/MauiSqlite/Resources/Splash/splash.svg b/Database/Sqlite/MauiSqlite/Resources/Splash/splash.svg
similarity index 100%
rename from Sqlite/MauiSqlite/Resources/Splash/splash.svg
rename to Database/Sqlite/MauiSqlite/Resources/Splash/splash.svg
diff --git a/Sqlite/MauiSqliteBlazor/App.xaml b/Database/Sqlite/MauiSqliteBlazor/App.xaml
similarity index 100%
rename from Sqlite/MauiSqliteBlazor/App.xaml
rename to Database/Sqlite/MauiSqliteBlazor/App.xaml
diff --git a/Sqlite/MauiSqliteBlazor/App.xaml.cs b/Database/Sqlite/MauiSqliteBlazor/App.xaml.cs
similarity index 100%
rename from Sqlite/MauiSqliteBlazor/App.xaml.cs
rename to Database/Sqlite/MauiSqliteBlazor/App.xaml.cs
diff --git a/Sqlite/MauiSqliteBlazor/Main.razor b/Database/Sqlite/MauiSqliteBlazor/Main.razor
similarity index 100%
rename from Sqlite/MauiSqliteBlazor/Main.razor
rename to Database/Sqlite/MauiSqliteBlazor/Main.razor
diff --git a/Sqlite/MauiSqliteBlazor/MainPage.xaml b/Database/Sqlite/MauiSqliteBlazor/MainPage.xaml
similarity index 100%
rename from Sqlite/MauiSqliteBlazor/MainPage.xaml
rename to Database/Sqlite/MauiSqliteBlazor/MainPage.xaml
diff --git a/Sqlite/MauiSqliteBlazor/MainPage.xaml.cs b/Database/Sqlite/MauiSqliteBlazor/MainPage.xaml.cs
similarity index 100%
rename from Sqlite/MauiSqliteBlazor/MainPage.xaml.cs
rename to Database/Sqlite/MauiSqliteBlazor/MainPage.xaml.cs
diff --git a/Sqlite/MauiSqliteBlazor/MauiProgram.cs b/Database/Sqlite/MauiSqliteBlazor/MauiProgram.cs
similarity index 100%
rename from Sqlite/MauiSqliteBlazor/MauiProgram.cs
rename to Database/Sqlite/MauiSqliteBlazor/MauiProgram.cs
diff --git a/Sqlite/MauiSqliteBlazor/MauiSqliteBlazor.csproj b/Database/Sqlite/MauiSqliteBlazor/MauiSqliteBlazor.csproj
similarity index 100%
rename from Sqlite/MauiSqliteBlazor/MauiSqliteBlazor.csproj
rename to Database/Sqlite/MauiSqliteBlazor/MauiSqliteBlazor.csproj
diff --git a/Sqlite/MauiSqliteBlazor/Pages/Index.razor b/Database/Sqlite/MauiSqliteBlazor/Pages/Index.razor
similarity index 100%
rename from Sqlite/MauiSqliteBlazor/Pages/Index.razor
rename to Database/Sqlite/MauiSqliteBlazor/Pages/Index.razor
diff --git a/Sqlite/MauiSqliteBlazor/Platforms/Android/AndroidManifest.xml b/Database/Sqlite/MauiSqliteBlazor/Platforms/Android/AndroidManifest.xml
similarity index 100%
rename from Sqlite/MauiSqliteBlazor/Platforms/Android/AndroidManifest.xml
rename to Database/Sqlite/MauiSqliteBlazor/Platforms/Android/AndroidManifest.xml
diff --git a/Sqlite/MauiSqliteBlazor/Platforms/Android/MainActivity.cs b/Database/Sqlite/MauiSqliteBlazor/Platforms/Android/MainActivity.cs
similarity index 100%
rename from Sqlite/MauiSqliteBlazor/Platforms/Android/MainActivity.cs
rename to Database/Sqlite/MauiSqliteBlazor/Platforms/Android/MainActivity.cs
diff --git a/Sqlite/MauiSqliteBlazor/Platforms/Android/MainApplication.cs b/Database/Sqlite/MauiSqliteBlazor/Platforms/Android/MainApplication.cs
similarity index 100%
rename from Sqlite/MauiSqliteBlazor/Platforms/Android/MainApplication.cs
rename to Database/Sqlite/MauiSqliteBlazor/Platforms/Android/MainApplication.cs
diff --git a/Sqlite/MauiSqliteBlazor/Platforms/Android/Resources/values/colors.xml b/Database/Sqlite/MauiSqliteBlazor/Platforms/Android/Resources/values/colors.xml
similarity index 100%
rename from Sqlite/MauiSqliteBlazor/Platforms/Android/Resources/values/colors.xml
rename to Database/Sqlite/MauiSqliteBlazor/Platforms/Android/Resources/values/colors.xml
diff --git a/Sqlite/MauiSqliteBlazor/Platforms/MacCatalyst/AppDelegate.cs b/Database/Sqlite/MauiSqliteBlazor/Platforms/MacCatalyst/AppDelegate.cs
similarity index 100%
rename from Sqlite/MauiSqliteBlazor/Platforms/MacCatalyst/AppDelegate.cs
rename to Database/Sqlite/MauiSqliteBlazor/Platforms/MacCatalyst/AppDelegate.cs
diff --git a/task-list-app-maui/Platforms/MacCatalyst/Entitlements.Debug.plist b/Database/Sqlite/MauiSqliteBlazor/Platforms/MacCatalyst/Entitlements.Debug.plist
similarity index 97%
rename from task-list-app-maui/Platforms/MacCatalyst/Entitlements.Debug.plist
rename to Database/Sqlite/MauiSqliteBlazor/Platforms/MacCatalyst/Entitlements.Debug.plist
index 65aa66df..1659c842 100644
--- a/task-list-app-maui/Platforms/MacCatalyst/Entitlements.Debug.plist
+++ b/Database/Sqlite/MauiSqliteBlazor/Platforms/MacCatalyst/Entitlements.Debug.plist
@@ -1,11 +1,11 @@
-
-
-
-
-
-
- com.apple.security.get-task-allow
-
-
-
-
+
+
+
+
+
+
+ com.apple.security.get-task-allow
+
+
+
+
diff --git a/task-list-app-maui/Platforms/MacCatalyst/Entitlements.Release.plist b/Database/Sqlite/MauiSqliteBlazor/Platforms/MacCatalyst/Entitlements.Release.plist
similarity index 97%
rename from task-list-app-maui/Platforms/MacCatalyst/Entitlements.Release.plist
rename to Database/Sqlite/MauiSqliteBlazor/Platforms/MacCatalyst/Entitlements.Release.plist
index c26c7a1e..1db1d937 100644
--- a/task-list-app-maui/Platforms/MacCatalyst/Entitlements.Release.plist
+++ b/Database/Sqlite/MauiSqliteBlazor/Platforms/MacCatalyst/Entitlements.Release.plist
@@ -1,12 +1,12 @@
-
-
-
-
-
- com.apple.security.app-sandbox
-
- com.apple.security.network.client
-
-
-
-
+
+
+
+
+
+ com.apple.security.app-sandbox
+
+ com.apple.security.network.client
+
+
+
+
diff --git a/Sqlite/MauiSqliteBlazor/Platforms/MacCatalyst/Info.plist b/Database/Sqlite/MauiSqliteBlazor/Platforms/MacCatalyst/Info.plist
similarity index 100%
rename from Sqlite/MauiSqliteBlazor/Platforms/MacCatalyst/Info.plist
rename to Database/Sqlite/MauiSqliteBlazor/Platforms/MacCatalyst/Info.plist
diff --git a/Sqlite/MauiSqliteBlazor/Platforms/MacCatalyst/Program.cs b/Database/Sqlite/MauiSqliteBlazor/Platforms/MacCatalyst/Program.cs
similarity index 100%
rename from Sqlite/MauiSqliteBlazor/Platforms/MacCatalyst/Program.cs
rename to Database/Sqlite/MauiSqliteBlazor/Platforms/MacCatalyst/Program.cs
diff --git a/Sqlite/MauiSqliteBlazor/Platforms/Tizen/Main.cs b/Database/Sqlite/MauiSqliteBlazor/Platforms/Tizen/Main.cs
similarity index 100%
rename from Sqlite/MauiSqliteBlazor/Platforms/Tizen/Main.cs
rename to Database/Sqlite/MauiSqliteBlazor/Platforms/Tizen/Main.cs
diff --git a/Sqlite/MauiSqliteBlazor/Platforms/Tizen/tizen-manifest.xml b/Database/Sqlite/MauiSqliteBlazor/Platforms/Tizen/tizen-manifest.xml
similarity index 100%
rename from Sqlite/MauiSqliteBlazor/Platforms/Tizen/tizen-manifest.xml
rename to Database/Sqlite/MauiSqliteBlazor/Platforms/Tizen/tizen-manifest.xml
diff --git a/Sqlite/MauiSqliteBlazor/Platforms/Windows/App.xaml b/Database/Sqlite/MauiSqliteBlazor/Platforms/Windows/App.xaml
similarity index 100%
rename from Sqlite/MauiSqliteBlazor/Platforms/Windows/App.xaml
rename to Database/Sqlite/MauiSqliteBlazor/Platforms/Windows/App.xaml
diff --git a/Sqlite/MauiSqliteBlazor/Platforms/Windows/App.xaml.cs b/Database/Sqlite/MauiSqliteBlazor/Platforms/Windows/App.xaml.cs
similarity index 100%
rename from Sqlite/MauiSqliteBlazor/Platforms/Windows/App.xaml.cs
rename to Database/Sqlite/MauiSqliteBlazor/Platforms/Windows/App.xaml.cs
diff --git a/Sqlite/MauiSqliteBlazor/Platforms/Windows/Package.appxmanifest b/Database/Sqlite/MauiSqliteBlazor/Platforms/Windows/Package.appxmanifest
similarity index 100%
rename from Sqlite/MauiSqliteBlazor/Platforms/Windows/Package.appxmanifest
rename to Database/Sqlite/MauiSqliteBlazor/Platforms/Windows/Package.appxmanifest
diff --git a/Sqlite/MauiSqliteBlazor/Platforms/Windows/app.manifest b/Database/Sqlite/MauiSqliteBlazor/Platforms/Windows/app.manifest
similarity index 100%
rename from Sqlite/MauiSqliteBlazor/Platforms/Windows/app.manifest
rename to Database/Sqlite/MauiSqliteBlazor/Platforms/Windows/app.manifest
diff --git a/Sqlite/MauiSqliteBlazor/Platforms/iOS/AppDelegate.cs b/Database/Sqlite/MauiSqliteBlazor/Platforms/iOS/AppDelegate.cs
similarity index 100%
rename from Sqlite/MauiSqliteBlazor/Platforms/iOS/AppDelegate.cs
rename to Database/Sqlite/MauiSqliteBlazor/Platforms/iOS/AppDelegate.cs
diff --git a/task-list-app-maui/Platforms/iOS/Info.plist b/Database/Sqlite/MauiSqliteBlazor/Platforms/iOS/Info.plist
similarity index 96%
rename from task-list-app-maui/Platforms/iOS/Info.plist
rename to Database/Sqlite/MauiSqliteBlazor/Platforms/iOS/Info.plist
index 358337bb..0004a4fd 100644
--- a/task-list-app-maui/Platforms/iOS/Info.plist
+++ b/Database/Sqlite/MauiSqliteBlazor/Platforms/iOS/Info.plist
@@ -1,32 +1,32 @@
-
-
-
-
- LSRequiresIPhoneOS
-
- UIDeviceFamily
-
- 1
- 2
-
- UIRequiredDeviceCapabilities
-
- arm64
-
- UISupportedInterfaceOrientations
-
- UIInterfaceOrientationPortrait
- UIInterfaceOrientationLandscapeLeft
- UIInterfaceOrientationLandscapeRight
-
- UISupportedInterfaceOrientations~ipad
-
- UIInterfaceOrientationPortrait
- UIInterfaceOrientationPortraitUpsideDown
- UIInterfaceOrientationLandscapeLeft
- UIInterfaceOrientationLandscapeRight
-
- XSAppIconAssets
- Assets.xcassets/appicon.appiconset
-
-
+
+
+
+
+ LSRequiresIPhoneOS
+
+ UIDeviceFamily
+
+ 1
+ 2
+
+ UIRequiredDeviceCapabilities
+
+ arm64
+
+ UISupportedInterfaceOrientations
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ UISupportedInterfaceOrientations~ipad
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationPortraitUpsideDown
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ XSAppIconAssets
+ Assets.xcassets/appicon.appiconset
+
+
diff --git a/Sqlite/MauiSqliteBlazor/Platforms/iOS/Program.cs b/Database/Sqlite/MauiSqliteBlazor/Platforms/iOS/Program.cs
similarity index 100%
rename from Sqlite/MauiSqliteBlazor/Platforms/iOS/Program.cs
rename to Database/Sqlite/MauiSqliteBlazor/Platforms/iOS/Program.cs
diff --git a/task-list-app-maui/Properties/launchSettings.json b/Database/Sqlite/MauiSqliteBlazor/Properties/launchSettings.json
similarity index 94%
rename from task-list-app-maui/Properties/launchSettings.json
rename to Database/Sqlite/MauiSqliteBlazor/Properties/launchSettings.json
index c16206a8..edf8aadc 100644
--- a/task-list-app-maui/Properties/launchSettings.json
+++ b/Database/Sqlite/MauiSqliteBlazor/Properties/launchSettings.json
@@ -1,8 +1,8 @@
-{
- "profiles": {
- "Windows Machine": {
- "commandName": "MsixPackage",
- "nativeDebugging": false
- }
- }
+{
+ "profiles": {
+ "Windows Machine": {
+ "commandName": "MsixPackage",
+ "nativeDebugging": false
+ }
+ }
}
\ No newline at end of file
diff --git a/Sqlite/MauiSqliteBlazor/Resources/AppIcon/appicon.svg b/Database/Sqlite/MauiSqliteBlazor/Resources/AppIcon/appicon.svg
similarity index 100%
rename from Sqlite/MauiSqliteBlazor/Resources/AppIcon/appicon.svg
rename to Database/Sqlite/MauiSqliteBlazor/Resources/AppIcon/appicon.svg
diff --git a/Sqlite/MauiSqliteBlazor/Resources/AppIcon/appiconfg.svg b/Database/Sqlite/MauiSqliteBlazor/Resources/AppIcon/appiconfg.svg
similarity index 100%
rename from Sqlite/MauiSqliteBlazor/Resources/AppIcon/appiconfg.svg
rename to Database/Sqlite/MauiSqliteBlazor/Resources/AppIcon/appiconfg.svg
diff --git a/Sqlite/MauiSqliteBlazor/Resources/Splash/splash.svg b/Database/Sqlite/MauiSqliteBlazor/Resources/Splash/splash.svg
similarity index 100%
rename from Sqlite/MauiSqliteBlazor/Resources/Splash/splash.svg
rename to Database/Sqlite/MauiSqliteBlazor/Resources/Splash/splash.svg
diff --git a/Sqlite/MauiSqliteBlazor/Shared/MainLayout.razor b/Database/Sqlite/MauiSqliteBlazor/Shared/MainLayout.razor
similarity index 100%
rename from Sqlite/MauiSqliteBlazor/Shared/MainLayout.razor
rename to Database/Sqlite/MauiSqliteBlazor/Shared/MainLayout.razor
diff --git a/Sqlite/MauiSqliteBlazor/Shared/MainLayout.razor.css b/Database/Sqlite/MauiSqliteBlazor/Shared/MainLayout.razor.css
similarity index 100%
rename from Sqlite/MauiSqliteBlazor/Shared/MainLayout.razor.css
rename to Database/Sqlite/MauiSqliteBlazor/Shared/MainLayout.razor.css
diff --git a/Sqlite/MauiSqliteBlazor/Shared/NavMenu.razor b/Database/Sqlite/MauiSqliteBlazor/Shared/NavMenu.razor
similarity index 100%
rename from Sqlite/MauiSqliteBlazor/Shared/NavMenu.razor
rename to Database/Sqlite/MauiSqliteBlazor/Shared/NavMenu.razor
diff --git a/Sqlite/MauiSqliteBlazor/Shared/NavMenu.razor.css b/Database/Sqlite/MauiSqliteBlazor/Shared/NavMenu.razor.css
similarity index 100%
rename from Sqlite/MauiSqliteBlazor/Shared/NavMenu.razor.css
rename to Database/Sqlite/MauiSqliteBlazor/Shared/NavMenu.razor.css
diff --git a/Sqlite/MauiSqliteBlazor/_Imports.razor b/Database/Sqlite/MauiSqliteBlazor/_Imports.razor
similarity index 100%
rename from Sqlite/MauiSqliteBlazor/_Imports.razor
rename to Database/Sqlite/MauiSqliteBlazor/_Imports.razor
diff --git a/Sqlite/MauiSqliteBlazor/wwwroot/css/app.css b/Database/Sqlite/MauiSqliteBlazor/wwwroot/css/app.css
similarity index 100%
rename from Sqlite/MauiSqliteBlazor/wwwroot/css/app.css
rename to Database/Sqlite/MauiSqliteBlazor/wwwroot/css/app.css
diff --git a/Sqlite/MauiSqliteBlazor/wwwroot/css/bootstrap/bootstrap.min.css b/Database/Sqlite/MauiSqliteBlazor/wwwroot/css/bootstrap/bootstrap.min.css
similarity index 100%
rename from Sqlite/MauiSqliteBlazor/wwwroot/css/bootstrap/bootstrap.min.css
rename to Database/Sqlite/MauiSqliteBlazor/wwwroot/css/bootstrap/bootstrap.min.css
diff --git a/Sqlite/MauiSqliteBlazor/wwwroot/css/bootstrap/bootstrap.min.css.map b/Database/Sqlite/MauiSqliteBlazor/wwwroot/css/bootstrap/bootstrap.min.css.map
similarity index 100%
rename from Sqlite/MauiSqliteBlazor/wwwroot/css/bootstrap/bootstrap.min.css.map
rename to Database/Sqlite/MauiSqliteBlazor/wwwroot/css/bootstrap/bootstrap.min.css.map
diff --git a/Sqlite/MauiSqliteBlazor/wwwroot/favicon.ico b/Database/Sqlite/MauiSqliteBlazor/wwwroot/favicon.ico
similarity index 100%
rename from Sqlite/MauiSqliteBlazor/wwwroot/favicon.ico
rename to Database/Sqlite/MauiSqliteBlazor/wwwroot/favicon.ico
diff --git a/Sqlite/MauiSqliteBlazor/wwwroot/index.html b/Database/Sqlite/MauiSqliteBlazor/wwwroot/index.html
similarity index 100%
rename from Sqlite/MauiSqliteBlazor/wwwroot/index.html
rename to Database/Sqlite/MauiSqliteBlazor/wwwroot/index.html
diff --git a/Sqlite/README.md b/Database/Sqlite/README.md
similarity index 100%
rename from Sqlite/README.md
rename to Database/Sqlite/README.md
diff --git a/Sqlite/README.mdpp b/Database/Sqlite/README.mdpp
similarity index 100%
rename from Sqlite/README.mdpp
rename to Database/Sqlite/README.mdpp
diff --git a/Sqlite/SqliteRepository/Account.cs b/Database/Sqlite/SqliteRepository/Account.cs
similarity index 100%
rename from Sqlite/SqliteRepository/Account.cs
rename to Database/Sqlite/SqliteRepository/Account.cs
diff --git a/Sqlite/SqliteRepository/AccountRepository.cs b/Database/Sqlite/SqliteRepository/AccountRepository.cs
similarity index 100%
rename from Sqlite/SqliteRepository/AccountRepository.cs
rename to Database/Sqlite/SqliteRepository/AccountRepository.cs
diff --git a/Sqlite/SqliteRepository/SqliteRepository.csproj b/Database/Sqlite/SqliteRepository/SqliteRepository.csproj
similarity index 100%
rename from Sqlite/SqliteRepository/SqliteRepository.csproj
rename to Database/Sqlite/SqliteRepository/SqliteRepository.csproj
diff --git a/MauiBank/Converters/BoolToColorConverter.cs b/MauiBank/Converters/BoolToColorConverter.cs
index 1e4246f9..7c3d3824 100644
--- a/MauiBank/Converters/BoolToColorConverter.cs
+++ b/MauiBank/Converters/BoolToColorConverter.cs
@@ -4,12 +4,12 @@
public class BoolToColorConverter : IValueConverter
{
- public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ public object Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
{
return System.Convert.ToBoolean(value) ? Colors.LightGreen : Colors.LightGray;
}
- public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+ public object ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
diff --git a/MauiBank/Converters/BoolToStrokeThicknessConverter.cs b/MauiBank/Converters/BoolToStrokeThicknessConverter.cs
index 5edf4647..6096cdcc 100644
--- a/MauiBank/Converters/BoolToStrokeThicknessConverter.cs
+++ b/MauiBank/Converters/BoolToStrokeThicknessConverter.cs
@@ -4,12 +4,12 @@
public class BoolToStrokeThicknessConverter : IValueConverter
{
- public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ public object Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
{
return System.Convert.ToBoolean(value) ? 5 : 0;
}
- public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+ public object ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
diff --git a/MauiBank/Converters/StringLengthToColorConverter.cs b/MauiBank/Converters/StringLengthToColorConverter.cs
index 25b816f8..b39ad384 100644
--- a/MauiBank/Converters/StringLengthToColorConverter.cs
+++ b/MauiBank/Converters/StringLengthToColorConverter.cs
@@ -4,15 +4,15 @@
public class StringLengthToColorConverter : IValueConverter
{
- public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ public object Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
{
- var parameterInt = int.Parse(parameter.ToString() ?? "0");
+ var parameterInt = int.Parse(parameter?.ToString() ?? "0");
return value is string valueString
? valueString.Length >= parameterInt ? Colors.Red : Color.FromRgb(30, 30, 30)
: Colors.Transparent;
}
- public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+ public object ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
diff --git a/MauiCursor/Platforms/Android/CursorExtensions.cs b/MauiCursor/Platforms/Android/CursorExtensions.cs
index f3bc85c7..e0a6bd70 100644
--- a/MauiCursor/Platforms/Android/CursorExtensions.cs
+++ b/MauiCursor/Platforms/Android/CursorExtensions.cs
@@ -15,20 +15,21 @@ public static void SetCustomCursor(this VisualElement visualElement, CursorIcon
ArgumentNullException.ThrowIfNull(mauiContext);
var view = visualElement.ToPlatform(mauiContext);
view.PointerIcon = PointerIcon.GetSystemIcon(Application.Context, GetCursor(cursor));
+
+ static PointerIconType GetCursor(CursorIcon cursor)
+ {
+ return cursor switch
+ {
+ CursorIcon.Hand => PointerIconType.Hand,
+ CursorIcon.IBeam => PointerIconType.AllScroll,
+ CursorIcon.Cross => PointerIconType.Crosshair,
+ CursorIcon.Arrow => PointerIconType.Arrow,
+ CursorIcon.SizeAll => PointerIconType.TopRightDiagonalDoubleArrow,
+ CursorIcon.Wait => PointerIconType.Wait,
+ _ => PointerIconType.Default,
+ };
+ }
}
}
- static PointerIconType GetCursor(CursorIcon cursor)
- {
- return cursor switch
- {
- CursorIcon.Hand => PointerIconType.Hand,
- CursorIcon.IBeam => PointerIconType.AllScroll,
- CursorIcon.Cross => PointerIconType.Crosshair,
- CursorIcon.Arrow => PointerIconType.Arrow,
- CursorIcon.SizeAll => PointerIconType.TopRightDiagonalDoubleArrow,
- CursorIcon.Wait => PointerIconType.Wait,
- _ => PointerIconType.Default,
- };
- }
}
\ No newline at end of file
diff --git a/MauiImageEffects/SaturationBehavior/SaturationConverter.cs b/MauiImageEffects/SaturationBehavior/SaturationConverter.cs
index 287fa52c..dea223c6 100644
--- a/MauiImageEffects/SaturationBehavior/SaturationConverter.cs
+++ b/MauiImageEffects/SaturationBehavior/SaturationConverter.cs
@@ -4,7 +4,7 @@
internal class SaturationConverter : IValueConverter
{
- public object Convert(object? value, Type targetType, object parameter, CultureInfo culture)
+ public object Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
{
if (double.TryParse(value?.ToString(), out var doubleValue))
{
@@ -14,7 +14,7 @@ public object Convert(object? value, Type targetType, object parameter, CultureI
return 0;
}
- public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+ public object ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
diff --git a/MauiSamples.sln b/MauiSamples.sln
index ec1281bf..ed15ce1c 100644
--- a/MauiSamples.sln
+++ b/MauiSamples.sln
@@ -6,15 +6,15 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MauiAuth", "Auth\MauiAuth\M
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MauiBlazorPhotoGallery", "MauiBlazorPhotoGallery\MauiBlazorPhotoGallery.csproj", "{C9A17F44-78CB-4EDC-86C9-E307C2F25FF0}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MauiSqlite", "Sqlite\MauiSqlite\MauiSqlite.csproj", "{43BACDC9-2889-476E-AF08-727E1B31D0B8}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MauiSqlite", "Database\Sqlite\MauiSqlite\MauiSqlite.csproj", "{43BACDC9-2889-476E-AF08-727E1B31D0B8}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MauiMultiWindow", "MauiMultiWindow\MauiMultiWindow.csproj", "{432B4EFB-447B-4FA8-8083-6A00B56D0F13}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Sqlite", "Sqlite", "{671C019C-7DCC-4B9E-AD7D-B9F6F35D044E}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MauiSqliteBlazor", "Sqlite\MauiSqliteBlazor\MauiSqliteBlazor.csproj", "{591E6CC5-EE07-423C-A6D1-48AD8AB3DC34}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MauiSqliteBlazor", "Database\Sqlite\MauiSqliteBlazor\MauiSqliteBlazor.csproj", "{591E6CC5-EE07-423C-A6D1-48AD8AB3DC34}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SqliteRepository", "Sqlite\SqliteRepository\SqliteRepository.csproj", "{13DAE136-5BF2-460C-BFD7-7BDB0785C935}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SqliteRepository", "Database\Sqlite\SqliteRepository\SqliteRepository.csproj", "{13DAE136-5BF2-460C-BFD7-7BDB0785C935}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "KanbanBoard", "KanbanBoard\KanbanBoard.csproj", "{5E4780D5-8A16-44CE-975D-155E578351D0}"
EndProject
@@ -123,7 +123,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MauiTabView", "MauiTabView\
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Database", "Database", "{D3C704D0-FB95-42BA-BBF1-E7360491551F}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "task-list-app-maui", "task-list-app-maui\task-list-app-maui.csproj", "{08096F4C-2BB3-4860-B0CA-9EC6A09EC377}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MauiTaskListApp", "Database\MauiTaskListApp\MauiTaskListApp.csproj", "{08096F4C-2BB3-4860-B0CA-9EC6A09EC377}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -367,8 +367,10 @@ Global
{BD0D8DA8-F153-4C43-B18D-F356CFF02F70}.Release|Any CPU.Deploy.0 = Release|Any CPU
{08096F4C-2BB3-4860-B0CA-9EC6A09EC377}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{08096F4C-2BB3-4860-B0CA-9EC6A09EC377}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {08096F4C-2BB3-4860-B0CA-9EC6A09EC377}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{08096F4C-2BB3-4860-B0CA-9EC6A09EC377}.Release|Any CPU.ActiveCfg = Release|Any CPU
{08096F4C-2BB3-4860-B0CA-9EC6A09EC377}.Release|Any CPU.Build.0 = Release|Any CPU
+ {08096F4C-2BB3-4860-B0CA-9EC6A09EC377}.Release|Any CPU.Deploy.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -388,6 +390,7 @@ Global
{D7258BEF-416D-4F3E-A359-87BD545A84A9} = {F215B6A7-4C79-4415-95D2-6F561143C9AC}
{8CE62F62-CE5D-48F4-8754-3F07FF72C3C2} = {D7258BEF-416D-4F3E-A359-87BD545A84A9}
{4C3F6E69-0FB4-41D5-8D8F-2E48B033A3EF} = {CE4ABC8D-3F54-49AA-BA5A-DD47E7CEB56B}
+ {08096F4C-2BB3-4860-B0CA-9EC6A09EC377} = {D3C704D0-FB95-42BA-BBF1-E7360491551F}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {61F7FB11-1E47-470C-91E2-47F8143E1572}
diff --git a/MauiSpeech/PickerDisplayConverter.cs b/MauiSpeech/PickerDisplayConverter.cs
index 8e3fc1bb..d995c3d5 100644
--- a/MauiSpeech/PickerDisplayConverter.cs
+++ b/MauiSpeech/PickerDisplayConverter.cs
@@ -4,7 +4,7 @@
public class PickerDisplayConverter : IValueConverter
{
- public object? Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
{
if (value is Locale locale)
{
@@ -14,7 +14,7 @@ public class PickerDisplayConverter : IValueConverter
return null;
}
- public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+ public object ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
diff --git a/README.md b/README.md
index 8023231e..41282b0e 100644
--- a/README.md
+++ b/README.md
@@ -21,7 +21,7 @@ The development guide can be found at [SETUP.md](./SETUP.md).
1. [MauiBlazorPhotoGallery](MauiBlazorPhotoGallery) - Infinite scrolling gallery app using .NET MAUI Blazor. Replicate Google Photos and Instagram Gallery UI.
-1. [MauiSqlite/MauiSqliteBlazor](Sqlite) - Connect to SQLite from .NET MAUI application.
+1. [MauiSqlite/MauiSqliteBlazor](Database/Sqlite) - Connect to SQLite from .NET MAUI application.
1. [MauiMultiWindow](MauiMultiWindow) - Work with .NET MAUI Windows.
@@ -73,4 +73,6 @@ The development guide can be found at [SETUP.md](./SETUP.md).
1. [MauiDraggableView](MauiDraggableView) - Drag and Drop View Container for .NET MAUI.
+1. [MauiTaskListApp](Database/MauiTaskListApp) - Cross-platform .NET MAUI app using MVVM development architecture performing CRUD operations with EF Core InMemory.
+
[![Stand With Ukraine](https://img.shields.io/badge/made_in-ukraine-ffd700.svg?labelColor=0057b7)](https://stand-with-ukraine.pp.ua)
\ No newline at end of file
diff --git a/README.mdpp b/README.mdpp
index 590ec20d..29f3a0a3 100644
--- a/README.mdpp
+++ b/README.mdpp
@@ -21,7 +21,7 @@ The development guide can be found at [SETUP.md](./SETUP.md).
1. [MauiBlazorPhotoGallery](MauiBlazorPhotoGallery) - Infinite scrolling gallery app using .NET MAUI Blazor. Replicate Google Photos and Instagram Gallery UI.
-1. [MauiSqlite/MauiSqliteBlazor](Sqlite) - Connect to SQLite from .NET MAUI application.
+1. [MauiSqlite/MauiSqliteBlazor](Database/Sqlite) - Connect to SQLite from .NET MAUI application.
1. [MauiMultiWindow](MauiMultiWindow) - Work with .NET MAUI Windows.
@@ -73,6 +73,6 @@ The development guide can be found at [SETUP.md](./SETUP.md).
1. [MauiDraggableView](MauiDraggableView) - Drag and Drop View Container for .NET MAUI.
-1. [task-list-app-maui](task-list-app-maui) - Cross-platform .NET MAUI app using MVVM development architecture performing CRUD operations with EF Core InMemory.
+1. [MauiTaskListApp](Database/MauiTaskListApp) - Cross-platform .NET MAUI app using MVVM development architecture performing CRUD operations with EF Core InMemory.
!INCLUDE "md/footer.mdpp"
diff --git a/task-list-app-maui/Data/AppDbContext.cs b/task-list-app-maui/Data/AppDbContext.cs
deleted file mode 100644
index 157ec7c2..00000000
--- a/task-list-app-maui/Data/AppDbContext.cs
+++ /dev/null
@@ -1,9 +0,0 @@
-using Microsoft.EntityFrameworkCore;
-using task_list_app_maui.Models;
-
-namespace task_list_app_maui.Data;
-
-public class AppDbContext(DbContextOptions options) : DbContext(options)
-{
- public DbSet Tarefas { get; set; }
-}
\ No newline at end of file
diff --git a/task-list-app-maui/Models/Tarefa.cs b/task-list-app-maui/Models/Tarefa.cs
deleted file mode 100644
index fc8be4cd..00000000
--- a/task-list-app-maui/Models/Tarefa.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-using System.ComponentModel.DataAnnotations;
-using CommunityToolkit.Mvvm.ComponentModel;
-
-namespace task_list_app_maui.Models;
-
-public class Tarefa : ObservableValidator
-{
- private int id;
- private string descricao = string.Empty;
- private DateTime data;
- private TimeSpan hora;
- private bool concluida;
-
- [Key]
- [Required]
- public int Id { get => id; set => SetProperty(ref id, value, true); }
-
- [Required]
- [MaxLength(60)]
- public string Descricao { get => descricao; set => SetProperty(ref descricao, value, true); }
-
- [Required]
- public DateTime Data { get => data; set => SetProperty(ref data, value, true); }
-
- [Required]
- public TimeSpan Hora { get => hora; set => SetProperty(ref hora, value, true); }
-
- [Required]
- public bool Concluida { get => concluida; set => SetProperty(ref concluida, value, true); }
-}
\ No newline at end of file
diff --git a/task-list-app-maui/ViewModels/TarefasViewModel.cs b/task-list-app-maui/ViewModels/TarefasViewModel.cs
deleted file mode 100644
index 07470312..00000000
--- a/task-list-app-maui/ViewModels/TarefasViewModel.cs
+++ /dev/null
@@ -1,126 +0,0 @@
-using System.Collections.ObjectModel;
-using System.Data;
-using CommunityToolkit.Mvvm.ComponentModel;
-using CommunityToolkit.Mvvm.Input;
-using task_list_app_maui.Data;
-using task_list_app_maui.Models;
-
-namespace task_list_app_maui.ViewModels;
-
-public partial class TarefasViewModel : ObservableObject, IDisposable
-{
- protected readonly AppDbContext _context;
-
- public ObservableCollection TarefasPendentes { get; set; } = [];
- public ObservableCollection TarefasConcluidas { get; set; } = [];
-
- [ObservableProperty]
- public Tarefa tarefa = new();
-
- public Tarefa TarefaEditMode { get; set; } = new();
-
- [ObservableProperty]
- public string hasErrorsCodeBehind = string.Empty;
-
- public TarefasViewModel(AppDbContext context)
- {
- _context = context;
- }
-
- [RelayCommand]
- public void New()
- {
- Tarefa = new()
- {
- Data = DateTime.Today,
- Hora = DateTime.Now.TimeOfDay
- };
- }
-
- [RelayCommand]
- public void EditModeOn()
- {
- TarefaEditMode.Id = Tarefa.Id;
- TarefaEditMode.Descricao = Tarefa.Descricao;
- TarefaEditMode.Data = Tarefa.Data;
- TarefaEditMode.Hora = Tarefa.Hora;
- TarefaEditMode.Concluida = Tarefa.Concluida;
- }
-
- [RelayCommand]
- public void EditModeOff()
- {
- Tarefa.Id = TarefaEditMode.Id;
- Tarefa.Descricao = TarefaEditMode.Descricao;
- Tarefa.Data = TarefaEditMode.Data;
- Tarefa.Hora = TarefaEditMode.Hora;
- Tarefa.Concluida = TarefaEditMode.Concluida;
- }
-
- [RelayCommand]
- public void Create()
- {
- try
- {
- HasErrorsCodeBehind = string.Empty;
-
- _context.Add(Tarefa);
- _context.SaveChanges();
- }
- catch (System.Exception ex)
- {
- HasErrorsCodeBehind = ex.Message;
- }
- }
-
- [RelayCommand]
- public void Edit()
- {
- try
- {
- HasErrorsCodeBehind = string.Empty;
-
- _context.SaveChanges();
-
- EditModeOn();
- }
- catch (System.Exception ex)
- {
- HasErrorsCodeBehind = ex.Message;
- }
- }
-
- [RelayCommand]
- public void Delete()
- {
- try
- {
- HasErrorsCodeBehind = string.Empty;
-
- _context.Remove(Tarefa);
- _context.SaveChanges();
- }
- catch (System.Exception ex)
- {
- HasErrorsCodeBehind = ex.Message;
- }
- }
-
- [RelayCommand]
- public void GetAll()
- {
- var tasks = _context.Tarefas.ToList();
-
- TarefasPendentes.Clear();
-
- foreach (var tarefa in tasks.Where(x => x.Concluida == false).OrderBy(x => x.Data + x.Hora))
- TarefasPendentes.Add(tarefa);
-
- TarefasConcluidas.Clear();
-
- foreach (var tarefa in tasks.Where(x => x.Concluida == true).OrderByDescending(x => x.Data + x.Hora))
- TarefasConcluidas.Add(tarefa);
- }
-
- public void Dispose() => _context.Dispose();
-}
\ No newline at end of file
diff --git a/task-list-app-maui/Views/AdicionarTarefaView.xaml.cs b/task-list-app-maui/Views/AdicionarTarefaView.xaml.cs
deleted file mode 100644
index 8a536ceb..00000000
--- a/task-list-app-maui/Views/AdicionarTarefaView.xaml.cs
+++ /dev/null
@@ -1,38 +0,0 @@
-using task_list_app_maui.ViewModels;
-
-namespace task_list_app_maui.Views;
-
-public partial class AdicionarTarefaView : ContentPage
-{
- private readonly TarefasViewModel tarefasViewModel;
-
- public AdicionarTarefaView(TarefasViewModel tarefasViewModel)
- {
- InitializeComponent();
-
- this.tarefasViewModel = tarefasViewModel;
-
- BindingContext = this.tarefasViewModel;
- }
-
- private async void OnSaveTaskClicked(object sender, EventArgs e)
- {
- tarefasViewModel.Create();
-
- if (!string.IsNullOrEmpty(tarefasViewModel.HasErrorsCodeBehind))
- {
- await DisplayAlert(Title, tarefasViewModel.HasErrorsCodeBehind, "OK");
- }
- else
- {
- tarefasViewModel.GetAll();
-
- await Navigation.PopModalAsync();
- }
- }
-
- private async void OnCloseAddTaskClicked(object sender, EventArgs e)
- {
- await Navigation.PopModalAsync();
- }
-}
\ No newline at end of file
diff --git a/task-list-app-maui/Views/TarefasConcluidasView.xaml.cs b/task-list-app-maui/Views/TarefasConcluidasView.xaml.cs
deleted file mode 100644
index 236c0dac..00000000
--- a/task-list-app-maui/Views/TarefasConcluidasView.xaml.cs
+++ /dev/null
@@ -1,55 +0,0 @@
-using task_list_app_maui.Models;
-using task_list_app_maui.ViewModels;
-
-namespace task_list_app_maui.Views;
-
-public partial class TarefasConcluidasView : ContentPage
-{
- private readonly TarefasViewModel tarefasViewModel;
-
- public TarefasConcluidasView(TarefasViewModel tarefasViewModel)
- {
- InitializeComponent();
-
- this.tarefasViewModel = tarefasViewModel;
- this.tarefasViewModel.GetAll();
-
- BindingContext = this.tarefasViewModel;
- }
-
- private async void OnEditClicked(object sender, EventArgs e)
- {
- var imageButton = (ImageButton)sender;
- var tarefa = (Tarefa)imageButton.BindingContext;
-
- CollectionViewTarefasConcluidas.SelectedItem = tarefa;
-
- if (CollectionViewTarefasConcluidas.SelectedItem == null) return;
-
- await Navigation.PushModalAsync(new EditarTarefaView(tarefasViewModel));
- }
-
- private async void OnDeleteClicked(object sender, EventArgs e)
- {
- var imageButton = (ImageButton)sender;
- var tarefa = (Tarefa)imageButton.BindingContext;
-
- CollectionViewTarefasConcluidas.SelectedItem = tarefa;
-
- if (CollectionViewTarefasConcluidas.SelectedItem == null) return;
-
- bool answer = await DisplayAlert(Title, "Do you confirm the deletion of this task?", "Yes", "No");
- if (!answer) return;
-
- tarefasViewModel.Delete();
-
- if (!string.IsNullOrEmpty(tarefasViewModel.HasErrorsCodeBehind))
- {
- await DisplayAlert(Title, tarefasViewModel.HasErrorsCodeBehind, "OK");
- }
- else
- {
- tarefasViewModel.GetAll();
- }
- }
-}
\ No newline at end of file
diff --git a/task-list-app-maui/Views/TarefasPendentesView.xaml.cs b/task-list-app-maui/Views/TarefasPendentesView.xaml.cs
deleted file mode 100644
index e306b4bd..00000000
--- a/task-list-app-maui/Views/TarefasPendentesView.xaml.cs
+++ /dev/null
@@ -1,64 +0,0 @@
-using task_list_app_maui.Models;
-using task_list_app_maui.ViewModels;
-
-namespace task_list_app_maui.Views;
-
-public partial class TarefasPendentesView : ContentPage
-{
- private readonly TarefasViewModel tarefasViewModel;
-
- public TarefasPendentesView(TarefasViewModel tarefasViewModel)
- {
- InitializeComponent();
-
- this.tarefasViewModel = tarefasViewModel;
- this.tarefasViewModel.GetAll();
-
- BindingContext = this.tarefasViewModel;
- }
-
- private async void OnEditClicked(object sender, EventArgs e)
- {
- var imageButton = (ImageButton)sender;
- var tarefa = (Tarefa)imageButton.BindingContext;
-
- CollectionViewTarefasPendentes.SelectedItem = tarefa;
-
- if (CollectionViewTarefasPendentes.SelectedItem == null) return;
-
- await Navigation.PushModalAsync(new EditarTarefaView(tarefasViewModel));
- }
-
- private async void OnDeleteClicked(object sender, EventArgs e)
- {
- var imageButton = (ImageButton)sender;
- var tarefa = (Tarefa)imageButton.BindingContext;
-
- CollectionViewTarefasPendentes.SelectedItem = tarefa;
-
- if (CollectionViewTarefasPendentes.SelectedItem == null) return;
-
- bool answer = await DisplayAlert(Title, "Do you confirm the exclusion of this task?", "Yes", "No");
- if (!answer) return;
-
- tarefasViewModel.Delete();
-
- if (!string.IsNullOrEmpty(tarefasViewModel.HasErrorsCodeBehind))
- {
- await DisplayAlert(Title, tarefasViewModel.HasErrorsCodeBehind, "OK");
- }
- else
- {
- tarefasViewModel.GetAll();
- }
- }
-
- private async void OnAddTaskClicked(object sender, EventArgs e)
- {
- tarefasViewModel.New();
-
- await Navigation.PushModalAsync(new AdicionarTarefaView(tarefasViewModel));
-
- tarefasViewModel.GetAll();
- }
-}
\ No newline at end of file