diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 10f0792..0000000 --- a/.gitignore +++ /dev/null @@ -1,375 +0,0 @@ -.idea - -bin/ -obj/ - -.nuspec/ -.buildtasks/ -templatesTest/ - -# User-specific files -*.rsuser -*.suo -*.user -*.userosscache -*.sln.docstates - -# User-specific files (MonoDevelop/Xamarin Studio) -*.userprefs - -# Mono auto generated files -mono_crash.* - -# Build results -[Dd]ebug/ -[Dd]ebugPublic/ -[Rr]elease/ -[Rr]eleases/ -x64/ -x86/ -[Ww][Ii][Nn]32/ -[Aa][Rr][Mm]/ -[Aa][Rr][Mm]64/ -bld/ -[Bb]in/ -[Oo]bj/ -[Ll]og/ -[Ll]ogs/ - -# Visual Studio 2015/2017 cache/options directory -.vs/ -# Uncomment if you have tasks that create the project's static files in wwwroot -#wwwroot/ - -# Visual Studio 2017 auto generated files -Generated\ Files/ - -# MSTest test Results -[Tt]est[Rr]esult*/ -[Bb]uild[Ll]og.* - -# NUnit -*.VisualState.xml -TestResult.xml -nunit-*.xml - -# Build Results of an ATL Project -[Dd]ebugPS/ -[Rr]eleasePS/ -dlldata.c - -# Benchmark Results -BenchmarkDotNet.Artifacts/ - -# .NET Core -project.lock.json -project.fragment.lock.json -artifacts/ - -# ASP.NET Scaffolding -ScaffoldingReadMe.txt - -# StyleCop -StyleCopReport.xml - -# Files built by Visual Studio -*_i.c -*_p.c -*_h.h -*.ilk -*.meta -*.obj -*.iobj -*.pch -*.pdb -*.ipdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.tmp_proj -*_wpftmp.csproj -*.log -*.vspscc -*.vssscc -.builds -*.pidb -*.svclog -*.scc - -# Chutzpah Test files -_Chutzpah* - -# Visual C++ cache files -ipch/ -*.aps -*.ncb -*.opendb -*.opensdf -*.sdf -*.cachefile -*.VC.db -*.VC.VC.opendb - -# Visual Studio profiler -*.psess -*.vsp -*.vspx -*.sap - -# Visual Studio Trace Files -*.e2e - -# TFS 2012 Local Workspace -$tf/ - -# Guidance Automation Toolkit -*.gpState - -# ReSharper is a .NET coding add-in -_ReSharper*/ -*.[Rr]e[Ss]harper -*.DotSettings.user - -# TeamCity is a build add-in -_TeamCity* - -# DotCover is a Code Coverage Tool -*.dotCover - -# AxoCover is a Code Coverage Tool -.axoCover/* -!.axoCover/settings.json - -# Coverlet is a free, cross platform Code Coverage Tool -coverage*.json -coverage*.xml -coverage*.info - -# Visual Studio code coverage results -*.coverage -*.coveragexml - -# NCrunch -_NCrunch_* -.*crunch*.local.xml -nCrunchTemp_* - -# MightyMoose -*.mm.* -AutoTest.Net/ - -# Web workbench (sass) -.sass-cache/ - -# Installshield output folder -[Ee]xpress/ - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - -# Click-Once directory -publish/ - -# Publish Web Output -*.[Pp]ublish.xml -*.azurePubxml -# Note: Comment the next line if you want to checkin your web deploy settings, -# but database connection strings (with potential passwords) will be unencrypted -*.pubxml -*.publishproj - -# Microsoft Azure Web App publish settings. Comment the next line if you want to -# checkin your Azure Web App publish settings, but sensitive information contained -# in these scripts will be unencrypted -PublishScripts/ - -# NuGet Packages -*.nupkg -# NuGet Symbol Packages -*.snupkg -# The packages folder can be ignored because of Package Restore -**/[Pp]ackages/* -# except build/, which is used as an MSBuild target. -!**/[Pp]ackages/build/ -# Uncomment if necessary however generally it will be regenerated when needed -#!**/[Pp]ackages/repositories.config -# NuGet v3's project.json files produces more ignorable files -*.nuget.props -*.nuget.targets - -# Microsoft Azure Build Output -csx/ -*.build.csdef - -# Microsoft Azure Emulator -ecf/ -rcf/ - -# Windows Store app package directories and files -AppPackages/ -BundleArtifacts/ -Package.StoreAssociation.xml -_pkginfo.txt -*.appx -*.appxbundle -*.appxupload - -# Visual Studio cache files -# files ending in .cache can be ignored -*.[Cc]ache -# but keep track of directories ending in .cache -!?*.[Cc]ache/ - -# Others -ClientBin/ -~$* -*~ -*.dbmdl -*.dbproj.schemaview -*.jfm -*.pfx -*.publishsettings -orleans.codegen.cs - -# Including strong name files can present a security risk -# (https://github.com/github/gitignore/pull/2483#issue-259490424) -#*.snk - -# Since there are multiple workflows, uncomment next line to ignore bower_components -# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) -#bower_components/ - -# RIA/Silverlight projects -Generated_Code/ - -# Backup & report files from converting an old project file -# to a newer Visual Studio version. Backup files are not needed, -# because we have git ;-) -_UpgradeReport_Files/ -Backup*/ -UpgradeLog*.XML -UpgradeLog*.htm -ServiceFabricBackup/ -*.rptproj.bak - -# SQL Server files -*.mdf -*.ldf -*.ndf - -# Business Intelligence projects -*.rdl.data -*.bim.layout -*.bim_*.settings -*.rptproj.rsuser -*- [Bb]ackup.rdl -*- [Bb]ackup ([0-9]).rdl -*- [Bb]ackup ([0-9][0-9]).rdl - -# Microsoft Fakes -FakesAssemblies/ - -# GhostDoc plugin setting file -*.GhostDoc.xml - -# Node.js Tools for Visual Studio -.ntvs_analysis.dat -node_modules/ - -# Visual Studio 6 build log -*.plg - -# Visual Studio 6 workspace options file -*.opt - -# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) -*.vbw - -# Visual Studio LightSwitch build output -**/*.HTMLClient/GeneratedArtifacts -**/*.DesktopClient/GeneratedArtifacts -**/*.DesktopClient/ModelManifest.xml -**/*.Server/GeneratedArtifacts -**/*.Server/ModelManifest.xml -_Pvt_Extensions - -# Paket dependency manager -.paket/paket.exe -paket-files/ - -# FAKE - F# Make -.fake/ - -# CodeRush personal settings -.cr/personal - -# Python Tools for Visual Studio (PTVS) -__pycache__/ -*.pyc - -# Cake - Uncomment if you are using it -tools/** -!tools/packages.config - -# Tabs Studio -*.tss - -# Telerik's JustMock configuration file -*.jmconfig - -# BizTalk build output -*.btp.cs -*.btm.cs -*.odx.cs -*.xsd.cs - -# OpenCover UI analysis results -OpenCover/ - -# Azure Stream Analytics local run output -ASALocalRun/ - -# MSBuild Binary and Structured Log -*.binlog - -# NVidia Nsight GPU debugger configuration file -*.nvuser - -# MFractors (Xamarin productivity tool) working folder -.mfractor/ - -# Local History for Visual Studio -.localhistory/ - -# BeatPulse healthcheck temp database -healthchecksdb - -# Backup folder for Package Reference Convert tool in Visual Studio 2017 -MigrationBackup/ - -# Ionide (cross platform F# VS Code tools) working folder -.ionide/ - -# Fody - auto-generated XML schema -FodyWeavers.xsd -.DS_Store - -# Android Studio -.gradle/ -.idea/ -local.properties - -# Directory Build overrides for local setups -Directory.Build.Override.props \ No newline at end of file diff --git a/.vs/ProjectSettings.json b/.vs/ProjectSettings.json new file mode 100644 index 0000000..f8b4888 --- /dev/null +++ b/.vs/ProjectSettings.json @@ -0,0 +1,3 @@ +{ + "CurrentProjectSetting": null +} \ No newline at end of file diff --git a/.vs/VSWorkspaceState.json b/.vs/VSWorkspaceState.json new file mode 100644 index 0000000..54831a0 --- /dev/null +++ b/.vs/VSWorkspaceState.json @@ -0,0 +1,8 @@ +{ + "ExpandedNodes": [ + "", + "\\MusiLib" + ], + "SelectedNode": "\\MusiLib\\MusiLib.sln", + "PreviewInSolutionExplorer": false +} \ No newline at end of file diff --git a/.vs/repos/FileContentIndex/83095e85-d1c7-485e-af3d-35e9b0777fb2.vsidx b/.vs/repos/FileContentIndex/83095e85-d1c7-485e-af3d-35e9b0777fb2.vsidx new file mode 100644 index 0000000..978b2a3 Binary files /dev/null and b/.vs/repos/FileContentIndex/83095e85-d1c7-485e-af3d-35e9b0777fb2.vsidx differ diff --git a/.vs/repos/FileContentIndex/c48615e6-946b-4e7e-8947-b8d95563c6ab.vsidx b/.vs/repos/FileContentIndex/c48615e6-946b-4e7e-8947-b8d95563c6ab.vsidx new file mode 100644 index 0000000..8543fbd Binary files /dev/null and b/.vs/repos/FileContentIndex/c48615e6-946b-4e7e-8947-b8d95563c6ab.vsidx differ diff --git a/.vs/repos/FileContentIndex/read.lock b/.vs/repos/FileContentIndex/read.lock new file mode 100644 index 0000000..e69de29 diff --git a/.vs/repos/v17/.wsuo b/.vs/repos/v17/.wsuo new file mode 100644 index 0000000..7855891 Binary files /dev/null and b/.vs/repos/v17/.wsuo differ diff --git a/.vs/slnx.sqlite b/.vs/slnx.sqlite new file mode 100644 index 0000000..798fb28 Binary files /dev/null and b/.vs/slnx.sqlite differ diff --git a/MusiLib/MusiLib.sln b/MusiLib/MusiLib.sln deleted file mode 100644 index eb5193b..0000000 --- a/MusiLib/MusiLib.sln +++ /dev/null @@ -1,27 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.0.31611.283 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MusiLib", "MusiLib\MusiLib.csproj", "{0990C3B0-336B-4149-A13E-1E10F136A8A8}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {0990C3B0-336B-4149-A13E-1E10F136A8A8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0990C3B0-336B-4149-A13E-1E10F136A8A8}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0990C3B0-336B-4149-A13E-1E10F136A8A8}.Debug|Any CPU.Deploy.0 = Debug|Any CPU - {0990C3B0-336B-4149-A13E-1E10F136A8A8}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0990C3B0-336B-4149-A13E-1E10F136A8A8}.Release|Any CPU.Build.0 = Release|Any CPU - {0990C3B0-336B-4149-A13E-1E10F136A8A8}.Release|Any CPU.Deploy.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {61F7FB11-1E47-470C-91E2-47F8143E1572} - EndGlobalSection -EndGlobal diff --git a/MusiLib/MusiLib/App.xaml b/MusiLib/MusiLib/App.xaml deleted file mode 100644 index 20b83a2..0000000 --- a/MusiLib/MusiLib/App.xaml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - diff --git a/MusiLib/MusiLib/App.xaml.cs b/MusiLib/MusiLib/App.xaml.cs deleted file mode 100644 index 2d76cf3..0000000 --- a/MusiLib/MusiLib/App.xaml.cs +++ /dev/null @@ -1,20 +0,0 @@ -using MusiLib.Model; - -namespace MusiLib; - -public partial class App : Application -{ - - public Manager MyManager { get; private set; } = new Manager(new Stub.Stub()); - public App() - { - MyManager.chargeDonnees(); - MyManager.Persistance = new DataContractPersistance.DataContractPers(); - MyManager.sauvegardeDonnees(); - - - InitializeComponent(); - - MainPage = new AppShell(); - } -} diff --git a/MusiLib/MusiLib/AppShell.xaml b/MusiLib/MusiLib/AppShell.xaml deleted file mode 100644 index f271e48..0000000 --- a/MusiLib/MusiLib/AppShell.xaml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - diff --git a/MusiLib/MusiLib/AppShell.xaml.cs b/MusiLib/MusiLib/AppShell.xaml.cs deleted file mode 100644 index 02ecd04..0000000 --- a/MusiLib/MusiLib/AppShell.xaml.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace MusiLib; - -public partial class AppShell : Shell -{ - public AppShell() - { - InitializeComponent(); - } -} diff --git a/MusiLib/MusiLib/DataContractPersistance/DataContractPers.cs b/MusiLib/MusiLib/DataContractPersistance/DataContractPers.cs deleted file mode 100644 index 50e80ca..0000000 --- a/MusiLib/MusiLib/DataContractPersistance/DataContractPers.cs +++ /dev/null @@ -1,72 +0,0 @@ -using Microsoft.Maui.Controls.PlatformConfiguration; -using MusiLib.Model; -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; -using System.Linq; -using System.Runtime.Serialization; -using System.Text; -using System.Threading.Tasks; - -namespace MusiLib.DataContractPersistance -{ - public class DataContractPers : IPersistanceManager - { - public string FilePath { get; set; } = Environment.GetFolderPath(Environment.SpecialFolder.Personal) + "/musilib"; - public string FileNameP { get; set; } = "UserFavoris.xml"; - public string FileNameU { get; set; } = "UserData.xml"; - - public (List, List) chargeDonnees() - { - var serializerP = new DataContractSerializer(typeof(List)); - var serializerU = new DataContractSerializer(typeof(List), new[] { typeof(Partition) }); - - List partitions = new List(); - List utilisateurs = new List(); - - string pathP = Path.Combine(FilePath, FileNameP); - if (File.Exists(pathP)) - { - using (Stream stream = File.OpenRead(pathP)) - { - partitions = serializerP.ReadObject(stream) as List; - } - } - - string pathU = Path.Combine(FilePath, FileNameU); - if (File.Exists(pathU)) - { - using (Stream stream = File.OpenRead(pathU)) - { - utilisateurs = serializerU.ReadObject(stream) as List; - } - } - - return (partitions, utilisateurs); - } - - public void sauvegardeDonnees(List p, List u) - { - var serializerP = new DataContractSerializer(typeof(List)); - var serializerU = new DataContractSerializer(typeof(List), new[] { typeof(Partition) }); - - if (!Directory.Exists(FilePath)) - { - System.Diagnostics.Debug.WriteLine("Directory créé à l'instant"); - System.Diagnostics.Debug.WriteLine(FilePath); - Directory.CreateDirectory(FilePath); - } - - using (Stream stream = File.Create(Path.Combine(FilePath, FileNameP))) - { - serializerP.WriteObject(stream, p); - } - - using (Stream stream = File.Create(Path.Combine(FilePath, FileNameU))) - { - serializerU.WriteObject(stream, u); - } - } - } -} \ No newline at end of file diff --git a/MusiLib/MusiLib/DataContractPersistance/DataToPersist.cs b/MusiLib/MusiLib/DataContractPersistance/DataToPersist.cs deleted file mode 100644 index 89bb7f6..0000000 --- a/MusiLib/MusiLib/DataContractPersistance/DataToPersist.cs +++ /dev/null @@ -1,15 +0,0 @@ -using MusiLib.Model; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace MusiLib.DataContractPersistance -{ - public class DataToPersist - { - public List utilisateurs = new List(); - public List partitions = new List(); - } -} diff --git a/MusiLib/MusiLib/MauiProgram.cs b/MusiLib/MusiLib/MauiProgram.cs deleted file mode 100644 index 5399d33..0000000 --- a/MusiLib/MusiLib/MauiProgram.cs +++ /dev/null @@ -1,24 +0,0 @@ -using MusiLib.Model; -using MusiLib.Views; -using Plugin.Maui.Audio; - -namespace MusiLib; - -public static class MauiProgram -{ - public static MauiApp CreateMauiApp() - { - var builder = MauiApp.CreateBuilder(); - builder - .UseMauiApp() - .ConfigureFonts(fonts => - { - fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular"); - fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold"); - }); - - builder.Services.AddSingleton(AudioManager.Current); - - return builder.Build(); - } -} diff --git a/MusiLib/MusiLib/Model/IPersistanceManager.cs b/MusiLib/MusiLib/Model/IPersistanceManager.cs deleted file mode 100644 index 435d4ac..0000000 --- a/MusiLib/MusiLib/Model/IPersistanceManager.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace MusiLib.Model -{ - public interface IPersistanceManager - { - (List, List) chargeDonnees(); - - void sauvegardeDonnees(List p, List u); - } -} diff --git a/MusiLib/MusiLib/Model/Manager.cs b/MusiLib/MusiLib/Model/Manager.cs deleted file mode 100644 index 99b388c..0000000 --- a/MusiLib/MusiLib/Model/Manager.cs +++ /dev/null @@ -1,60 +0,0 @@ -using MusiLib.Model; -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace MusiLib.Model -{ - public class Manager - { - public IPersistanceManager Persistance { get; set; } - public List utilisateurs { get; private set; } - public List partitions { get; private set; } - - public Manager() - { - utilisateurs = new List(); - partitions = new List(); - } - - public Manager(IPersistanceManager persistance) - { - Persistance = persistance; - utilisateurs = new List(); - partitions = new List(); - } - - public void ajouterUtilisateur(Utilisateur utilisateur) - { - utilisateurs.Add(utilisateur); - } - - public void ajouterPartition(Partition partition) - { - partitions.Add(partition); - } - - public void chargeDonnees() - { - var donnees = Persistance.chargeDonnees(); - utilisateurs.AddRange(donnees.Item2); - partitions.AddRange(donnees.Item1); - } - - public void sauvegardeDonnees() - { - Persistance.sauvegardeDonnees(partitions, utilisateurs); - } - - - - - - - } -} - - diff --git a/MusiLib/MusiLib/Model/Metronome.cs b/MusiLib/MusiLib/Model/Metronome.cs deleted file mode 100644 index 54cf7df..0000000 --- a/MusiLib/MusiLib/Model/Metronome.cs +++ /dev/null @@ -1,47 +0,0 @@ -using Plugin.Maui.Audio; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace MusiLib.Model -{ - public class Metronome - { - /*static AudioPlayer player; - static bool isMusicPlaying = false; - static bool isMusicBeginning = false; - - public static async void beginMusic() - { - player = (AudioPlayer)AudioManager.Current.CreatePlayer(await FileSystem.OpenAppPackageFileAsync("au_clair_de_la_lune.wav")); - player.Play(); - isMusicPlaying = true; - isMusicBeginning = true; - } - - public static void playMusic() - { - player.Play(); - isMusicPlaying = true; - } - - public static void pauseMusic() - { - player.Pause(); - isMusicPlaying = false; - } - public static void stopMusic() - { - if (isMusicBeginning) - { - player.Stop(); - isMusicPlaying = false; - isMusicBeginning = false; - } - }*/ - } - -} - diff --git a/MusiLib/MusiLib/Model/Partition.cs b/MusiLib/MusiLib/Model/Partition.cs deleted file mode 100644 index 64a74f0..0000000 --- a/MusiLib/MusiLib/Model/Partition.cs +++ /dev/null @@ -1,45 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Runtime.Serialization; -using System.Text; -using System.Threading.Tasks; - -namespace MusiLib.Model -{ - [DataContract] - public class Partition - { - [DataMember] - public static int idTotal = 0; - [DataMember] - public string Nom { get; private set; } - [DataMember] - public string Image { get; private set; } - [DataMember] - public int IdPartition { get; private set; } - [DataMember] - public string Auteur { get; private set; } - [DataMember] - public int Complexite { get; private set; } - [DataMember] - public string Description { get; private set; } - [DataMember] - public string Instrument { get; private set; } - [DataMember] - public string Son { get; private set; } - - public Partition(string nom, string auteur, int complexite, string description, string instrument,string image, string son) - { - Nom = nom; - IdPartition = idTotal; - Auteur = auteur; - Complexite = complexite; - Description = description; - Instrument = instrument; - Image = image; - Son = son; - } - - } -} diff --git a/MusiLib/MusiLib/Model/ReglageTempo.cs b/MusiLib/MusiLib/Model/ReglageTempo.cs deleted file mode 100644 index 587fe5a..0000000 --- a/MusiLib/MusiLib/Model/ReglageTempo.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace App.Models -{ - class ReglageTempo - { - public int Valeur { get; private set; } - - public void modifier(int valeur) - { - Valeur = valeur; - } - - } -} diff --git a/MusiLib/MusiLib/Model/Trier.cs b/MusiLib/MusiLib/Model/Trier.cs deleted file mode 100644 index 7a7907b..0000000 --- a/MusiLib/MusiLib/Model/Trier.cs +++ /dev/null @@ -1,37 +0,0 @@ -using MusiLib.Model; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace App.Models -{ - class Trier - { - - public List partitions = new List(); - - public List parNom(List liste) - { - Comparer comparer = Comparer.Create((p1, p2) => p1.Nom.CompareTo(p2.Nom)); - liste.Sort(comparer); - return liste; - } - - public List parComplexite(List liste) - { - Comparer comparer = Comparer.Create((p1, p2) => p1.Complexite.CompareTo(p2.Complexite)); - liste.Sort(comparer); - return liste; - } - - public List parInstrument(List liste) - { - Comparer comparer = Comparer.Create((p1, p2) => p1.Instrument.CompareTo(p2.Instrument)); - liste.Sort(comparer); - return liste; - } - - } -} diff --git a/MusiLib/MusiLib/Model/Utilisateur.cs b/MusiLib/MusiLib/Model/Utilisateur.cs deleted file mode 100644 index ab3b0d9..0000000 --- a/MusiLib/MusiLib/Model/Utilisateur.cs +++ /dev/null @@ -1,48 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Runtime.Serialization; -using System.Text; -using System.Threading.Tasks; - -namespace MusiLib.Model -{ - [DataContract] - public class Utilisateur - { - [DataMember] - public static int IdTotal = 0; - [DataMember] - public int IdUtilisateur { get; private set; } - [DataMember] - public string Nom { get; private set; } - [DataMember] - public static List Favoris { get; private set; } - - - public Utilisateur(string nom) - { - IdUtilisateur = IdTotal+1; - Nom = nom; - Favoris = new List(); - } - - - public void ajouter(Partition partition) - { - Favoris.Add(partition); - } - - public void retirer(Partition partition) - { - Favoris.Remove(partition); - } - - public void retirerTout() - { - Favoris.Clear(); - } - - } - -} diff --git a/MusiLib/MusiLib/MusiLib.csproj b/MusiLib/MusiLib/MusiLib.csproj deleted file mode 100644 index 75bb62f..0000000 --- a/MusiLib/MusiLib/MusiLib.csproj +++ /dev/null @@ -1,59 +0,0 @@ - - - - net6.0-android;net6.0-ios;net6.0-maccatalyst - $(TargetFrameworks);net6.0-windows10.0.19041.0 - - - Exe - MusiLib - true - true - enable - - - MusiLib - - - com.companyname.musilib - c2deb312-b3f3-425c-8e4b-18b5328ffd7c - - - 1.0 - 1 - - 14.2 - 14.0 - 21.0 - 10.0.17763.0 - 10.0.17763.0 - 6.5 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/MusiLib/MusiLib/Platforms/Android/AndroidManifest.xml b/MusiLib/MusiLib/Platforms/Android/AndroidManifest.xml deleted file mode 100644 index c612c62..0000000 --- a/MusiLib/MusiLib/Platforms/Android/AndroidManifest.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/MusiLib/MusiLib/Platforms/Android/MainActivity.cs b/MusiLib/MusiLib/Platforms/Android/MainActivity.cs deleted file mode 100644 index 0c91508..0000000 --- a/MusiLib/MusiLib/Platforms/Android/MainActivity.cs +++ /dev/null @@ -1,10 +0,0 @@ -using Android.App; -using Android.Content.PM; -using Android.OS; - -namespace MusiLib; - -[Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize | ConfigChanges.Density)] -public class MainActivity : MauiAppCompatActivity -{ -} diff --git a/MusiLib/MusiLib/Platforms/Android/MainApplication.cs b/MusiLib/MusiLib/Platforms/Android/MainApplication.cs deleted file mode 100644 index 869ce7e..0000000 --- a/MusiLib/MusiLib/Platforms/Android/MainApplication.cs +++ /dev/null @@ -1,15 +0,0 @@ -using Android.App; -using Android.Runtime; - -namespace MusiLib; - -[Application] -public class MainApplication : MauiApplication -{ - public MainApplication(IntPtr handle, JniHandleOwnership ownership) - : base(handle, ownership) - { - } - - protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); -} diff --git a/MusiLib/MusiLib/Platforms/Android/Resources/values/colors.xml b/MusiLib/MusiLib/Platforms/Android/Resources/values/colors.xml deleted file mode 100644 index c04d749..0000000 --- a/MusiLib/MusiLib/Platforms/Android/Resources/values/colors.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - #512BD4 - #2B0B98 - #2B0B98 - \ No newline at end of file diff --git a/MusiLib/MusiLib/Platforms/MacCatalyst/AppDelegate.cs b/MusiLib/MusiLib/Platforms/MacCatalyst/AppDelegate.cs deleted file mode 100644 index 2e894b0..0000000 --- a/MusiLib/MusiLib/Platforms/MacCatalyst/AppDelegate.cs +++ /dev/null @@ -1,9 +0,0 @@ -using Foundation; - -namespace MusiLib; - -[Register("AppDelegate")] -public class AppDelegate : MauiUIApplicationDelegate -{ - protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); -} diff --git a/MusiLib/MusiLib/Platforms/MacCatalyst/Info.plist b/MusiLib/MusiLib/Platforms/MacCatalyst/Info.plist deleted file mode 100644 index c96dd0a..0000000 --- a/MusiLib/MusiLib/Platforms/MacCatalyst/Info.plist +++ /dev/null @@ -1,30 +0,0 @@ - - - - - UIDeviceFamily - - 1 - 2 - - UIRequiredDeviceCapabilities - - arm64 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - XSAppIconAssets - Assets.xcassets/appicon.appiconset - - diff --git a/MusiLib/MusiLib/Platforms/MacCatalyst/Program.cs b/MusiLib/MusiLib/Platforms/MacCatalyst/Program.cs deleted file mode 100644 index 9dcf8b7..0000000 --- a/MusiLib/MusiLib/Platforms/MacCatalyst/Program.cs +++ /dev/null @@ -1,15 +0,0 @@ -using ObjCRuntime; -using UIKit; - -namespace MusiLib; - -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)); - } -} diff --git a/MusiLib/MusiLib/Platforms/Tizen/Main.cs b/MusiLib/MusiLib/Platforms/Tizen/Main.cs deleted file mode 100644 index 0f2afa1..0000000 --- a/MusiLib/MusiLib/Platforms/Tizen/Main.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; -using Microsoft.Maui; -using Microsoft.Maui.Hosting; - -namespace MusiLib; - -class Program : MauiApplication -{ - protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); - - static void Main(string[] args) - { - var app = new Program(); - app.Run(args); - } -} diff --git a/MusiLib/MusiLib/Platforms/Tizen/tizen-manifest.xml b/MusiLib/MusiLib/Platforms/Tizen/tizen-manifest.xml deleted file mode 100644 index 988df34..0000000 --- a/MusiLib/MusiLib/Platforms/Tizen/tizen-manifest.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - maui-appicon-placeholder - - - - - http://tizen.org/privilege/internet - - - - \ No newline at end of file diff --git a/MusiLib/MusiLib/Platforms/Windows/App.xaml b/MusiLib/MusiLib/Platforms/Windows/App.xaml deleted file mode 100644 index 107462c..0000000 --- a/MusiLib/MusiLib/Platforms/Windows/App.xaml +++ /dev/null @@ -1,8 +0,0 @@ - - - diff --git a/MusiLib/MusiLib/Platforms/Windows/App.xaml.cs b/MusiLib/MusiLib/Platforms/Windows/App.xaml.cs deleted file mode 100644 index 8ceeb23..0000000 --- a/MusiLib/MusiLib/Platforms/Windows/App.xaml.cs +++ /dev/null @@ -1,24 +0,0 @@ -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 MusiLib.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(); -} - diff --git a/MusiLib/MusiLib/Platforms/Windows/Package.appxmanifest b/MusiLib/MusiLib/Platforms/Windows/Package.appxmanifest deleted file mode 100644 index 81fb4da..0000000 --- a/MusiLib/MusiLib/Platforms/Windows/Package.appxmanifest +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - $placeholder$ - User Name - $placeholder$.png - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/MusiLib/MusiLib/Platforms/Windows/app.manifest b/MusiLib/MusiLib/Platforms/Windows/app.manifest deleted file mode 100644 index 83d965a..0000000 --- a/MusiLib/MusiLib/Platforms/Windows/app.manifest +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - true/PM - PerMonitorV2, PerMonitor - - - diff --git a/MusiLib/MusiLib/Platforms/iOS/AppDelegate.cs b/MusiLib/MusiLib/Platforms/iOS/AppDelegate.cs deleted file mode 100644 index 2e894b0..0000000 --- a/MusiLib/MusiLib/Platforms/iOS/AppDelegate.cs +++ /dev/null @@ -1,9 +0,0 @@ -using Foundation; - -namespace MusiLib; - -[Register("AppDelegate")] -public class AppDelegate : MauiUIApplicationDelegate -{ - protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); -} diff --git a/MusiLib/MusiLib/Platforms/iOS/Info.plist b/MusiLib/MusiLib/Platforms/iOS/Info.plist deleted file mode 100644 index 0004a4f..0000000 --- a/MusiLib/MusiLib/Platforms/iOS/Info.plist +++ /dev/null @@ -1,32 +0,0 @@ - - - - - LSRequiresIPhoneOS - - UIDeviceFamily - - 1 - 2 - - UIRequiredDeviceCapabilities - - arm64 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - XSAppIconAssets - Assets.xcassets/appicon.appiconset - - diff --git a/MusiLib/MusiLib/Platforms/iOS/Program.cs b/MusiLib/MusiLib/Platforms/iOS/Program.cs deleted file mode 100644 index 9dcf8b7..0000000 --- a/MusiLib/MusiLib/Platforms/iOS/Program.cs +++ /dev/null @@ -1,15 +0,0 @@ -using ObjCRuntime; -using UIKit; - -namespace MusiLib; - -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)); - } -} diff --git a/MusiLib/MusiLib/Properties/launchSettings.json b/MusiLib/MusiLib/Properties/launchSettings.json deleted file mode 100644 index edf8aad..0000000 --- a/MusiLib/MusiLib/Properties/launchSettings.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "profiles": { - "Windows Machine": { - "commandName": "MsixPackage", - "nativeDebugging": false - } - } -} \ No newline at end of file diff --git a/MusiLib/MusiLib/Resources/AppIcon/appicon.png b/MusiLib/MusiLib/Resources/AppIcon/appicon.png deleted file mode 100644 index 4ecbc4a..0000000 Binary files a/MusiLib/MusiLib/Resources/AppIcon/appicon.png and /dev/null differ diff --git a/MusiLib/MusiLib/Resources/AppIcon/appicon.svg b/MusiLib/MusiLib/Resources/AppIcon/appicon.svg deleted file mode 100644 index 9d63b65..0000000 --- a/MusiLib/MusiLib/Resources/AppIcon/appicon.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/MusiLib/MusiLib/Resources/AppIcon/appiconfg.svg b/MusiLib/MusiLib/Resources/AppIcon/appiconfg.svg deleted file mode 100644 index 21dfb25..0000000 --- a/MusiLib/MusiLib/Resources/AppIcon/appiconfg.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/MusiLib/MusiLib/Resources/Fonts/OpenSans-Regular.ttf b/MusiLib/MusiLib/Resources/Fonts/OpenSans-Regular.ttf deleted file mode 100644 index a49f11d..0000000 Binary files a/MusiLib/MusiLib/Resources/Fonts/OpenSans-Regular.ttf and /dev/null differ diff --git a/MusiLib/MusiLib/Resources/Fonts/OpenSans-Semibold.ttf b/MusiLib/MusiLib/Resources/Fonts/OpenSans-Semibold.ttf deleted file mode 100644 index 23911e4..0000000 Binary files a/MusiLib/MusiLib/Resources/Fonts/OpenSans-Semibold.ttf and /dev/null differ diff --git a/MusiLib/MusiLib/Resources/Images/amazing.png b/MusiLib/MusiLib/Resources/Images/amazing.png deleted file mode 100644 index 77e6321..0000000 Binary files a/MusiLib/MusiLib/Resources/Images/amazing.png and /dev/null differ diff --git a/MusiLib/MusiLib/Resources/Images/au_clair_de.png b/MusiLib/MusiLib/Resources/Images/au_clair_de.png deleted file mode 100644 index a1e753b..0000000 Binary files a/MusiLib/MusiLib/Resources/Images/au_clair_de.png and /dev/null differ diff --git a/MusiLib/MusiLib/Resources/Images/aura_lee_love_me.png b/MusiLib/MusiLib/Resources/Images/aura_lee_love_me.png deleted file mode 100644 index b6d290d..0000000 Binary files a/MusiLib/MusiLib/Resources/Images/aura_lee_love_me.png and /dev/null differ diff --git a/MusiLib/MusiLib/Resources/Images/dotnet_bot.svg b/MusiLib/MusiLib/Resources/Images/dotnet_bot.svg deleted file mode 100644 index abfaff2..0000000 --- a/MusiLib/MusiLib/Resources/Images/dotnet_bot.svg +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/MusiLib/MusiLib/Resources/Images/etoile.png b/MusiLib/MusiLib/Resources/Images/etoile.png deleted file mode 100644 index a4176e5..0000000 Binary files a/MusiLib/MusiLib/Resources/Images/etoile.png and /dev/null differ diff --git a/MusiLib/MusiLib/Resources/Images/fais_dodo_colas.png b/MusiLib/MusiLib/Resources/Images/fais_dodo_colas.png deleted file mode 100644 index 6477793..0000000 Binary files a/MusiLib/MusiLib/Resources/Images/fais_dodo_colas.png and /dev/null differ diff --git a/MusiLib/MusiLib/Resources/Images/frere_jacques.png b/MusiLib/MusiLib/Resources/Images/frere_jacques.png deleted file mode 100644 index f118c49..0000000 Binary files a/MusiLib/MusiLib/Resources/Images/frere_jacques.png and /dev/null differ diff --git a/MusiLib/MusiLib/Resources/Images/logo.png b/MusiLib/MusiLib/Resources/Images/logo.png deleted file mode 100644 index 4ecbc4a..0000000 Binary files a/MusiLib/MusiLib/Resources/Images/logo.png and /dev/null differ diff --git a/MusiLib/MusiLib/Resources/Images/ode_a_la.png b/MusiLib/MusiLib/Resources/Images/ode_a_la.png deleted file mode 100644 index f7e3bac..0000000 Binary files a/MusiLib/MusiLib/Resources/Images/ode_a_la.png and /dev/null differ diff --git a/MusiLib/MusiLib/Resources/Images/partition.png b/MusiLib/MusiLib/Resources/Images/partition.png deleted file mode 100644 index 4bc0acf..0000000 Binary files a/MusiLib/MusiLib/Resources/Images/partition.png and /dev/null differ diff --git a/MusiLib/MusiLib/Resources/Images/tri.png b/MusiLib/MusiLib/Resources/Images/tri.png deleted file mode 100644 index ed3f8e1..0000000 Binary files a/MusiLib/MusiLib/Resources/Images/tri.png and /dev/null differ diff --git a/MusiLib/MusiLib/Resources/Raw/AboutAssets.txt b/MusiLib/MusiLib/Resources/Raw/AboutAssets.txt deleted file mode 100644 index 15d6244..0000000 --- a/MusiLib/MusiLib/Resources/Raw/AboutAssets.txt +++ /dev/null @@ -1,15 +0,0 @@ -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/MusiLib/MusiLib/Resources/Raw/ah-vous-dirai-je-maman.mid b/MusiLib/MusiLib/Resources/Raw/ah-vous-dirai-je-maman.mid deleted file mode 100644 index 82bcd03..0000000 Binary files a/MusiLib/MusiLib/Resources/Raw/ah-vous-dirai-je-maman.mid and /dev/null differ diff --git a/MusiLib/MusiLib/Resources/Raw/amazing-grace.mid b/MusiLib/MusiLib/Resources/Raw/amazing-grace.mid deleted file mode 100644 index 4bcdce8..0000000 Binary files a/MusiLib/MusiLib/Resources/Raw/amazing-grace.mid and /dev/null differ diff --git a/MusiLib/MusiLib/Resources/Raw/au_clair_de_la_lune.mp3 b/MusiLib/MusiLib/Resources/Raw/au_clair_de_la_lune.mp3 deleted file mode 100644 index 9551d00..0000000 Binary files a/MusiLib/MusiLib/Resources/Raw/au_clair_de_la_lune.mp3 and /dev/null differ diff --git a/MusiLib/MusiLib/Resources/Raw/au_clair_de_la_lune.wav b/MusiLib/MusiLib/Resources/Raw/au_clair_de_la_lune.wav deleted file mode 100644 index 1cd6d0a..0000000 Binary files a/MusiLib/MusiLib/Resources/Raw/au_clair_de_la_lune.wav and /dev/null differ diff --git a/MusiLib/MusiLib/Resources/Raw/aura-lee-love-me-tender.mid b/MusiLib/MusiLib/Resources/Raw/aura-lee-love-me-tender.mid deleted file mode 100644 index ce15d20..0000000 Binary files a/MusiLib/MusiLib/Resources/Raw/aura-lee-love-me-tender.mid and /dev/null differ diff --git a/MusiLib/MusiLib/Resources/Raw/fais-dodo-colas-mon-petit-frere.mid b/MusiLib/MusiLib/Resources/Raw/fais-dodo-colas-mon-petit-frere.mid deleted file mode 100644 index de63a64..0000000 Binary files a/MusiLib/MusiLib/Resources/Raw/fais-dodo-colas-mon-petit-frere.mid and /dev/null differ diff --git a/MusiLib/MusiLib/Resources/Raw/frere-jacques.mid b/MusiLib/MusiLib/Resources/Raw/frere-jacques.mid deleted file mode 100644 index a50803a..0000000 Binary files a/MusiLib/MusiLib/Resources/Raw/frere-jacques.mid and /dev/null differ diff --git a/MusiLib/MusiLib/Resources/Raw/la-mort-d-ase-tod-death.mid b/MusiLib/MusiLib/Resources/Raw/la-mort-d-ase-tod-death.mid deleted file mode 100644 index bd53033..0000000 Binary files a/MusiLib/MusiLib/Resources/Raw/la-mort-d-ase-tod-death.mid and /dev/null differ diff --git a/MusiLib/MusiLib/Resources/Raw/lettre-a-elise.mid b/MusiLib/MusiLib/Resources/Raw/lettre-a-elise.mid deleted file mode 100644 index 829916a..0000000 Binary files a/MusiLib/MusiLib/Resources/Raw/lettre-a-elise.mid and /dev/null differ diff --git a/MusiLib/MusiLib/Resources/Raw/romance-en-mi-majeur.mid b/MusiLib/MusiLib/Resources/Raw/romance-en-mi-majeur.mid deleted file mode 100644 index 9840962..0000000 Binary files a/MusiLib/MusiLib/Resources/Raw/romance-en-mi-majeur.mid and /dev/null differ diff --git a/MusiLib/MusiLib/Resources/Splash/splash.png b/MusiLib/MusiLib/Resources/Splash/splash.png deleted file mode 100644 index 4ecbc4a..0000000 Binary files a/MusiLib/MusiLib/Resources/Splash/splash.png and /dev/null differ diff --git a/MusiLib/MusiLib/Resources/Splash/splash.svg b/MusiLib/MusiLib/Resources/Splash/splash.svg deleted file mode 100644 index 21dfb25..0000000 --- a/MusiLib/MusiLib/Resources/Splash/splash.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/MusiLib/MusiLib/Resources/Styles/Colors.xaml b/MusiLib/MusiLib/Resources/Styles/Colors.xaml deleted file mode 100644 index 245758b..0000000 --- a/MusiLib/MusiLib/Resources/Styles/Colors.xaml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - #512BD4 - #DFD8F7 - #2B0B98 - White - Black - #E1E1E1 - #C8C8C8 - #ACACAC - #919191 - #6E6E6E - #404040 - #212121 - #141414 - - - - - - - - - - - - - - - #F7B548 - #FFD590 - #FFE5B9 - #28C2D1 - #7BDDEF - #C3F2F4 - #3E8EED - #72ACF1 - #A7CBF6 - - \ No newline at end of file diff --git a/MusiLib/MusiLib/Resources/Styles/Styles.xaml b/MusiLib/MusiLib/Resources/Styles/Styles.xaml deleted file mode 100644 index 1ec9d55..0000000 --- a/MusiLib/MusiLib/Resources/Styles/Styles.xaml +++ /dev/null @@ -1,384 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/MusiLib/MusiLib/Stub/Stub.cs b/MusiLib/MusiLib/Stub/Stub.cs deleted file mode 100644 index 2ee557f..0000000 --- a/MusiLib/MusiLib/Stub/Stub.cs +++ /dev/null @@ -1,47 +0,0 @@ -using Microsoft.Maui.Controls; -using MusiLib.Model; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Security.Cryptography.X509Certificates; -using System.Text; -using System.Threading.Tasks; - -namespace MusiLib.Stub -{ - public class Stub : IPersistanceManager - { - public (List, List) chargeDonnees() - { - List favoris = new List(); - List utilisateurs = new List(); - - - Utilisateur kevin = new Utilisateur("Kevin"); - Utilisateur michel = new Utilisateur("Michel"); - utilisateurs.Add(kevin); - utilisateurs.Add(michel); - - Partition amazing_grace = new Partition("Amazing Grace", "John Newton", 0, "Amazing Grace est l'un des cantiques chrétiens les plus célèbres dans le monde anglophone. La première publication des paroles date de 1779. Associé à diverses mélodies au fil des années, il est aujourd'hui interprété sur la musique de New Britain", "piano","amazing.png", "amazing-grace.mid"); - Partition au_clair_de_la_lune = new Partition("Au clair de la lune", "Édouard-Léon Scott de Martinville", 0, "Au clair de la lune est une chanson populaire française dont la mélodie, très caractéristique, ainsi que les paroles — surtout celles du premier couplet — sont si familières qu'elles ont fait l'objet d'innombrables citations, adaptations, parodies, pastiches, etc.", "piano","au_clair_de.png", "au_clair_de_la_lune.wav"); - Partition aura_lee_love_me = new Partition("aura_lee_love_me_tender", "Elvis Presley", 0, " Love Me Tender est une ballade de 1956 enregistrée par Elvis Presley et publiée par Elvis Presley Music du film du même nom de la 20th Century Fox . Les paroles sont créditées à Vera Matson (bien que le parolier réel était son mari, Ken Darby) et Elvis Presley lui-même. La mélodie est identique à la ballade sentimentale de la guerre civile Aura Lea et donc attribuée au compositeur d'Aura Lea, l'Anglais George R. Poulton.", "piano", "aura_lee_love_me.png", "aura-lee-love-me-tender.mid"); - Partition ode_a_la_joie = new Partition("ode_joie", "Friedrich von Schiller", 0, "Ode à la joie — appelée également Hymne à la joie1 — est un poème de Friedrich von Schiller écrit en 1785. Il est surtout connu comme finale du quatrième et dernier mouvement de la 9e Symphonie de Beethoven, devenu l'hymne officiel de l'Union européenne2.\r\n\r\nCe poème célèbre l'idéal de l'unité et de la fraternité humaines (« Millions d’êtres, soyez tous embrassés d’une commune étreinte ! ). Son titre original est An die Freude, mais il est souvent appelé Ode an die Freude.", "piano", "ode_a_la.png", "amazing-grace.mid"); - Partition fais_dodo_colas = new Partition("fais_dodo", "Inconnu", 0, "Fais dodo est une berceuse enfantine en langue française dont l'auteur est inconnu et est dans le domaine public. La mélodie, très connue, date du XVIIIe siècle et se chante dans toutes les régions de France et également au Québec. Il y a quelques variantes, où les ingrédients du texte changent : nougat au lieu de chocolat, d'autres fois des bateaux : « Papa est en haut qui fait des bateaux pour le p'tit Pierrot qui fait son dodo... » ", "piano", "fais_dodo_colas.png", "fais-dodo-colas-mon-petit-frere.mid"); - Partition Frere_Jacques = new Partition("Frère_Jacques", "Jean-Philippe Rameau", 0, "Frère Jacques est une chanson enfantine française du XVIIIe siècle, connue dans le monde entier et traduite dans de nombreuses langues. Longtemps considérée comme anonyme, elle a vraisemblablement pour auteur Jean-Philippe Rameau. Selon l'historienne et musicologue Sylvie Bouissou, l'auteur de la chanson n'est autre que Jean-Philippe Rameau1,2. En effet, dans un exemplaire de son ouvrage Diapason général de tous les instruments à vent (1772), Louis-Joseph Francœur, violoniste de l'Opéra de Paris dans les années où Rameau y était actif, a inséré les manuscrits de quatre canons qu'il attribue à Rameau, parmi lesquels on trouve donc Frère Jacques, mais surtout deux autres déjà connus comme étant de Rameau;", "piano", "frere_jacques.png", "frere-jacques.mid"); - - - favoris.Add(amazing_grace); - favoris.Add(au_clair_de_la_lune); - favoris.Add(aura_lee_love_me); - favoris.Add(ode_a_la_joie); - favoris.Add(fais_dodo_colas); - favoris.Add(Frere_Jacques); - return (favoris, utilisateurs); - } - - public void sauvegardeDonnees(List p, List u) - { - - } - } -} diff --git a/MusiLib/MusiLib/Views/Accueil.xaml b/MusiLib/MusiLib/Views/Accueil.xaml deleted file mode 100644 index e3aa46b..0000000 --- a/MusiLib/MusiLib/Views/Accueil.xaml +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/MusiLib/MusiLib/Views/Accueil.xaml.cs b/MusiLib/MusiLib/Views/Accueil.xaml.cs deleted file mode 100644 index 2ba61f9..0000000 --- a/MusiLib/MusiLib/Views/Accueil.xaml.cs +++ /dev/null @@ -1,42 +0,0 @@ -using Plugin.Maui.Audio; -using MusiLib.Model; -namespace MusiLib.Views; - -public partial class Accueil : ContentPage, IAllowClick -{ - - public Manager MyManager => (App.Current as App).MyManager; - public Accueil() - { - InitializeComponent(); - BindingContext = MyManager; - } - - private void GoToFavorisButton(object sender, EventArgs e) - { - if (!IAllowClick.AllowTap) return; - else IAllowClick.AllowTap = false; - - Navigation.PushAsync(new Favoris()); - - IAllowClick.ResumeTap(); - } - - private void GoToPartitionButton(object sender, EventArgs e) - { - if (!IAllowClick.AllowTap) return; - else IAllowClick.AllowTap = false; - - var button = (ImageButton)sender; - var idAutomation = button.AutomationId; - - if (int.TryParse(idAutomation, out int id)) - { - Navigation.PushAsync(new Partition(id)); - } - - - IAllowClick.ResumeTap(); - } - -} \ No newline at end of file diff --git a/MusiLib/MusiLib/Views/Favoris.xaml b/MusiLib/MusiLib/Views/Favoris.xaml deleted file mode 100644 index d3ec9bd..0000000 --- a/MusiLib/MusiLib/Views/Favoris.xaml +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/MusiLib/MusiLib/Views/Favoris.xaml.cs b/MusiLib/MusiLib/Views/Favoris.xaml.cs deleted file mode 100644 index 95fe0e6..0000000 --- a/MusiLib/MusiLib/Views/Favoris.xaml.cs +++ /dev/null @@ -1,97 +0,0 @@ -using MusiLib.Model; -using System.Diagnostics; - -namespace MusiLib.Views; - - -public partial class Favoris : ContentPage, IAllowClick -{ - - public Manager MyManager => (App.Current as App).MyManager; - - - public Favoris() - { - InitializeComponent(); - chargerFavoris(); - } - - - private void GoToAccueilByLogoButton(object sender, EventArgs e) - { - if (!IAllowClick.AllowTap) return; - else IAllowClick.AllowTap = false; - - Navigation.PopAsync(); - - IAllowClick.ResumeTap(); - } - - - private void GoToPartitionButton(object sender, EventArgs e) - { - if (!IAllowClick.AllowTap) return; - else IAllowClick.AllowTap = false; - - var button = (ImageButton)sender; - var idAutomation = button.AutomationId; - - if (int.TryParse(idAutomation, out int id)) - { - Navigation.PushAsync(new Partition(id)); - } - - IAllowClick.ResumeTap(); - } - - - private void chargerFavoris() - { - int imagesParLigne = 3; - int indice = 0; - - for (int i = 0; i < Utilisateur.Favoris.Count; i++) - { - Model.Partition favoris = Utilisateur.Favoris[i]; - - ImageButton imageButton = new ImageButton - { - Source = favoris.Image, - WidthRequest = 175, - HeightRequest = 175, - AutomationId = indice.ToString(), - }; - - imageButton.Clicked += GoToPartitionButton; - - int ligne = 1 + (indice / imagesParLigne); - int colonne = indice % imagesParLigne; - - imageButton.Margin = GetImageButtonMargin(colonne); - - Grid.SetRow(imageButton, ligne); - Grid.SetColumn(imageButton, colonne); - grille.Children.Add(imageButton); - - indice++; - } - } - - private Thickness GetImageButtonMargin(int colonne) - { - if (colonne == 0) - { - return new Thickness(30, 0, 0, 0); - } - else if (colonne == 1) - { - return new Thickness(90, 0, 0, 0); - } - else - { - return new Thickness(150, 0, 0, 0); - } - } - - -} \ No newline at end of file diff --git a/MusiLib/MusiLib/Views/IAllowClick.cs b/MusiLib/MusiLib/Views/IAllowClick.cs deleted file mode 100644 index cba0184..0000000 --- a/MusiLib/MusiLib/Views/IAllowClick.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace MusiLib.Views -{ - public interface IAllowClick - { - public static bool AllowTap = true; - - public static async void ResumeTap() - { - await Task.Delay(500); - AllowTap = true; - } - } -} diff --git a/MusiLib/MusiLib/Views/IPlayMusic.cs b/MusiLib/MusiLib/Views/IPlayMusic.cs deleted file mode 100644 index 4185f5d..0000000 --- a/MusiLib/MusiLib/Views/IPlayMusic.cs +++ /dev/null @@ -1,42 +0,0 @@ -using Plugin.Maui.Audio; - -namespace MusiLib.Views -{ - public interface IPlayMusic - { - static AudioPlayer player; - static bool isMusicPlaying = false; - static bool isMusicBeginning = false; - - public static async void beginMusic(string son) - { - player = (AudioPlayer)AudioManager.Current.CreatePlayer(await FileSystem.OpenAppPackageFileAsync(son)); - player.Play(); - isMusicPlaying = true; - isMusicBeginning = true; - } - - public static void playMusic() - { - player.Play(); - isMusicPlaying = true; - } - - public static void pauseMusic() - { - player.Pause(); - isMusicPlaying = false; - } - - public static void stopMusic() - { - if(isMusicBeginning) - { - player.Stop(); - isMusicPlaying = false; - isMusicBeginning = false; - } - } - - } -} diff --git a/MusiLib/MusiLib/Views/Partition.xaml b/MusiLib/MusiLib/Views/Partition.xaml deleted file mode 100644 index 9b35c1e..0000000 --- a/MusiLib/MusiLib/Views/Partition.xaml +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - - - - - - -