Merged
continuous-integration/drone/push Build is failing Details

pull/26/head
HMatheo 2 years ago
commit 6f47132e2d

@ -9,15 +9,12 @@ trigger:
steps:
- name: build
image: mcr.microsoft.com/dotnet/sdk:7.0
volumes:
- name: Documentation
path: /Documentation
image: hub.codefirst.iut.uca.fr/marc.chevaldonne/codefirst-dotnet7-maui:latest
commands:
- cd MangaMap/
- dotnet restore MangaMap.sln
- dotnet build MangaMap.sln -c Release --no-restore
- dotnet publish SolutionTest.sln -c Release --no-restore -o $CI_PROJECT_DIR/build/release
- dotnet build MangaMap.sln -c Release --no-restore --framework net7.0
- dotnet publish MangaMap.sln -c Release --no-restore -o $CI_PROJECT_DIR/build/release --framework net7.0
- name: tests
image: mcr.microsoft.com/dotnet/sdk:7.0
@ -56,9 +53,3 @@ steps:
event:
- push
depends_on: [ build, tests ]
volumes:
- name: docs
temp: {}

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

@ -6,20 +6,34 @@ namespace MangaMap;
public partial class App : Application
{
//public Manager MyManager { get; private set; } = new Manager(new Stub.Stub()); //pour utiliser le stub comme moyen de persistance.
public Manager MyManager { get; private set; } = new Manager(new Stub.DataContract());
public string FileName { get; set; } = "SauvegardeDonnees.xml";
public string FilePath { get; set; } = Path.Combine(AppDomain.CurrentDomain.BaseDirectory);
public Admin MyAdmin { get; private set; } = new Admin("test", "test@test.ts", "Pseudo_test");
public Manager MyManager { get; private set; } = new Manager(new Stub.Stub()); //pour utiliser le stub comme moyen de persistance.
public App()
{
public Admin MyAdmin { get; private set; } = new Admin("test", "test@test.ts", "Pseudo_test");
public App()
{
InitializeComponent();
if (File.Exists(Path.Combine(FilePath, FileName)))
{
MyManager = new Manager(new Stub.DataContract()); //pour utiliser le dataContract comme moyen de persistance.
}
MyManager.charger();
MyManager.Admins.Add(MyAdmin);
MyManager.Admins.Add(MyAdmin);
//MyManager.UtilisateurActuel = MyManager.charger();
MainPage = new AppShell();
MainPage = new AppShell();
//MyManager.Persistance = new DataContract();
if (!File.Exists(Path.Combine(FilePath, FileName)))
{
MyManager.Persistance = new DataContract(); //pour utiliser le stub comme moyen de persistance.
}
MyManager.sauvegarder();
Console.WriteLine("sauvegarde faite");
}
}

@ -11,11 +11,6 @@
<TabBar Route="page">
<ShellContent
Title="HomeDisconnect"
ContentTemplate="{DataTemplate Views:homePageDisconnect}"
Route="homePageDisconnect" />
<ShellContent
Title="Home"
ContentTemplate="{DataTemplate Views:homePage}"

@ -8,7 +8,7 @@ public partial class AppShell : Shell
{
InitializeComponent();
Routing.RegisterRoute("homePagedetails", typeof(homePage));
Routing.RegisterRoute("homePagedetails", typeof(homePage));
Routing.RegisterRoute("inscriptionPagedetails", typeof(signUpPage));
Routing.RegisterRoute("connexionPagedetails", typeof(loginPage));
Routing.RegisterRoute("settingsPagedetails", typeof(settingsPage));

@ -3,7 +3,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="MangaMap.NewContent1"
Background="{StaticResource Primary}">
<Grid ColumnDefinitions="50, *, 30">
<Grid ColumnDefinitions="50, *, 40">
<ImageButton Source="logo.png"
MaximumHeightRequest="30"
MaximumWidthRequest="30"

@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MangaMap.DataBinding
{
public interface INotifyPropertyChanged
{
}
}

@ -49,18 +49,18 @@
</ItemGroup>
<ItemGroup>
<AndroidResource Remove="Component\**" />
<Compile Remove="Component\**" />
<EmbeddedResource Remove="Component\**" />
<MauiCss Remove="Component\**" />
<MauiXaml Remove="Component\**" />
<None Remove="Component\**" />
<AndroidResource Remove="Component\**" />
<Compile Remove="Component\**" />
<EmbeddedResource Remove="Component\**" />
<MauiCss Remove="Component\**" />
<MauiXaml Remove="Component\**" />
<None Remove="Component\**" />
</ItemGroup>
<ItemGroup>
<None Remove="Resources\Images\logo.png" />
<None Remove="Resources\Images\settings.png" />
<None Remove="Resources\Images\test.jpg" />
<None Remove="Resources\Images\Evangelion.jpg" />
<None Remove="Resources\Images\logo.png" />
<None Remove="Resources\Images\settings.png" />
</ItemGroup>
<ItemGroup>
@ -68,42 +68,39 @@
</ItemGroup>
<ItemGroup>
<Compile Update="CustomHeader.xaml.cs">
<DependentUpon>CustomHeader.xaml</DependentUpon>
</Compile>
<Compile Update="Views\signUpPage.xaml.cs">
<DependentUpon>signUpPage.xaml</DependentUpon>
</Compile>
<Compile Update="CustomHeader.xaml.cs">
<DependentUpon>CustomHeader.xaml</DependentUpon>
</Compile>
<Compile Update="Views\signUpPage.xaml.cs">
<DependentUpon>signUpPage.xaml</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<MauiXaml Update="CustomHeader.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Resources\Theme\DarkTheme.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Views\Composants\StyleBouton.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Views\homePage.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Views\homePageDisconnect.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Views\listPage.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Views\loginPage.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Views\settingsPage.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Views\signUpPage.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="CustomHeader.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Resources\Theme\DarkTheme.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Views\Composants\StyleBouton.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Views\homePage.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Views\listPage.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Views\loginPage.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Views\settingsPage.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Views\signUpPage.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
</ItemGroup>
</Project>

@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using MangaMap.Stub;
namespace MangaMap.Model
{
@ -13,10 +14,13 @@ namespace MangaMap.Model
public List<Utilisateur> Utilisateurs { get; private set; }
public List<Oeuvre> Oeuvres { get; private set; }
public Utilisateur UtilisateurActuel { get; set; }
public Manager(IPersistanceManager Pers) {
Admins = new List<Admin>();
Utilisateurs = new List<Utilisateur>();
Oeuvres = new List<Oeuvre>();
UtilisateurActuel = null;
Persistance = Pers;
}
@ -26,8 +30,24 @@ namespace MangaMap.Model
Admins = new List<Admin>();
Utilisateurs = new List<Utilisateur>();
Oeuvres = new List<Oeuvre>();
UtilisateurActuel = new Utilisateur();
}
/*public Utilisateur charger()
{
var donnees = Persistance.chargeDonne();
foreach (var item in donnees.Item1)
{
Oeuvres.Add(item);
}
Utilisateurs.AddRange(donnees.Item2);
// récupérer le premier utilisateur de la liste Utilisateurs :
Utilisateur utilisateurActuel = Utilisateurs.FirstOrDefault();
return utilisateurActuel; // Renvoyez l'utilisateur actuel
}*/
public void charger()
{
var donne = Persistance.chargeDonne();
@ -38,6 +58,8 @@ namespace MangaMap.Model
Utilisateurs.AddRange(donne.Item2);
}
public void sauvegarder()
{
Persistance.sauvegarder(Oeuvres, Utilisateurs);

@ -17,7 +17,7 @@ namespace MangaMap.Model
[DataMember]
public int age { get; private set; }
[DataMember]
public List<Oeuvre> ListeOeuvreEnVisionnage { get; private set; }
public List<Oeuvre> ListeOeuvreEnVisionnage { get; set; }
[DataMember]
public List<Oeuvre> ListeOeuvreDejaVu { get; private set; }
[DataMember]
@ -33,6 +33,18 @@ namespace MangaMap.Model
this.nom = nom;
this.prenom = prenom;
this.age = age;
ListeOeuvreEnVisionnage = new List<Oeuvre>();
ListeOeuvreDejaVu = new List<Oeuvre>();
ListeOeuvrePourPlusTard = new List<Oeuvre>();
ListeOeuvreFavorites = new List<Oeuvre>();
}
public Utilisateur() {
ListeOeuvreEnVisionnage = new List<Oeuvre>();
ListeOeuvreDejaVu = new List<Oeuvre>();
ListeOeuvrePourPlusTard = new List<Oeuvre>();
ListeOeuvreFavorites = new List<Oeuvre>();
}
public void SupprimerUtilisateur()

Before

Width:  |  Height:  |  Size: 101 KiB

After

Width:  |  Height:  |  Size: 101 KiB

Before

Width:  |  Height:  |  Size: 573 KiB

After

Width:  |  Height:  |  Size: 573 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

@ -0,0 +1,3 @@
<svg width="100" height="100" viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M51.5995 80.3367L50 79.3286L48.4005 80.3367L22.2873 96.7941L22.2659 96.8076L22.2446 96.8215C21.9992 96.9821 21.8349 97.0077 21.6743 96.9984C21.3995 96.9824 21.2189 96.9085 21.0502 96.7824C20.8413 96.6262 20.6768 96.4268 20.5477 96.1179C20.486 95.9704 20.4227 95.7098 20.5093 95.2285L27.3779 64.1254L27.7519 62.4318L26.4707 61.2626L3.45013 40.2535C3.44969 40.2531 3.44925 40.2527 3.44882 40.2523C3.09118 39.9244 3.05657 39.7374 3.0485 39.6896C2.97181 39.2347 2.98924 38.8339 3.07836 38.4608C3.1053 38.348 3.15083 38.2442 3.32949 38.0972C3.4795 37.9739 3.69984 37.8554 4.10721 37.8104L34.5497 35.0206L36.3769 34.8532L37.0602 33.1504L48.8398 3.79549C48.9872 3.45789 49.1405 3.3261 49.2757 3.24647C49.6382 3.03307 49.8673 3 50 3C50.1327 3 50.3618 3.03307 50.7243 3.24647C50.8595 3.32611 51.0128 3.45791 51.1602 3.79559L62.9398 33.1504L63.6231 34.8532L65.4502 35.0206L95.8928 37.8104C96.3002 37.8554 96.5205 37.9739 96.6705 38.0972C96.8492 38.2442 96.8947 38.348 96.9216 38.4608C97.0108 38.8339 97.0282 39.2347 96.9515 39.6896C96.9434 39.7375 96.9088 39.9248 96.5502 40.2533C96.5501 40.2533 96.55 40.2534 96.5499 40.2535L73.5293 61.2626L72.2481 62.4318L72.6221 64.1254L79.4907 95.2285C79.5774 95.7098 79.514 95.9704 79.4523 96.1179C79.3232 96.4268 79.1587 96.6262 78.9498 96.7824C78.7811 96.9085 78.6005 96.9824 78.3257 96.9984C78.1651 97.0077 78.0008 96.9821 77.7554 96.8215L77.7341 96.8076L77.7127 96.7941L51.5995 80.3367Z" stroke="#FFD600" stroke-width="6"/>
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

@ -0,0 +1,3 @@
<svg width="100" height="100" viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M50 82.8747L23.8869 99.3321C23.1381 99.8219 22.3426 100.042 21.5002 99.9933C20.6578 99.9443 19.9091 99.6749 19.2539 99.1851C18.5987 98.6953 18.1074 98.0586 17.7798 97.2749C17.4522 96.4912 17.382 95.6096 17.5692 94.63L24.4485 63.4785L1.42399 42.4659C0.675224 41.7802 0.230646 41.021 0.0902527 40.1883C-0.0501404 39.3557 -0.0267415 38.5475 0.160449 37.7638C0.34764 36.9801 0.768819 36.3189 1.42399 35.7801C2.07916 35.2413 2.87472 34.923 3.81067 34.825L34.276 32.0331L46.069 2.64494C46.4434 1.76329 47.0049 1.10206 47.7537 0.661234C48.5025 0.220411 49.2512 0 50 0C50.7488 0 51.4975 0.220411 52.2463 0.661234C52.9951 1.10206 53.5566 1.76329 53.931 2.64494L65.724 32.0331L96.1893 34.825C97.1253 34.923 97.9209 35.2413 98.576 35.7801C99.2312 36.3189 99.6524 36.9801 99.8396 37.7638C100.027 38.5475 100.05 39.3557 99.9098 40.1883C99.7694 41.021 99.3248 41.7802 98.576 42.4659L75.5516 63.4785L82.4308 94.63C82.618 95.6096 82.5478 96.4912 82.2202 97.2749C81.8926 98.0586 81.4013 98.6953 80.7461 99.1851C80.0909 99.6749 79.3422 99.9443 78.4998 99.9933C77.6574 100.042 76.8619 99.8219 76.1131 99.3321L50 82.8747Z" fill="#FFD600"/>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

@ -39,48 +39,31 @@ namespace MangaMap.Stub
public void sauvegarder(List<Oeuvre> o, List<Utilisateur> u)
{
var serializer = new DataContractSerializer(typeof(DataToPersist));
DataToPersist data;
if (File.Exists(Path.Combine(FilePath, FileName)))
{
using (Stream s = File.OpenRead(Path.Combine(FilePath, FileName)))
{
data = serializer.ReadObject(s) as DataToPersist;
}
}
else
if (!Directory.Exists(FilePath))
{
data = new DataToPersist();
Debug.WriteLine("Directory doesn't exist.");
Directory.CreateDirectory(FilePath);
}
// Parcourir les nouveaux utilisateurs
foreach (var newUser in u)
/*using (Stream s = File.Create(Path.Combine(FilePath, FileName)))
{
// Vérifier si un utilisateur avec le même nom d'utilisateur existe déjà
var existingUser = data.Utilisateurs.FirstOrDefault(user => user.Pseudo == newUser.Pseudo);
if (existingUser != null)
{
// Mettre à jour les informations de l'utilisateur existant
existingUser.MotDePasse = newUser.MotDePasse;
existingUser.Email = newUser.Email;
}
else
{
// Ajouter le nouvel utilisateur à la liste existante
data.Utilisateurs.Add(newUser);
}
}
serializer.WriteObject(s, o); //Version d'enregistrement des données sans indentation.
}*/
DataToPersist data = new DataToPersist();
data.Oeuvres = o;
data.Utilisateurs = u;
var settings = new XmlWriterSettings() { Indent = true };
using (TextWriter tw = File.CreateText(Path.Combine(FilePath, FileName)))
{
using (XmlWriter w = XmlWriter.Create(tw, settings))
{
serializer.WriteObject(w, data); // Enregistrer toutes les données dans le fichier
serializer.WriteObject(w, data); //Version d'enregistrement des données avec indentation.
}
}
}
}
}

@ -12,5 +12,6 @@ namespace MangaMap.Stub
{
public List<Oeuvre> Oeuvres { get; set; } = new List<Oeuvre>();
public List<Utilisateur> Utilisateurs { get; set; } = new List<Utilisateur>();
}
}

@ -3,13 +3,14 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using MangaMap.Model;
namespace MangaMap.Model
namespace MangaMap.Stub
{
public interface IPersistanceManager
{
(List<Oeuvre>, List<Utilisateur>) chargeDonne();
void sauvegarder(List<Oeuvre> o , List<Utilisateur> u);
void sauvegarder(List<Oeuvre> o, List<Utilisateur> u);
}
}

@ -17,18 +17,20 @@ namespace MangaMap.Stub
List<Oeuvre> l1 = new List<Oeuvre>();
List<Utilisateur> l2 = new List<Utilisateur>();
Utilisateur u1 = new Utilisateur("test@test.ts", "Pseudo1", "MotDePasse123", "Jean", "Baptiste", 12);
Utilisateur u1 = new Utilisateur("test@test.tst", "Pseudo1", "MotDePasse123", "Jean", "Baptiste", 12);
Utilisateur u2 = new Utilisateur("test@test.ts", "Pseudo2", "MotDePasse123", "Baptiste", "Jean", 12);
Utilisateur u3 = new Utilisateur("test@test.ts", "Pseudo3", "MotDePasse123", "David", "Marc", 12);
List<string> genres = new List<string>();
genres.Add("Action");
genres.Add("Future");
Oeuvre o1 = new Oeuvre("test", genres, "TV", "C'est une bonne série", 4, 150, "test.jpg");
Oeuvre o2 = new Oeuvre("test2", genres, "DVD", "A la fin il meurt", 2, 24, "test2.png");
Oeuvre o1 = new Oeuvre("Evangelion", genres, "TV", "C'est une bonne série", 4, 150, "evangelion.jpg");
Oeuvre o2 = new Oeuvre("[Oshi No Ko]", genres, "DVD", "A la fin il meurt", 2, 24, "oshinoko.png");
l1.Add(o1); l1.Add(o2);
l2.Add(u1); l2.Add(u2); l2.Add(u3);
u1.ListeOeuvreEnVisionnage.Add(o1);
return (l1, l2);
}

@ -1,9 +1,99 @@
namespace MangaMap.Views;
using Model;
using System.ComponentModel;
using System.Diagnostics;
using System.Xml.Linq;
public partial class ficheAnime : ContentPage
public partial class ficheAnime : ContentPage, INotifyPropertyChanged
{
public ficheAnime()
{
InitializeComponent();
}
public Manager my_manager => (App.Current as App).MyManager;
public Oeuvre AnimeModel { get; set; }
public ficheAnime()
{
InitializeComponent();
this.BindingContext = this;
}
public ficheAnime(Oeuvre anime)
{
AnimeModel = anime;
InitializeComponent();
this.BindingContext = this;
}
public async void AjouterListe(object sender, EventArgs e)
{
if (my_manager.UtilisateurActuel == null)
{
await DisplayAlert("Erreur", "Vous n'êtes pas connecté.", "OK");
return;
}
string selectedOption = await DisplayActionSheet("Ajouter à quelle liste ?", "Annuler", null, "En Visionnage", "Déjà Vu", "Pour Plus Tard", "Favoris");
if (selectedOption == "Annuler")
return;
Debug.WriteLine("Selected Option: " + selectedOption);
// Ajouter l'anime à la liste sélectionnée
switch (selectedOption)
{
case "En Visionnage":
Debug.WriteLine("Ajout à la liste En Visionnage");
my_manager.UtilisateurActuel.ListeOeuvreEnVisionnage.Add(AnimeModel);
break;
case "Déjà Vu":
Debug.WriteLine("Ajout à la liste Déjà Vu");
my_manager.UtilisateurActuel.ListeOeuvreDejaVu.Add(AnimeModel);
break;
case "Pour Plus Tard":
Debug.WriteLine("Ajout à la liste Pour Plus Tard");
my_manager.UtilisateurActuel.ListeOeuvrePourPlusTard.Add(AnimeModel);
break;
case "Favoris":
Debug.WriteLine("Ajout à la liste Favoris");
my_manager.UtilisateurActuel.ListeOeuvreFavorites.Add(AnimeModel);
break;
}
foreach (Oeuvre oeuvre in my_manager.UtilisateurActuel.ListeOeuvreEnVisionnage)
{
Debug.WriteLine("Titre de l'oeuvre : " + oeuvre.Nom);
// Faites d'autres opérations avec chaque élément de la liste
}
my_manager.sauvegarder();
await Navigation.PushAsync(new listPage());
}
private void SetNote(float note)
{
note = (int)note; // Tronquer à un entier car nous ne gérons actuellement pas les demi-étoiles
var starImages = star.Children.OfType<Image>().Reverse().ToList();
foreach (var img in starImages)
{
if (note > 0)
{
img.Opacity = 1;
note--;
}
else
{
img.Opacity = 0;
}
}
}
}

