From 1b453ff787710f887dfcbe4621fcf7759398bd92 Mon Sep 17 00:00:00 2001 From: Corentin LEMAIRE Date: Wed, 5 Apr 2023 19:35:31 +0200 Subject: [PATCH] Add classes and VerticalStackLayout style --- Sources/Connsole/Console.csproj | 14 ++++++++ Sources/Connsole/Program.cs | 25 +++++++++++++ Sources/Linaris.sln | 12 +++++++ Sources/Linaris/AlbumPage.xaml | 5 +-- Sources/Linaris/AlbumPage.xaml.cs | 4 +-- Sources/Linaris/Resources/Styles/Styles.xaml | 12 +++++-- Sources/Model/Album.cs | 33 +++++++++++++++++ Sources/Model/Artiste.cs | 26 ++++++++++++++ Sources/Model/Model.csproj | 9 +++++ Sources/Model/Morceau.cs | 38 ++++++++++++++++++++ Sources/Model/Playlist.cs | 35 ++++++++++++++++++ 11 files changed, 206 insertions(+), 7 deletions(-) create mode 100644 Sources/Connsole/Console.csproj create mode 100644 Sources/Connsole/Program.cs create mode 100644 Sources/Model/Album.cs create mode 100644 Sources/Model/Artiste.cs create mode 100644 Sources/Model/Model.csproj create mode 100644 Sources/Model/Morceau.cs create mode 100644 Sources/Model/Playlist.cs diff --git a/Sources/Connsole/Console.csproj b/Sources/Connsole/Console.csproj new file mode 100644 index 0000000..6abd0f7 --- /dev/null +++ b/Sources/Connsole/Console.csproj @@ -0,0 +1,14 @@ + + + + Exe + net7.0 + enable + enable + + + + + + + diff --git a/Sources/Connsole/Program.cs b/Sources/Connsole/Program.cs new file mode 100644 index 0000000..6cb5ba9 --- /dev/null +++ b/Sources/Connsole/Program.cs @@ -0,0 +1,25 @@ +using Model; + + +// See https://aka.ms/new-console-template for more information + +Album a = new Album("Adios Bahamas", "album1.jpg", "Népal"); +Album a1 = new Album("Fenêtre sur Rue", "album3.jpg", "HugoTSR"); +Album a2 = new Album("Dans la Légende", "album8.jpg", "PNL"); + +List lst = new List { a1, a2, a }; + +foreach (Album album in lst) +{ + Console.WriteLine($"Nom de l'album : " + album.Nom); + + Console.WriteLine($"Nom du fichier : " + album.File_Name); + + Console.WriteLine($"Artiste : " + album.Artiste); + + Console.WriteLine($"-------------------------"); +} + + + + diff --git a/Sources/Linaris.sln b/Sources/Linaris.sln index 4240d83..413e4e5 100644 --- a/Sources/Linaris.sln +++ b/Sources/Linaris.sln @@ -5,6 +5,10 @@ VisualStudioVersion = 17.0.31611.283 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Linaris", "Linaris\Linaris.csproj", "{9E6281F7-95F6-472C-B268-894CE377C8A9}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Console", "Connsole\Console.csproj", "{BB50C1E3-5A9A-40AF-8CD7-55B41064290B}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Model", "Model\Model.csproj", "{AA1DB94B-8273-437F-A07A-BB1F5F0D278D}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -17,6 +21,14 @@ Global {9E6281F7-95F6-472C-B268-894CE377C8A9}.Release|Any CPU.ActiveCfg = Release|Any CPU {9E6281F7-95F6-472C-B268-894CE377C8A9}.Release|Any CPU.Build.0 = Release|Any CPU {9E6281F7-95F6-472C-B268-894CE377C8A9}.Release|Any CPU.Deploy.0 = Release|Any CPU + {BB50C1E3-5A9A-40AF-8CD7-55B41064290B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BB50C1E3-5A9A-40AF-8CD7-55B41064290B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BB50C1E3-5A9A-40AF-8CD7-55B41064290B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BB50C1E3-5A9A-40AF-8CD7-55B41064290B}.Release|Any CPU.Build.0 = Release|Any CPU + {AA1DB94B-8273-437F-A07A-BB1F5F0D278D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AA1DB94B-8273-437F-A07A-BB1F5F0D278D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AA1DB94B-8273-437F-A07A-BB1F5F0D278D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AA1DB94B-8273-437F-A07A-BB1F5F0D278D}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Sources/Linaris/AlbumPage.xaml b/Sources/Linaris/AlbumPage.xaml index b82d7ad..cad1ead 100644 --- a/Sources/Linaris/AlbumPage.xaml +++ b/Sources/Linaris/AlbumPage.xaml @@ -11,7 +11,8 @@ - + + diff --git a/Sources/Linaris/AlbumPage.xaml.cs b/Sources/Linaris/AlbumPage.xaml.cs index a5f9fe4..821b100 100644 --- a/Sources/Linaris/AlbumPage.xaml.cs +++ b/Sources/Linaris/AlbumPage.xaml.cs @@ -7,12 +7,12 @@ public partial class AlbumPage : ContentPage InitializeComponent(); } - async void Button_Clicked(object sender, EventArgs e) + /* async void Button_Clicked(object sender, EventArgs e) { var random = new Random(); var color = String.Format("#{0:X6}", random.Next(0x1000000)); bouton.BackgroundColor = Color.FromArgb(color); await bouton.RelRotateTo(360, 1000); bouton.Rotation = 0; - } + }*/ } \ No newline at end of file diff --git a/Sources/Linaris/Resources/Styles/Styles.xaml b/Sources/Linaris/Resources/Styles/Styles.xaml index 28e1697..e5c76b7 100644 --- a/Sources/Linaris/Resources/Styles/Styles.xaml +++ b/Sources/Linaris/Resources/Styles/Styles.xaml @@ -4,13 +4,15 @@ xmlns="http://schemas.microsoft.com/dotnet/2021/maui" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"> - - + + - + + +