Change architecture
continuous-integration/drone/push Build is failing Details

pull/42/head
Matheo HERSAN 2 years ago
parent 789091187f
commit 2407381f1c

@ -1,6 +1,7 @@
using MangaMap.Model;
using Models;
using MangaMap.Stub;
using MangaMap.Views;
using System.Diagnostics;
namespace MangaMap;
@ -49,7 +50,7 @@ public partial class App : Application
if (!File.Exists(Path.Combine(FilePath, FileName)))
{
MyManager.Persistance = new DataContractXML(); // Utilise le Stub comme moyen de persistance.
MyManager.Persistance = new Stub.DataContractXML(); // Utilise le Stub comme moyen de persistance.
//MyManager = new Manager(new Stub.DataContractJSON());
}

@ -1,6 +1,6 @@
using MangaMap.Views;
namespace MangaMap;
using MangaMap.Model;
using Models;
using System.ComponentModel;
using INotifyPropertyChanged = System.ComponentModel.INotifyPropertyChanged;

@ -1,11 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net7.0;</TargetFrameworks>
<TargetFrameworks>net7.0-android;net7.0-ios;net7.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net7.0-windows10.0.19041.0</TargetFrameworks>
<!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
<!-- <TargetFrameworks>$(TargetFrameworks);net7.0-tizen</TargetFrameworks> -->
<OutputType Condition="'$(TargetFramework)' != 'net7.0'">Exe</OutputType>
<OutputType>Exe</OutputType>
<RootNamespace>MangaMap</RootNamespace>
<UseMaui>true</UseMaui>
<SingleProject>true</SingleProject>
@ -50,11 +50,17 @@
<ItemGroup>
<AndroidResource Remove="Component\**" />
<AndroidResource Remove="DataBinding\**" />
<Compile Remove="Component\**" />
<Compile Remove="DataBinding\**" />
<EmbeddedResource Remove="Component\**" />
<EmbeddedResource Remove="DataBinding\**" />
<MauiCss Remove="Component\**" />
<MauiCss Remove="DataBinding\**" />
<MauiXaml Remove="Component\**" />
<MauiXaml Remove="DataBinding\**" />
<None Remove="Component\**" />
<None Remove="DataBinding\**" />
</ItemGroup>
<ItemGroup>
@ -129,7 +135,7 @@
</ItemGroup>
<ItemGroup>
<Folder Include="DataBinding\" />
<ProjectReference Include="..\Models\Models.csproj" />
</ItemGroup>
</Project>

@ -5,6 +5,8 @@ VisualStudioVersion = 17.0.31611.283
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MangaMap", "MangaMap.csproj", "{1946288E-37BA-420F-89BD-A1C3D4178344}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Models", "..\Models\Models.csproj", "{D13B26C4-A575-4577-A735-0B04DC02BC85}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -17,6 +19,10 @@ Global
{1946288E-37BA-420F-89BD-A1C3D4178344}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1946288E-37BA-420F-89BD-A1C3D4178344}.Release|Any CPU.Build.0 = Release|Any CPU
{1946288E-37BA-420F-89BD-A1C3D4178344}.Release|Any CPU.Deploy.0 = Release|Any CPU
{D13B26C4-A575-4577-A735-0B04DC02BC85}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D13B26C4-A575-4577-A735-0B04DC02BC85}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D13B26C4-A575-4577-A735-0B04DC02BC85}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D13B26C4-A575-4577-A735-0B04DC02BC85}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

@ -1,4 +1,4 @@
using MangaMap.Model;
using Models;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;

@ -1,4 +1,4 @@
using MangaMap.Model;
using Models;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;

@ -1,4 +1,4 @@
using MangaMap.Model;
using Models;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;

@ -1,5 +1,5 @@
using System;
using MangaMap.Model;
using Models;
using System.Collections.Generic;
using System.Linq;
using System.Text;

@ -1,4 +1,4 @@
using MangaMap.Model;
using Models;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;

@ -1,5 +1,5 @@
namespace MangaMap.Views.Composants;
using MangaMap.Model;
using Models;
using System.Xml;
public partial class ListOeuvre : ContentView