@ -12,14 +12,15 @@
<VerticalStackLayout Grid.Row="1">
<HorizontalStackLayout>
<Rectangle
WidthRequest="150"
HeightRequest="150"
Fill="Red"
HorizontalOptions="Start"
Margin="50"/>
<Label Text="Titre" FontSize="Header" VerticalOptions="Center"/>
<ImageButton
Style="{StaticResource ImageAnime}"
BackgroundColor="Orange"
Margin="50"
Source="{Binding AnimeModel.Affiche}"
/>
<Label Text="{Binding AnimeModel.Nom}" FontSize="Header" VerticalOptions="Center" TextColor="White"/>
</HorizontalStackLayout>
<Grid>
@ -28,25 +29,37 @@
<Label Text="test" BackgroundColor="{StaticResource Primary}"/>
</Grid>
<HorizontalStackLayout>
<Ellipse Fill="Gold" WidthRequest="50" HeightRequest="50" Margin="10"/>
<Ellipse Fill="Gold" WidthRequest="50" HeightRequest="50" Margin="10"/>
<Ellipse Fill="Gold" WidthRequest="50" HeightRequest="50" Margin="10"/>
<Ellipse Fill="Gold" WidthRequest="50" HeightRequest="50" Margin="10"/>
<Ellipse Fill="Gold" WidthRequest="50" HeightRequest="50" Margin="10"/>
<HorizontalStackLayout x:Name="star">
<Image Source="star_full.png" WidthRequest="50" HeightRequest="50" Margin="10"/>
<Image Source="star_full.png" WidthRequest="50" HeightRequest="50" Margin="10"/>
<Image Source="star_full.png" WidthRequest="50" HeightRequest="50" Margin="10"/>
<Image Source="star_full.png" WidthRequest="50" HeightRequest="50" Margin="10"/>
<Image Source="star_full.png" WidthRequest="50" HeightRequest="50" Margin="10"/>
<Button Text="Ajouter à la liste"
TextColor="#FFFFFF"
HorizontalOptions="Start"
Margin="20"
BackgroundColor="{StaticResource Primary}"/>
TextColor="#FFFFFF"
HorizontalOptions="Start"
Margin="20"
BackgroundColor="{StaticResource Primary}"
Clicked="AjouterListe"/>
</HorizontalStackLayout>
<Label
Text="Je suis une description. Je suis une description. Je suis une description. Je suis une description. Je suis une description. Je suis une description. Je suis une description. Je suis une description. Je suis une description. Je suis une description."
Margin="20"/>
<Label Text="{Binding AnimeModel.Description}" Margin="20" TextColor="Wheat"/>
<Entry Text="{Binding AnimeModel.Nom}" Placeholder="Entrez le nom"/>
<Entry Text="{Binding AnimeModel.Description}" Placeholder="Entrez la description"/>
</VerticalStackLayout>
</Grid>
</ContentPage>

