From c36734dbd7ee9893b264b7af9bb0b8d7764aaae2 Mon Sep 17 00:00:00 2001 From: Alexis DRAI Date: Sun, 14 May 2023 21:37:38 +0200 Subject: [PATCH 1/8] =?UTF-8?q?:necktie:=20:lipstick:=20=F0=9F=96=96=20:co?= =?UTF-8?q?nstruction:=20WIP=20MVVM=20album=20detail?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AD_MAUI/AD_MAUI.csproj | 8 +- AD_MAUI/App.xaml.cs | 10 +-- AD_MAUI/AppShell.xaml.cs | 8 +- AD_MAUI/MainPage.xaml | 39 ++------- AD_MAUI/MainPage.xaml.cs | 30 +++---- AD_MAUI/MauiProgram.cs | 26 +++--- AD_MAUI/Model/Album.cs | 12 +++ AD_MAUI/Model/Song.cs | 9 ++ AD_MAUI/Platforms/Android/MainActivity.cs | 1 - AD_MAUI/Platforms/Android/MainApplication.cs | 10 +-- AD_MAUI/Platforms/MacCatalyst/AppDelegate.cs | 2 +- AD_MAUI/Platforms/MacCatalyst/Program.cs | 17 ++-- AD_MAUI/Platforms/Windows/App.xaml.cs | 22 +++-- AD_MAUI/Platforms/iOS/AppDelegate.cs | 2 +- AD_MAUI/Platforms/iOS/Program.cs | 17 ++-- AD_MAUI/ViewModel/AlbumViewModel.cs | 86 ++++++++++++++++++++ AD_MAUI/ViewModel/SongViewModel.cs | 51 ++++++++++++ AD_MAUI/Views/AlbumPage.xaml | 27 ++++++ AD_MAUI/Views/AlbumPage.xaml.cs | 17 ++++ 19 files changed, 282 insertions(+), 112 deletions(-) create mode 100644 AD_MAUI/Model/Album.cs create mode 100644 AD_MAUI/Model/Song.cs create mode 100644 AD_MAUI/ViewModel/AlbumViewModel.cs create mode 100644 AD_MAUI/ViewModel/SongViewModel.cs create mode 100644 AD_MAUI/Views/AlbumPage.xaml create mode 100644 AD_MAUI/Views/AlbumPage.xaml.cs diff --git a/AD_MAUI/AD_MAUI.csproj b/AD_MAUI/AD_MAUI.csproj index 8512202..62bffea 100644 --- a/AD_MAUI/AD_MAUI.csproj +++ b/AD_MAUI/AD_MAUI.csproj @@ -3,6 +3,7 @@ net7.0-android;net7.0-ios;net7.0-maccatalyst $(TargetFrameworks);net7.0-windows10.0.19041.0 + enable Exe @@ -52,9 +53,14 @@ + + + MSBuild:Compile + + + - diff --git a/AD_MAUI/App.xaml.cs b/AD_MAUI/App.xaml.cs index ccd173d..9af73ec 100644 --- a/AD_MAUI/App.xaml.cs +++ b/AD_MAUI/App.xaml.cs @@ -2,10 +2,10 @@ public partial class App : Application { - public App() - { - InitializeComponent(); + public App() + { + InitializeComponent(); - MainPage = new AppShell(); - } + MainPage = new AppShell(); + } } diff --git a/AD_MAUI/AppShell.xaml.cs b/AD_MAUI/AppShell.xaml.cs index 40fb3e8..f2a9717 100644 --- a/AD_MAUI/AppShell.xaml.cs +++ b/AD_MAUI/AppShell.xaml.cs @@ -2,8 +2,8 @@ public partial class AppShell : Shell { - public AppShell() - { - InitializeComponent(); - } + public AppShell() + { + InitializeComponent(); + } } diff --git a/AD_MAUI/MainPage.xaml b/AD_MAUI/MainPage.xaml index ace5584..3fb575c 100644 --- a/AD_MAUI/MainPage.xaml +++ b/AD_MAUI/MainPage.xaml @@ -3,39 +3,10 @@ xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="AD_MAUI.MainPage"> - - - - - -