@ -1,4 +1,4 @@
using MangaMap.Model;
using Models;
namespace MangaMap.Views.Composants
{

@ -1,5 +1,5 @@
using System.Text.RegularExpressions;
using MangaMap.Model;
using Models;
using static System.Runtime.InteropServices.JavaScript.JSType;
using System.Threading.Tasks;
using Microsoft.Maui.Storage;

@ -1,6 +1,6 @@
namespace MangaMap.Views
{
using Model;
using Models;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;

@ -2,7 +2,7 @@
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:MangaMap"
xmlns:modeles="clr-namespace:MangaMap.Model"
xmlns:modeles="clr-namespace:Models;assembly=Models"
x:Class="MangaMap.Views.homePage"
xmlns:views="clr-namespace:MangaMap.Views.Composants">

@ -1,6 +1,6 @@
namespace MangaMap.Views
{
using MangaMap.Model;
using Models;
using System.Collections.ObjectModel;
/// <summary>

@ -1,5 +1,5 @@
namespace MangaMap.Views;
using MangaMap.Model;
using Models;
using static System.Net.Mime.MediaTypeNames;

@ -2,7 +2,7 @@ namespace MangaMap.Views;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using MangaMap.Stub;
using MangaMap.Model;
using Models;
/// <summary>
/// Classe représentant la page de connexion administrateur de l'application.

@ -2,7 +2,7 @@ namespace MangaMap.Views;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using MangaMap.Stub;
using MangaMap.Model;
using Models;
/// <summary>
/// Classe représentant la page de connexion de l'application.

@ -1,5 +1,5 @@
namespace MangaMap.Views;
using Model;
using Models;
/// <summary>
/// Classe représentant la page des paramètres de l'application.

@ -1,6 +1,6 @@
namespace MangaMap.Views;
using MangaMap.Model;
using Models;
using System.Text.RegularExpressions;
using static System.Runtime.InteropServices.JavaScript.JSType;

@ -1,11 +1,10 @@
using MangaMap.Views;
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MangaMap.Model
namespace Models
{
/// <summary>
/// Représente un administrateur dans le système de gestion de listes d'anime.

@ -4,9 +4,8 @@ using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using MangaMap.Model;
namespace MangaMap.Stub
namespace Models
{
/// <summary>
/// Interface pour la gestion de la persistance des données.

@ -1,17 +1,16 @@
using System;
using MangaMap.Model;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MangaMap.Model
namespace Models
{
class Liste
{
public string Nom { get; private set; }
public int NbAnime { get; private set; }
public Oeuvre[] AnimeListe { get; private set; }
public Oeuvre[]? AnimeListe { get; private set; }
public Liste(string nom, int nbAnime)
{

@ -6,9 +6,8 @@ using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;
using MangaMap.Stub;
namespace MangaMap.Model
namespace Models
{
/// <summary>
/// Classe responsable de la gestion globale de l'application de gestion de listes d'anime.
@ -50,7 +49,7 @@ namespace MangaMap.Model
public event PropertyChangedEventHandler? PropertyChanged;
void OnPropertyChanged([CallerMemberName] string propertyName = null)
void OnPropertyChanged([CallerMemberName] string? propertyName = null)
=> PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
/// <summary>
@ -90,21 +89,6 @@ namespace MangaMap.Model
isAdmin = false;
}
/*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
}*/
/// <summary>
/// Charge les données de l'application à partir du gestionnaire de persistance.
/// </summary>

@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>

@ -8,7 +8,7 @@ using System.ComponentModel;
using System.Xml.Linq;
using System.Runtime.CompilerServices;
namespace MangaMap.Model
namespace Models
{
/// <summary>
/// Représente une oeuvre dans le système de gestion de listes d'anime.
@ -18,7 +18,7 @@ namespace MangaMap.Model
{
public event PropertyChangedEventHandler? PropertyChanged;
void OnPropertyChanged([CallerMemberName] string propertyName = null)
void OnPropertyChanged([CallerMemberName] string? propertyName = null)
=> PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
/// <summary>

@ -5,7 +5,7 @@ using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;
namespace MangaMap.Model
namespace Models
{
/// <summary>
/// Représente une personne dans le système de gestion de listes d'anime.
@ -17,19 +17,19 @@ namespace MangaMap.Model
/// Obtient ou définit le mot de passe de la personne.
/// </summary>
[DataMember]
public string MotDePasse { get; set; }
public string? MotDePasse { get; set; }
/// <summary>
/// Obtient ou définit l'adresse e-mail de la personne.
/// </summary>
[DataMember]
public string Email { get; set; }
public string? Email { get; set; }
/// <summary>
/// Obtient ou définit le pseudo de la personne.
/// </summary>
[DataMember]
public string Pseudo { get; set; }
public string? Pseudo { get; set; }
/// <summary>
/// Modifie le mot de passe de la personne en vérifiant une confirmation.

@ -6,7 +6,7 @@ using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;
namespace MangaMap.Model
namespace Models
{
/// <summary>
/// Représente un utilisateur de l'application de gestion de listes d'anime.
@ -18,13 +18,13 @@ namespace MangaMap.Model
/// Obtient ou définit le nom de l'utilisateur.
/// </summary>
[DataMember]
public string nom { get; private set; }
public string? nom { get; private set; }
/// <summary>
/// Obtient ou définit le prénom de l'utilisateur.
/// </summary>
[DataMember]
public string prenom { get; private set; }
public string? prenom { get; private set; }
/// <summary>
/// Obtient ou définit l'âge de l'utilisateur.
Loading…
Cancel
Save