@ -29,80 +29,20 @@
Margin="30"
/>
<ListView x:Name="a2" ItemsSource="{Binding Oeuvres}">
<ListView.ItemTemplate>
<HorizontalStackLayout BindableLayout.ItemsSource="{Binding Oeuvres}" Spacing="100" HorizontalOptions="Center">
<BindableLayout.ItemTemplate>
<DataTemplate>
<ViewCell>
<ImageButton
<ImageButton
Style="{StaticResource ImageAnime}"
BackgroundColor="Red"
Source="{Binding Affiche}"
Clicked="AnimeImageClicked"
/>
</ViewCell>
<!--<views:StyleBouton -->
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
<HorizontalStackLayout
Spacing="100"
HorizontalOptions="Center">
<views:StyleBouton/>
<ImageButton
Style="{StaticResource ImageAnime}"
BackgroundColor="Orange"
Source="test.jpg"
/>
<views:StyleBouton/>
<views:StyleBouton/>
</HorizontalStackLayout>
<HorizontalStackLayout
Spacing="100"
HorizontalOptions="Center">
<views:StyleBouton/>
<views:StyleBouton/>
<views:StyleBouton/>
<views:StyleBouton/>
</HorizontalStackLayout>
<HorizontalStackLayout
Spacing="100"
HorizontalOptions="Center">
<views:StyleBouton/>
<views:StyleBouton/>
<views:StyleBouton/>
<views:StyleBouton/>
</BindableLayout.ItemTemplate>
</HorizontalStackLayout>
<HorizontalStackLayout
Spacing="100"
HorizontalOptions="Center">
<views:StyleBouton/>
<views:StyleBouton/>
<views:StyleBouton/>
<views:StyleBouton/>
</HorizontalStackLayout>
<ListView x:Name="a1" ItemsSource="{Binding Utilisateurs}">

