modif ViewsApp en MusiLib + ajout logo sur affichage appli android

code
Vivien DUFOUR 2 years ago
parent bef54b51da
commit e4ee3b679d

@ -1,36 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace App.Models
{
class Metronome
{
public void lancer()
{
//lancer la partition
var son = AudioManager.Current.CreatePlayer(await FileSystem.OpenAppPackageFileAsync(""));
son.Play();
}
public void arreter()
{
//mettre en pause la partition
}
public void reinitialiser()
{
//remettre la partition à 0
}
public void regler()
{
//régler la partition (volume, tempo ...)
}
}
}

@ -1,31 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MauiApp1.Model
{
public class Partition
{
public string Nom { get; private set; }
public int IdPartition { get; private set; }
public string Auteur { get; private set; }
public int Complexite { get; private set; }
public string Description { get; private set; }
public string Instrument { get; private set; }
public string Son { get; private set; }
public Partition(string nom, int idPartition, string auteur, int complexite, string description, string instrument, string son)
{
Nom = nom;
IdPartition = idPartition;
Auteur = auteur;
Complexite = complexite;
Description = description;
Instrument = instrument;
Son = son;
}
}
}

@ -1,25 +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 augmenter(int valeur)
{
Valeur = valeur;
}
public void reduire(int valeur)
{
Valeur = valeur;
}
}
}

@ -1,36 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace App.Models
{
class Trier
{
public List<Partition> partitions = new List<Partition>();
public List<Partition> parNom(List<Partition> liste)
{
Comparer<Partition> comparer = Comparer<Partition>.Create((p1, p2) => p1.Nom.CompareTo(p2.Nom));
liste.Sort(comparer);
return liste;
}
public List<Partition> parComplexite(List<Partition> liste)
{
Comparer<Partition> comparer = Comparer<Partition>.Create((p1, p2) => p1.Complexite.CompareTo(p2.Complexite));
liste.Sort(comparer);
return liste;
}
public List<Partition> parInstrument(List<Partition> liste)
{
Comparer<Partition> comparer = Comparer<Partition>.Create((p1, p2) => p1.Instrument.CompareTo(p2.Instrument));
liste.Sort(comparer);
return liste;
}
}
}

@ -1,40 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MauiApp1.Model
{
public class Utilisateur
{
public int IdUtilisateur { get; private set; }
public List<Partition> Favoris { get; private set; }
public Utilisateur(int id)
{
IdUtilisateur = id;
Favoris = new List<Partition>;
}
public void ajouter(Partition partition)
{
favoris.Add(partition);
}
public void retirer(Partition partition)
{
favoris.Remove(partition);
}
public void retirerTout()
{
Favoris.Clear();
}
}
}

@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17 # Visual Studio Version 17
VisualStudioVersion = 17.0.31611.283 VisualStudioVersion = 17.0.31611.283
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ViewsApp", "ViewsApp\ViewsApp.csproj", "{ED56AAF4-0B15-453C-9AED-775E967658A1}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MusiLib", "MusiLib\MusiLib.csproj", "{8A10FC03-4412-41B1-96AB-A0AA658B2237}"
EndProject EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
@ -11,12 +11,12 @@ Global
Release|Any CPU = Release|Any CPU Release|Any CPU = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution GlobalSection(ProjectConfigurationPlatforms) = postSolution
{ED56AAF4-0B15-453C-9AED-775E967658A1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8A10FC03-4412-41B1-96AB-A0AA658B2237}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{ED56AAF4-0B15-453C-9AED-775E967658A1}.Debug|Any CPU.Build.0 = Debug|Any CPU {8A10FC03-4412-41B1-96AB-A0AA658B2237}.Debug|Any CPU.Build.0 = Debug|Any CPU
{ED56AAF4-0B15-453C-9AED-775E967658A1}.Debug|Any CPU.Deploy.0 = Debug|Any CPU {8A10FC03-4412-41B1-96AB-A0AA658B2237}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{ED56AAF4-0B15-453C-9AED-775E967658A1}.Release|Any CPU.ActiveCfg = Release|Any CPU {8A10FC03-4412-41B1-96AB-A0AA658B2237}.Release|Any CPU.ActiveCfg = Release|Any CPU
{ED56AAF4-0B15-453C-9AED-775E967658A1}.Release|Any CPU.Build.0 = Release|Any CPU {8A10FC03-4412-41B1-96AB-A0AA658B2237}.Release|Any CPU.Build.0 = Release|Any CPU
{ED56AAF4-0B15-453C-9AED-775E967658A1}.Release|Any CPU.Deploy.0 = Release|Any CPU {8A10FC03-4412-41B1-96AB-A0AA658B2237}.Release|Any CPU.Deploy.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE

@ -1,8 +1,8 @@
<?xml version = "1.0" encoding = "UTF-8" ?> <?xml version = "1.0" encoding = "UTF-8" ?>
<Application xmlns="http://schemas.microsoft.com/dotnet/2021/maui" <Application xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:ViewsApp" xmlns:local="clr-namespace:MusiLib"
x:Class="ViewsApp.App"> x:Class="MusiLib.App">
<Application.Resources> <Application.Resources>
<ResourceDictionary> <ResourceDictionary>
<ResourceDictionary.MergedDictionaries> <ResourceDictionary.MergedDictionaries>

@ -0,0 +1,17 @@
using MusiLib.Model;
namespace MusiLib;
public partial class App : Application
{
public Manager MyManager { get; private set; } = new Manager();
public App()
{
MyManager.chargerDonnees();
InitializeComponent();
MainPage = new AppShell();
}
}

@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<Shell <Shell
x:Class="ViewsApp.AppShell" x:Class="MusiLib.AppShell"
xmlns="http://schemas.microsoft.com/dotnet/2021/maui" xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:ViewsApp" xmlns:local="clr-namespace:MusiLib"
xmlns:views="clr-namespace:ViewsApp.Views" xmlns:views="clr-namespace:MusiLib.Views"
Shell.FlyoutBehavior="Disabled"> Shell.FlyoutBehavior="Disabled">
<TabBar> <TabBar>