@ -2,15 +2,27 @@ namespace MangaMap.Views;
using MangaMap.Model;
public partial class homePage : ContentPage
{
public Manager my_manager => (App.Current as App).MyManager;
public homePage()
{
InitializeComponent();
a1.BindingContext = my_manager;
a2.BindingContext = my_manager;
InitializeComponent();
BindingContext = my_manager;
}
private async void AnimeImageClicked(object sender, EventArgs e)
{
var selectedAnime = (sender as ImageButton)?.BindingContext as Oeuvre;
if (selectedAnime != null)
{
// Naviguez vers la page de la fiche d'anime en passant l'objet sélectionné
await Navigation.PushAsync(new ficheAnime(selectedAnime));
}
}
}

@ -1,123 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:MangaMap"
x:Class="MangaMap.Views.homePageDisconnect"
xmlns:modeles="clr-namespace:MangaMap.Model"
xmlns:views="clr-namespace:MangaMap.Views.Composants">
<ContentPage.BindingContext>
<modeles:Manager/>
</ContentPage.BindingContext>
<Grid RowDefinitions="40, *">
<local:NewContent1 HeightRequest="40" VerticalOptions="Start" Padding="10, 0"/>
<ScrollView
BackgroundColor="#1E1E1E"
Grid.Row="1">
<VerticalStackLayout
Spacing="70"
VerticalOptions="Center">
<SearchBar Placeholder="Recherche"
CancelButtonColor="Orange"
TextColor="Black"
BackgroundColor="White"
HorizontalTextAlignment="Center"
Margin="30"
/>
<ListView x:Name="a2" ItemsSource="{Binding Oeuvres}">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<ImageButton
Style="{StaticResource ImageAnime}"
BackgroundColor="Red"
Source="{Binding Affiche}"
/>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
<HorizontalStackLayout
Spacing="100"
HorizontalOptions="Center">
<views:StyleBouton/>
<ImageButton
Style="{StaticResource ImageAnime}"
BackgroundColor="Orange"
Source="test.jpg"
/>
<views:StyleBouton/>
<views:StyleBouton/>
</HorizontalStackLayout>
<HorizontalStackLayout
Spacing="100"
HorizontalOptions="Center">
<views:StyleBouton/>
<views:StyleBouton/>
<views:StyleBouton/>
<views:StyleBouton/>
</HorizontalStackLayout>
<HorizontalStackLayout
Spacing="100"
HorizontalOptions="Center">
<views:StyleBouton/>
<views:StyleBouton/>
<views:StyleBouton/>
<views:StyleBouton/>
</HorizontalStackLayout>
<HorizontalStackLayout
Spacing="100"
HorizontalOptions="Center">
<views:StyleBouton/>
<views:StyleBouton/>
<views:StyleBouton/>
<views:StyleBouton/>
</HorizontalStackLayout>
<ListView x:Name="a1" ItemsSource="{Binding Utilisateurs}">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<Label Text="{Binding Pseudo}" TextColor="White" FontSize="Header"/>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</VerticalStackLayout>
</ScrollView>
</Grid>
</ContentPage>

@ -1,9 +0,0 @@
namespace MangaMap.Views;
public partial class homePageDisconnect : ContentPage
{
public homePageDisconnect()
{
InitializeComponent();
}
}

@ -39,56 +39,19 @@
</Grid>
<ScrollView Grid.Row="1" VerticalScrollBarVisibility="Always">
<VerticalStackLayout Spacing="10">
<Grid Margin="20,0,20,0" ColumnDefinitions="*,*,300,300">
<ImageButton Grid.Column="0" BackgroundColor="#FFFFFF" WidthRequest="100" HeightRequest="100" HorizontalOptions="Start"/>
<Label Grid.Column="1" Text="Test Titre" FontSize="Medium" VerticalOptions="Center" Margin="15"/>
<Label Grid.Column="2" Text="4/5" VerticalOptions="Center" HorizontalOptions="Center"/>
<Label Grid.Column="3" Text="10/85" VerticalOptions="Center" HorizontalOptions="End"/>
</Grid>
<Grid Margin="20,0,20,0" ColumnDefinitions="*,*,300,300">
<ImageButton Grid.Column="0" BackgroundColor="Blue" WidthRequest="100" HeightRequest="100" HorizontalOptions="Start"/>
<Label Grid.Column="1" Text="Test Titre" FontSize="Medium" VerticalOptions="Center" Margin="15"/>
<Label Grid.Column="2" Text="4/5" VerticalOptions="Center" HorizontalOptions="Center"/>
<Label Grid.Column="3" Text="10/85" VerticalOptions="Center" HorizontalOptions="End"/>
</Grid>
<Grid Margin="20,0,20,0" ColumnDefinitions="*,*,300,300">
<ImageButton Grid.Column="0" BackgroundColor="Red" WidthRequest="100" HeightRequest="100" HorizontalOptions="Start"/>
<Label Grid.Column="1" Text="Test Titre" FontSize="Medium" VerticalOptions="Center" Margin="15"/>
<Label Grid.Column="2" Text="4/5" VerticalOptions="Center" HorizontalOptions="Center"/>
<Label Grid.Column="3" Text="10/85" VerticalOptions="Center" HorizontalOptions="End"/>
</Grid>
<Grid Margin="20,0,20,0" ColumnDefinitions="*,*,300,300">
<ImageButton Grid.Column="0" BackgroundColor="#FFFFFF" WidthRequest="100" HeightRequest="100" HorizontalOptions="Start"/>
<Label Grid.Column="1" Text="Test Titre" FontSize="Medium" VerticalOptions="Center" Margin="15"/>
<Label Grid.Column="2" Text="4/5" VerticalOptions="Center" HorizontalOptions="Center"/>
<Label Grid.Column="3" Text="10/85" VerticalOptions="Center" HorizontalOptions="End"/>
</Grid>
<Grid Margin="20,0,20,0" ColumnDefinitions="*,*,300,300">
<ImageButton Grid.Column="0" BackgroundColor="Blue" WidthRequest="100" HeightRequest="100" HorizontalOptions="Start"/>
<Label Grid.Column="1" Text="Test Titre" FontSize="Medium" VerticalOptions="Center" Margin="15"/>
<Label Grid.Column="2" Text="4/5" VerticalOptions="Center" HorizontalOptions="Center"/>
<Label Grid.Column="3" Text="10/85" VerticalOptions="Center" HorizontalOptions="End"/>
</Grid>
<Grid Margin="20,0,20,0" ColumnDefinitions="*,*,300,300">
<ImageButton Grid.Column="0" BackgroundColor="Red" WidthRequest="100" HeightRequest="100" HorizontalOptions="Start"/>
<Label Grid.Column="1" Text="Test Titre" FontSize="Medium" VerticalOptions="Center" Margin="15"/>
<Label Grid.Column="2" Text="4/5" VerticalOptions="Center" HorizontalOptions="Center"/>
<Label Grid.Column="3" Text="10/85" VerticalOptions="Center" HorizontalOptions="End"/>
</Grid>
</VerticalStackLayout>
<!--<VerticalStackLayout BindableLayout.ItemsSource="{Binding ListeOeuvreEnVisionnage}" Spacing="10">-->
<BindableLayout.ItemTemplate>
<DataTemplate>
<Grid Margin="20,0,20,0" ColumnDefinitions="*,*,300,300">
<ImageButton Grid.Column="0" Source="{Binding Affiche}" BackgroundColor="#FFFFFF" WidthRequest="100" HeightRequest="100" HorizontalOptions="Start"/>
<Label Grid.Column="1" Text="Test Titre" FontSize="Medium" VerticalOptions="Center" Margin="15"/>
<Label Grid.Column="2" Text="4/5" VerticalOptions="Center" HorizontalOptions="Center"/>
<Label Grid.Column="3" Text="10/85" VerticalOptions="Center" HorizontalOptions="End"/>
</Grid>
</DataTemplate>
</BindableLayout.ItemTemplate>
<!--</VerticalStackLayout>-->
</ScrollView>
</Grid>
</Frame>

@ -1,10 +1,17 @@
namespace MangaMap.Views;
using MangaMap.Model;
public partial class listPage : ContentPage
{
public listPage()
public Manager my_manager => (App.Current as App).MyManager;
public listPage()
{
InitializeComponent();
}
BindingContext = my_manager.UtilisateurActuel;
}
}