@ -1,4 +1,4 @@
namespace ViewsApp; namespace MusiLib;
public partial class AppShell : Shell public partial class AppShell : Shell
{ {

@ -1,4 +1,4 @@
namespace ViewsApp; namespace MusiLib;
public static class MauiProgram public static class MauiProgram
{ {

@ -1,11 +1,11 @@
using MauiApp1.Model; using MusiLib.Model;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace ViewsApp.Model namespace MusiLib.Model
{ {
public class Manager public class Manager
{ {

@ -4,7 +4,7 @@ using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace MauiApp1.Model namespace MusiLib.Model
{ {
public class Partition public class Partition
{ {

@ -1,4 +1,4 @@
using MauiApp1.Model; using MusiLib.Model;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;

@ -4,7 +4,7 @@ using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace MauiApp1.Model namespace MusiLib.Model
{ {
public class Utilisateur public class Utilisateur

@ -6,17 +6,17 @@
<!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET --> <!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
<!-- <TargetFrameworks>$(TargetFrameworks);net6.0-tizen</TargetFrameworks> --> <!-- <TargetFrameworks>$(TargetFrameworks);net6.0-tizen</TargetFrameworks> -->
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<RootNamespace>ViewsApp</RootNamespace> <RootNamespace>MusiLib</RootNamespace>
<UseMaui>true</UseMaui> <UseMaui>true</UseMaui>
<SingleProject>true</SingleProject> <SingleProject>true</SingleProject>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<!-- Display name --> <!-- Display name -->
<ApplicationTitle>ViewsApp</ApplicationTitle> <ApplicationTitle>MusiLib</ApplicationTitle>
<!-- App Identifier --> <!-- App Identifier -->
<ApplicationId>com.companyname.viewsapp</ApplicationId> <ApplicationId>com.companyname.musilib</ApplicationId>
<ApplicationIdGuid>295ba9c5-f6fe-4439-8d4e-4847cfe92086</ApplicationIdGuid> <ApplicationIdGuid>c2deb312-b3f3-425c-8e4b-18b5328ffd7c</ApplicationIdGuid>
<!-- Versions --> <!-- Versions -->
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion> <ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
@ -32,10 +32,10 @@
<ItemGroup> <ItemGroup>
<!-- App Icon --> <!-- App Icon -->
<MauiIcon Include="Resources\AppIcon\appicon.svg" ForegroundFile="Resources\AppIcon\appiconfg.svg" Color="#512BD4" /> <MauiIcon Include="Resources\AppIcon\appicon.png" />
<!-- Splash Screen --> <!-- Splash Screen -->
<MauiSplashScreen Include="Resources\Splash\splash.svg" Color="#512BD4" BaseSize="128,128" /> <MauiSplashScreen Include="Resources\Splash\splash.png" Color="#512BD4" BaseSize="128,128" />
<!-- Images --> <!-- Images -->
<MauiImage Include="Resources\Images\*" /> <MauiImage Include="Resources\Images\*" />
@ -48,16 +48,4 @@
<MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" /> <MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<MauiXaml Update="Views\Accueil.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Views\Favoris.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Views\Partition.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
</ItemGroup>
</Project> </Project>

@ -2,7 +2,7 @@
using Android.Content.PM; using Android.Content.PM;
using Android.OS; using Android.OS;
namespace ViewsApp; namespace MusiLib;
[Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize | ConfigChanges.Density)] [Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize | ConfigChanges.Density)]
public class MainActivity : MauiAppCompatActivity public class MainActivity : MauiAppCompatActivity

@ -1,7 +1,7 @@
using Android.App; using Android.App;
using Android.Runtime; using Android.Runtime;
namespace ViewsApp; namespace MusiLib;
[Application] [Application]
public class MainApplication : MauiApplication public class MainApplication : MauiApplication

@ -1,6 +1,6 @@
using Foundation; using Foundation;
namespace ViewsApp; namespace MusiLib;
[Register("AppDelegate")] [Register("AppDelegate")]
public class AppDelegate : MauiUIApplicationDelegate public class AppDelegate : MauiUIApplicationDelegate

@ -1,7 +1,7 @@
using ObjCRuntime; using ObjCRuntime;
using UIKit; using UIKit;
namespace ViewsApp; namespace MusiLib;
public class Program public class Program
{ {

@ -2,7 +2,7 @@ using System;
using Microsoft.Maui; using Microsoft.Maui;
using Microsoft.Maui.Hosting; using Microsoft.Maui.Hosting;
namespace ViewsApp; namespace MusiLib;
class Program : MauiApplication class Program : MauiApplication
{ {

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest package="maui-application-id-placeholder" version="0.0.0" api-version="7" xmlns="http://tizen.org/ns/packages"> <manifest package="maui-application-id-placeholder" version="0.0.0" api-version="7" xmlns="http://tizen.org/ns/packages">
<profile name="common" /> <profile name="common" />
<ui-application appid="maui-application-id-placeholder" exec="ViewsApp.dll" multiple="false" nodisplay="false" taskmanage="true" type="dotnet" launch_mode="single"> <ui-application appid="maui-application-id-placeholder" exec="MusiLib.dll" multiple="false" nodisplay="false" taskmanage="true" type="dotnet" launch_mode="single">
<label>maui-application-title-placeholder</label> <label>maui-application-title-placeholder</label>
<icon>maui-appicon-placeholder</icon> <icon>maui-appicon-placeholder</icon>
<metadata key="http://tizen.org/metadata/prefer_dotnet_aot" value="true" /> <metadata key="http://tizen.org/metadata/prefer_dotnet_aot" value="true" />

@ -1,8 +1,8 @@
<maui:MauiWinUIApplication <maui:MauiWinUIApplication
x:Class="ViewsApp.WinUI.App" x:Class="MusiLib.WinUI.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:maui="using:Microsoft.Maui" xmlns:maui="using:Microsoft.Maui"
xmlns:local="using:ViewsApp.WinUI"> xmlns:local="using:MusiLib.WinUI">
</maui:MauiWinUIApplication> </maui:MauiWinUIApplication>

@ -3,7 +3,7 @@
// To learn more about WinUI, the WinUI project structure, // To learn more about WinUI, the WinUI project structure,
// and more about our project templates, see: http://aka.ms/winui-project-info. // and more about our project templates, see: http://aka.ms/winui-project-info.
namespace ViewsApp.WinUI; namespace MusiLib.WinUI;
/// <summary> /// <summary>
/// Provides application-specific behavior to supplement the default Application class. /// Provides application-specific behavior to supplement the default Application class.

@ -8,7 +8,7 @@
<Identity Name="maui-package-name-placeholder" Publisher="CN=User Name" Version="0.0.0.0" /> <Identity Name="maui-package-name-placeholder" Publisher="CN=User Name" Version="0.0.0.0" />
<mp:PhoneIdentity PhoneProductId="FAC7462E-80F2-4B96-A6E0-1534877E69C8" PhonePublisherId="00000000-0000-0000-0000-000000000000"/> <mp:PhoneIdentity PhoneProductId="85C0CD4C-62D6-4A47-89C0-F461EA43C20C" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>
<Properties> <Properties>
<DisplayName>$placeholder$</DisplayName> <DisplayName>$placeholder$</DisplayName>

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1"> <assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity version="1.0.0.0" name="ViewsApp.WinUI.app"/> <assemblyIdentity version="1.0.0.0" name="MusiLib.WinUI.app"/>
<application xmlns="urn:schemas-microsoft-com:asm.v3"> <application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings> <windowsSettings>

@ -1,6 +1,6 @@
using Foundation; using Foundation;
namespace ViewsApp; namespace MusiLib;
[Register("AppDelegate")] [Register("AppDelegate")]
public class AppDelegate : MauiUIApplicationDelegate public class AppDelegate : MauiUIApplicationDelegate

@ -1,7 +1,7 @@
using ObjCRuntime; using ObjCRuntime;
using UIKit; using UIKit;
namespace ViewsApp; namespace MusiLib;
public class Program public class Program
{ {

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Before

Width:  |  Height:  |  Size: 228 B

After

Width:  |  Height:  |  Size: 228 B

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Before

Width:  |  Height:  |  Size: 255 B

After

Width:  |  Height:  |  Size: 255 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui" <ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="ViewsApp.Views.Accueil" x:Class="MusiLib.Views.Accueil"
Title="Accueil" Title="Accueil"
BackgroundColor="White"> BackgroundColor="White">

@ -1,4 +1,4 @@
namespace ViewsApp.Views; namespace MusiLib.Views;
public partial class Accueil : ContentPage, IAllowClick public partial class Accueil : ContentPage, IAllowClick
{ {

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui" <ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="ViewsApp.Views.Favoris" x:Class="MusiLib.Views.Favoris"
Title="Favoris" Title="Favoris"
BackgroundColor="White"> BackgroundColor="White">

@ -1,4 +1,4 @@
namespace ViewsApp.Views; namespace MusiLib.Views;
public partial class Favoris : ContentPage, IAllowClick public partial class Favoris : ContentPage, IAllowClick
{ {

@ -4,7 +4,7 @@ using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace ViewsApp.Views namespace MusiLib.Views
{ {
public interface IAllowClick public interface IAllowClick
{ {

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui" <ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="ViewsApp.Views.Partition" x:Class="MusiLib.Views.Partition"
xmlns:model="clr-namespace:ViewsApp.Model" xmlns:model="clr-namespace:MusiLib.Model"
Title="Partition"> Title="Partition">
<ContentPage.BindingContext> <ContentPage.BindingContext>

@ -1,8 +1,7 @@
using System.Diagnostics; using MusiLib.Model;
using ViewsApp.Model;
namespace MusiLib.Views;
namespace ViewsApp.Views;
public partial class Partition : ContentPage public partial class Partition : ContentPage
{ {
@ -19,10 +18,12 @@ public partial class Partition : ContentPage
private void Button_Clicked(object sender, EventArgs e) private void Button_Clicked(object sender, EventArgs e)
{ {
var player = new Windows.Media.Playback.MediaPlayer(); /*var player = new Windows.Media.Playback.MediaPlayer();
var uri = new Uri($"C:/Users/Utilisateur/Documents/Cours/SAE/SAE_201/ViewsApp/ViewsApp/Resources/Raw/au_clair_de_la_lune.mp3"); var uri = new Uri($"C:/Users/Utilisateur/Documents/Cours/SAE/SAE_201/ViewsApp/ViewsApp/Resources/Raw/au_clair_de_la_lune.mp3");
player.SetUriSource(uri); player.SetUriSource(uri);
player.Volume = 0.5; player.Volume = 0.5;
player.Play(); player.Play();*/
} }
} }

@ -1,17 +0,0 @@
using ViewsApp.Model;
namespace ViewsApp;
public partial class App : Application
{
public Manager MyManager { get; private set; } = new Manager();
public App()
{
MyManager.chargerDonnees();
InitializeComponent();
MainPage = new AppShell();
}
}
Loading…
Cancel
Save