@ -5,8 +5,9 @@ using MangaMap.Stub;
using MangaMap.Model;
public partial class loginPage : ContentPage
{
public Manager my_manager => (App.Current as App).MyManager;
public loginPage()
{
InitializeComponent();
@ -32,18 +33,16 @@ public partial class loginPage : ContentPage
return;
}
// Charger les données à partir de la persistance
IPersistanceManager persistanceManager = new DataContract();
(List<Oeuvre> oeuvres, List<Utilisateur> utilisateurs) = persistanceManager.chargeDonne();
// Vérifier que l'utilisateur existe
Utilisateur utilisateur = utilisateurs.FirstOrDefault(u => u.Email == email && u.MotDePasse == password);
Utilisateur utilisateur = my_manager.Utilisateurs.FirstOrDefault(u => u.Email == email && u.MotDePasse == password);
if (utilisateur == null)
{
await DisplayAlert("Erreur", "L'e-mail ou le mot de passe est incorrect.", "OK");
await DisplayAlert("Erreur", "Le mot de passe entré est incorrect.", "OK");
return;
}
// On garde l'utilisateur qui vient de se connecter pour accéder à ses informations
my_manager.UtilisateurActuel = utilisateur;
// Rediriger l'utilisateur vers la page principale
await Navigation.PushAsync(new homePage());
}

@ -2,6 +2,7 @@ namespace MangaMap.Views;
using MangaMap.Model;
using System.Text.RegularExpressions;
using static System.Runtime.InteropServices.JavaScript.JSType;
public partial class signUpPage : ContentPage
{
@ -17,13 +18,21 @@ public partial class signUpPage : ContentPage
{
// Récupérer les valeurs des entrées
string nom = nameEntry.Text;
string prénom = firstNameEntry.Text;
string prenom = firstNameEntry.Text;
int age = Convert.ToInt32(ageEntry.Text);
string email = emailEntry.Text;
string pseudo = usernameEntry.Text;
string password = passwordEntry.Text;
string confirmPassword = confirmPasswordEntry.Text;
foreach (Utilisateur u in my_manager.Utilisateurs)
{
if (u.Email == email ||u.Pseudo==pseudo)
{
await DisplayAlert("Erreur", "L'utilisateur existe déjà.", "OK");
return;
}
}
if (string.IsNullOrWhiteSpace(email) ||
string.IsNullOrWhiteSpace(password) || string.IsNullOrWhiteSpace(confirmPassword))
@ -60,14 +69,13 @@ public partial class signUpPage : ContentPage
if (password == confirmPassword)
{
Utilisateur util = new Utilisateur(email, pseudo, password, nom, prénom, age);
Utilisateur util = new Utilisateur(email, pseudo, password, nom, prenom, age);
my_manager.Utilisateurs.Add(util);
my_manager.sauvegarder();
my_manager.UtilisateurActuel = util;
await Navigation.PushAsync(new homePage());
return;
}
}
bool IsPasswordStrong(string password)

@ -1,3 +1,44 @@
# MapManga
Vianney Jourdy (G9) Hersan Mathéo (G10)
## Overview
MapManga is an application designed to help manga and anime fans manage their reading and viewing experience. If you are a manga and anime fan, MapManga is the perfect application for you.
## Documentation
All the information about MapManga are [here](https://codefirst.iut.uca.fr/git/vianney.jourdy/MapManga/src/branch/master/Documentation "Documentation").
### All the required
- [Git](https://git-scm.com/) - Versioning
- [Visual Studio 2022](https://visualstudio.microsoft.com/fr/vs/ "IDE") - IDE
- [.NET 7.0](https://dotnet.microsoft.com/en-us/download/dotnet/7.0) - Framework
## Features
- Have a list of anime/manga with what you watch, what you have seen
- Consult its list
- Add and remove anime and manga from your list
- Give a review on an anime or manga and rate it
## Screen Capture
![loginPage](/Documentation/Images/connexionPage.png)
![signUpPage](/Documentation/Images/signUpPage.png)
![settingsPage](/Documentation/Images/settingsPage.png)
![listPage](/Documentation/Images/listPage.png)
## Made with
- [Visual Studio 2022](https://visualstudio.microsoft.com/fr/vs/ "IDE") -IDE
- [CodeFirst](https://codefirst.iut.uca.fr/) - Technology
- [.NET MAUI 7.0](https://learn.microsoft.com/fr-fr/dotnet/maui/whats-new/dotnet-7) - Framework
- [XAML](https://learn.microsoft.com/fr-fr/dotnet/desktop/wpf/xaml/?view=netdesktop-7.0) - declarative markup language
- [C#](https://learn.microsoft.com/fr-fr/dotnet/csharp/) - Language
- [Doxygen](https://www.doxygen.nl/) - Documentation
## Contributors
- [JOURDY Vianney](https://codefirst.iut.uca.fr/git/vianney.jourdy)
- [HERSAN Mathéo](https://codefirst.iut.uca.fr/git/matheo.hersan)
Loading…
Cancel
Save