Compare commits

..

No commits in common. 'master' and 'DataBinding' have entirely different histories.

@ -3,8 +3,6 @@ type: docker
name: MangaMap
trigger:
branche:
- master
event:
- push
@ -13,21 +11,28 @@ steps:
- name: build
image: hub.codefirst.iut.uca.fr/marc.chevaldonne/codefirst-dotnet7-maui:latest
commands:
- cd src/MangaMap/
- cd MangaMap/
- dotnet restore MangaMap.sln
- 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: hub.codefirst.iut.uca.fr/marc.chevaldonne/codefirst-dotnet7-maui:latest
image: mcr.microsoft.com/dotnet/sdk:7.0
commands:
- cd src/MangaMap/
- cd MangaMap/
- dotnet restore MangaMap.sln
- dotnet test MangaMap.sln --logger trx --no-restore /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura --collect "XPlat Code Coverage"
- dotnet test MangaMap.sln --logger trx --no-restore
depends_on: [build]
- name: code-analysis
image: hub.codefirst.iut.uca.fr/marc.chevaldonne/codefirst-dronesonarplugin-dotnet7-maui
commands:
- cd MangaMap/
- dotnet restore MangaMap.sln
- dotnet sonarscanner begin /k:$${project_key} /d:sonar.host.url=$${sonar_host} /d:sonar.coverageReportPaths="coveragereport/SonarQube.xml" /d:sonar.coverage.exclusions=$${coverage_exclusions} /d:sonar.login=$${sonar_token}
- reportgenerator -reports:"**/coverage.cobertura.xml" -reporttypes:SonarQube -targetdir:"coveragereport"
- dotnet publish MangaMap.sln -c Release --no-restore -o CI_PROJECT_DIR/build/release
- dotnet sonarscanner end /d:sonar.login=$${PLUGIN_SONAR_TOKEN}
secrets: [ SECRET_SONAR_LOGIN ]
settings:
# accessible en ligne de commande par ${PLUGIN_SONAR_HOST}
@ -35,16 +40,6 @@ steps:
# accessible en ligne de commande par ${PLUGIN_SONAR_TOKEN}
sonar_token:
from_secret: SECRET_SONAR_LOGIN
commands:
- cd src/MangaMap/
- dotnet restore MangaMap.sln
- dotnet sonarscanner begin /k:"MangaMap" /d:sonar.host.url=$${PLUGIN_SONAR_HOST} /d:sonar.login=$${PLUGIN_SONAR_TOKEN}
- dotnet build MangaMap.sln -c Release --no-restore
- dotnet test MangaMap.sln --logger trx --no-restore /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura --collect "XPlat Code Coverage"
- reportgenerator -reports:"../UnitTests/TestResults/**/coverage.cobertura.xml" -reporttypes:SonarQube -targetdir:"coveragereport"
- dotnet publish MangaMap.csproj -c Release --no-restore -o $CI_PROJECT_DIR/build/release --framework net7.0
- dotnet sonarscanner end /d:sonar.login=$${PLUGIN_SONAR_TOKEN}
depends_on: [tests]
- name: generate-and-deploy-docs
@ -55,8 +50,6 @@ steps:
when:
branch:
- master
- Matheo
event:
- push
depends_on: [ build, tests ]

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 146 KiB

File diff suppressed because it is too large Load Diff

Before

Width:  |  Height:  |  Size: 112 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 227 KiB

Before

Width:  |  Height:  |  Size: 91 KiB

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 219 KiB

After

Width:  |  Height:  |  Size: 32 KiB

@ -1,429 +0,0 @@
#---------------------------------------------------------------------------
# Project related configuration options
#---------------------------------------------------------------------------
DOXYFILE_ENCODING = UTF-8
PROJECT_NAME = "MapManga"
PROJECT_NUMBER = 1.0.0
PROJECT_BRIEF = "A brief description of your project"
PROJECT_LOGO = images/mylogo.png
OUTPUT_DIRECTORY = Documentation/doxygen
CREATE_SUBDIRS = NO
ALLOW_UNICODE_NAMES = NO
OUTPUT_LANGUAGE = English
BRIEF_MEMBER_DESC = YES
REPEAT_BRIEF = YES
ABBREVIATE_BRIEF = "The $name class" \
"The $name widget" \
"The $name file" \
is \
provides \
specifies \
contains \
represents \
a \
an \
the
ALWAYS_DETAILED_SEC = NO
INLINE_INHERITED_MEMB = NO
FULL_PATH_NAMES = YES
STRIP_FROM_PATH =
STRIP_FROM_INC_PATH =
SHORT_NAMES = NO
JAVADOC_AUTOBRIEF = NO
JAVADOC_BANNER = NO
QT_AUTOBRIEF = NO
MULTILINE_CPP_IS_BRIEF = NO
PYTHON_DOCSTRING = YES
INHERIT_DOCS = YES
SEPARATE_MEMBER_PAGES = NO
TAB_SIZE = 4
ALIASES =
OPTIMIZE_OUTPUT_FOR_C = NO
# Well... the one for Java looks so similar to the one for C#...
OPTIMIZE_OUTPUT_JAVA = YES
OPTIMIZE_FOR_FORTRAN = NO
OPTIMIZE_OUTPUT_VHDL = NO
OPTIMIZE_OUTPUT_SLICE = NO
EXTENSION_MAPPING =
MARKDOWN_SUPPORT = YES
TOC_INCLUDE_HEADINGS = 5
AUTOLINK_SUPPORT = YES
BUILTIN_STL_SUPPORT = NO
CPP_CLI_SUPPORT = NO
SIP_SUPPORT = NO
IDL_PROPERTY_SUPPORT = YES
DISTRIBUTE_GROUP_DOC = NO
GROUP_NESTED_COMPOUNDS = NO
SUBGROUPING = YES
INLINE_GROUPED_CLASSES = NO
INLINE_SIMPLE_STRUCTS = NO
TYPEDEF_HIDES_STRUCT = NO
LOOKUP_CACHE_SIZE = 0
NUM_PROC_THREADS = 1
#---------------------------------------------------------------------------
# Build related configuration options
#---------------------------------------------------------------------------
EXTRACT_ALL = YES
# I do not like other members to see my private members... but you can set it to YES if you prefer.
EXTRACT_PRIVATE = NO
EXTRACT_PRIV_VIRTUAL = NO
EXTRACT_PACKAGE = NO
EXTRACT_STATIC = YES
EXTRACT_LOCAL_CLASSES = YES
EXTRACT_LOCAL_METHODS = NO
EXTRACT_ANON_NSPACES = NO
RESOLVE_UNNAMED_PARAMS = YES
HIDE_UNDOC_MEMBERS = NO
HIDE_UNDOC_CLASSES = NO
HIDE_FRIEND_COMPOUNDS = NO
HIDE_IN_BODY_DOCS = NO
INTERNAL_DOCS = NO
CASE_SENSE_NAMES = NO
HIDE_SCOPE_NAMES = NO
HIDE_COMPOUND_REFERENCE= NO
SHOW_HEADERFILE = YES
SHOW_INCLUDE_FILES = YES
SHOW_GROUPED_MEMB_INC = NO
FORCE_LOCAL_INCLUDES = NO
INLINE_INFO = YES
SORT_MEMBER_DOCS = NO
SORT_BRIEF_DOCS = NO
SORT_MEMBERS_CTORS_1ST = NO
SORT_GROUP_NAMES = NO
SORT_BY_SCOPE_NAME = NO
STRICT_PROTO_MATCHING = NO
GENERATE_TODOLIST = YES
GENERATE_TESTLIST = YES
GENERATE_BUGLIST = YES
GENERATE_DEPRECATEDLIST= YES
ENABLED_SECTIONS =
MAX_INITIALIZER_LINES = 30
SHOW_USED_FILES = YES
SHOW_FILES = YES
SHOW_NAMESPACES = YES
FILE_VERSION_FILTER =
LAYOUT_FILE =
CITE_BIB_FILES =
#---------------------------------------------------------------------------
# Configuration options related to warning and progress messages
#---------------------------------------------------------------------------
QUIET = NO
WARNINGS = YES
WARN_IF_UNDOCUMENTED = YES
WARN_IF_DOC_ERROR = YES
WARN_IF_INCOMPLETE_DOC = YES
WARN_NO_PARAMDOC = NO
WARN_AS_ERROR = NO
WARN_FORMAT = "$file:$line: $text"
WARN_LOGFILE =
#---------------------------------------------------------------------------
# Configuration options related to the input files
#---------------------------------------------------------------------------
INPUT = src
INPUT_ENCODING = UTF-8
FILE_PATTERNS = *.c \
*.cc \
*.cxx \
*.cpp \
*.c++ \
*.java \
*.ii \
*.ixx \
*.ipp \
*.i++ \
*.inl \
*.idl \
*.ddl \
*.odl \
*.h \
*.hh \
*.hxx \
*.hpp \
*.h++ \
*.l \
*.cs \
*.d \
*.php \
*.php4 \
*.php5 \
*.phtml \
*.inc \
*.m \
*.markdown \
*.md \
*.mm \
*.dox \
*.py \
*.pyw \
*.f90 \
*.f95 \
*.f03 \
*.f08 \
*.f18 \
*.f \
*.for \
*.vhd \
*.vhdl \
*.ucf \
*.qsf \
*.ice
RECURSIVE = YES
EXCLUDE =
EXCLUDE_SYMLINKS = NO
EXCLUDE_PATTERNS = */Tests/*
EXCLUDE_PATTERNS += */bin/*
EXCLUDE_PATTERNS += */obj/*
EXCLUDE_SYMBOLS =
EXAMPLE_PATH =
EXAMPLE_PATTERNS = *
EXAMPLE_RECURSIVE = NO
IMAGE_PATH =
INPUT_FILTER =
FILTER_PATTERNS =
FILTER_SOURCE_FILES = NO
FILTER_SOURCE_PATTERNS =
USE_MDFILE_AS_MAINPAGE =
#---------------------------------------------------------------------------
# Configuration options related to source browsing
#---------------------------------------------------------------------------
SOURCE_BROWSER = NO
INLINE_SOURCES = NO
STRIP_CODE_COMMENTS = YES
REFERENCED_BY_RELATION = NO
REFERENCES_RELATION = NO
REFERENCES_LINK_SOURCE = YES
SOURCE_TOOLTIPS = YES
USE_HTAGS = NO
VERBATIM_HEADERS = YES
CLANG_ASSISTED_PARSING = NO
CLANG_ADD_INC_PATHS = YES
CLANG_OPTIONS =
CLANG_DATABASE_PATH =
#---------------------------------------------------------------------------
# Configuration options related to the alphabetical class index
#---------------------------------------------------------------------------
ALPHABETICAL_INDEX = YES
IGNORE_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the HTML output
#---------------------------------------------------------------------------
GENERATE_HTML = YES
HTML_OUTPUT = html
HTML_FILE_EXTENSION = .html
HTML_HEADER =
HTML_FOOTER =
HTML_STYLESHEET =
HTML_EXTRA_STYLESHEET =
HTML_EXTRA_FILES = images/CodeFirst.png images/clubinfo.png
HTML_COLORSTYLE_HUE = 215
HTML_COLORSTYLE_SAT = 45
HTML_COLORSTYLE_GAMMA = 240
HTML_TIMESTAMP = NO
HTML_DYNAMIC_MENUS = YES
HTML_DYNAMIC_SECTIONS = NO
HTML_INDEX_NUM_ENTRIES = 100
GENERATE_DOCSET = NO
DOCSET_FEEDNAME = "Doxygen generated docs"
DOCSET_FEEDURL =
DOCSET_BUNDLE_ID = org.doxygen.Project
DOCSET_PUBLISHER_ID = org.doxygen.Publisher
DOCSET_PUBLISHER_NAME = Publisher
GENERATE_HTMLHELP = NO
CHM_FILE =
HHC_LOCATION =
GENERATE_CHI = NO
CHM_INDEX_ENCODING =
BINARY_TOC = NO
TOC_EXPAND = NO
GENERATE_QHP = NO
QCH_FILE =
QHP_NAMESPACE = org.doxygen.Project
QHP_VIRTUAL_FOLDER = doc
QHP_CUST_FILTER_NAME =
QHP_CUST_FILTER_ATTRS =
QHP_SECT_FILTER_ATTRS =
QHG_LOCATION =
GENERATE_ECLIPSEHELP = NO
ECLIPSE_DOC_ID = org.doxygen.Project
DISABLE_INDEX = NO
GENERATE_TREEVIEW = NO
FULL_SIDEBAR = NO
ENUM_VALUES_PER_LINE = 4
TREEVIEW_WIDTH = 250
EXT_LINKS_IN_WINDOW = NO
OBFUSCATE_EMAILS = YES
HTML_FORMULA_FORMAT = png
FORMULA_FONTSIZE = 10
FORMULA_TRANSPARENT = YES
FORMULA_MACROFILE =
USE_MATHJAX = NO
MATHJAX_VERSION = MathJax_2
MATHJAX_FORMAT = HTML-CSS
MATHJAX_RELPATH =
MATHJAX_EXTENSIONS =
MATHJAX_CODEFILE =
SEARCHENGINE = YES
SERVER_BASED_SEARCH = NO
EXTERNAL_SEARCH = NO
SEARCHENGINE_URL =
SEARCHDATA_FILE = searchdata.xml
EXTERNAL_SEARCH_ID =
EXTRA_SEARCH_MAPPINGS =
#---------------------------------------------------------------------------
# Configuration options related to the LaTeX output
#---------------------------------------------------------------------------
GENERATE_LATEX = NO
LATEX_OUTPUT = latex
LATEX_CMD_NAME =
MAKEINDEX_CMD_NAME = makeindex
LATEX_MAKEINDEX_CMD = makeindex
COMPACT_LATEX = NO
PAPER_TYPE = a4
EXTRA_PACKAGES =
LATEX_HEADER =
LATEX_FOOTER =
LATEX_EXTRA_STYLESHEET =
LATEX_EXTRA_FILES =
PDF_HYPERLINKS = YES
USE_PDFLATEX = YES
LATEX_BATCHMODE = NO
LATEX_HIDE_INDICES = NO
LATEX_BIB_STYLE = plain
LATEX_TIMESTAMP = NO
LATEX_EMOJI_DIRECTORY =
#---------------------------------------------------------------------------
# Configuration options related to the RTF output
#---------------------------------------------------------------------------
GENERATE_RTF = NO
RTF_OUTPUT = rtf
COMPACT_RTF = NO
RTF_HYPERLINKS = NO
RTF_STYLESHEET_FILE =
RTF_EXTENSIONS_FILE =
#---------------------------------------------------------------------------
# Configuration options related to the man page output
#---------------------------------------------------------------------------
GENERATE_MAN = NO
MAN_OUTPUT = man
MAN_EXTENSION = .3
MAN_SUBDIR =
MAN_LINKS = NO
#---------------------------------------------------------------------------
# Configuration options related to the XML output
#---------------------------------------------------------------------------
GENERATE_XML = NO
XML_OUTPUT = xml
XML_PROGRAMLISTING = YES
XML_NS_MEMB_FILE_SCOPE = NO
#---------------------------------------------------------------------------
# Configuration options related to the DOCBOOK output
#---------------------------------------------------------------------------
GENERATE_DOCBOOK = NO
DOCBOOK_OUTPUT = docbook
#---------------------------------------------------------------------------
# Configuration options for the AutoGen Definitions output
#---------------------------------------------------------------------------
GENERATE_AUTOGEN_DEF = NO
#---------------------------------------------------------------------------
# Configuration options related to Sqlite3 output
#---------------------------------------------------------------------------
#---------------------------------------------------------------------------
# Configuration options related to the Perl module output
#---------------------------------------------------------------------------
GENERATE_PERLMOD = NO
PERLMOD_LATEX = NO
PERLMOD_PRETTY = YES
PERLMOD_MAKEVAR_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
#---------------------------------------------------------------------------
ENABLE_PREPROCESSING = YES
MACRO_EXPANSION = NO
EXPAND_ONLY_PREDEF = NO
SEARCH_INCLUDES = YES
INCLUDE_PATH =
INCLUDE_FILE_PATTERNS =
PREDEFINED =
EXPAND_AS_DEFINED =
SKIP_FUNCTION_MACROS = YES
#---------------------------------------------------------------------------
# Configuration options related to external references
#---------------------------------------------------------------------------
TAGFILES =
GENERATE_TAGFILE =
ALLEXTERNALS = NO
EXTERNAL_GROUPS = YES
EXTERNAL_PAGES = YES
#---------------------------------------------------------------------------
# Configuration options related to the dot tool
#---------------------------------------------------------------------------
DIA_PATH =
HIDE_UNDOC_RELATIONS = YES
HAVE_DOT = NO
DOT_NUM_THREADS = 0
DOT_FONTNAME = Helvetica
DOT_FONTSIZE = 10
DOT_FONTPATH =
CLASS_GRAPH = YES
COLLABORATION_GRAPH = YES
GROUP_GRAPHS = YES
UML_LOOK = NO
UML_LIMIT_NUM_FIELDS = 10
DOT_UML_DETAILS = NO
DOT_WRAP_THRESHOLD = 17
TEMPLATE_RELATIONS = NO
INCLUDE_GRAPH = YES
INCLUDED_BY_GRAPH = YES
CALL_GRAPH = NO
CALLER_GRAPH = NO
GRAPHICAL_HIERARCHY = YES
DIRECTORY_GRAPH = YES
DIR_GRAPH_MAX_DEPTH = 1
DOT_IMAGE_FORMAT = png
INTERACTIVE_SVG = NO
DOT_PATH =
DOTFILE_DIRS =
MSCFILE_DIRS =
DIAFILE_DIRS =
PLANTUML_JAR_PATH =
PLANTUML_CFG_FILE =
PLANTUML_INCLUDE_PATH =
DOT_GRAPH_MAX_NODES = 50
MAX_DOT_GRAPH_DEPTH = 0
DOT_TRANSPARENT = NO
DOT_MULTI_TARGETS = NO
GENERATE_LEGEND = YES
DOT_CLEANUP = YES

@ -1,8 +0,0 @@
<html><body>
<p>
<hr size="1"/><address style="text-align: right;"><small>Generated on $datetime with &nbsp;
<img src="CodeFirst.png" alt="Code#0" align="middle" border="0" height="40px"/>
by Doxygen version $doxygenversion</small></address>
</p>
</body>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

@ -0,0 +1,39 @@
using MangaMap.Model;
using MangaMap.Stub;
using MangaMap.Views;
namespace MangaMap;
public partial class App : Application
{
public string FileName { get; set; } = "SauvegardeDonnees.xml";
public string FilePath { get; set; } = Path.Combine(AppDomain.CurrentDomain.BaseDirectory);
public Manager MyManager { get; private set; } = new Manager(new Stub.Stub()); //pour utiliser le stub comme moyen de persistance.
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.UtilisateurActuel = MyManager.charger();
MainPage = new AppShell();
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");
}
}

@ -7,7 +7,7 @@
xmlns:Views="clr-namespace:MangaMap.Views"
Shell.FlyoutBehavior="Disabled"
Shell.NavBarIsVisible="False"
Shell.TabBarIsVisible="False">
Shell.TabBarIsVisible="True">
<TabBar Route="page">
@ -41,26 +41,6 @@
Title="Fiche Exemple"
ContentTemplate="{DataTemplate Views:ficheAnime}"
Route="fichePage"/>
<ShellContent
Title="Connection Admin"
ContentTemplate="{DataTemplate Views:loginAdminPage}"
Route="connexionAdminPage"/>
<ShellContent
Title="Creation oeuvre"
ContentTemplate="{DataTemplate Views:createOeuvre}"
Route="createOeuvrePage"/>
<ShellContent
Title="Modification oeuvre"
ContentTemplate="{DataTemplate Views:modifyOeuvre}"
Route="modifyOeuvrePage"/>
<ShellContent
Title="Modification utilisateur"
ContentTemplate="{DataTemplate Views:loginModifyPage}"
Route="loginModifyPage"/>
</Tab>
</TabBar>

@ -0,0 +1,18 @@
using MangaMap.Views;
namespace MangaMap;
public partial class AppShell : Shell
{
public AppShell()
{
InitializeComponent();
Routing.RegisterRoute("homePagedetails", typeof(homePage));
Routing.RegisterRoute("inscriptionPagedetails", typeof(signUpPage));
Routing.RegisterRoute("connexionPagedetails", typeof(loginPage));
Routing.RegisterRoute("settingsPagedetails", typeof(settingsPage));
Routing.RegisterRoute("listPagedetails", typeof(listPage));
Routing.RegisterRoute("fichePagedetails", typeof(ficheAnime));
}
}

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="MangaMap.NewContent1"
Background="{StaticResource Primary}">
<Grid ColumnDefinitions="50, *, 40">
<ImageButton Source="logo.png"
MaximumHeightRequest="30"
MaximumWidthRequest="30"
VerticalOptions="Center"
Clicked="ImageButton_Clicked"/>
<ImageButton Grid.Column="2"
Source="settings.png"
MaximumHeightRequest="30"
MaximumWidthRequest="30"
VerticalOptions="Center"
Clicked="SettingButton_Clicked"/>
</Grid>
</ContentView>

@ -0,0 +1,21 @@
using MangaMap.Views;
namespace MangaMap;
public partial class NewContent1 : ContentView
{
public NewContent1()
{
InitializeComponent();
}
async void ImageButton_Clicked(System.Object sender, System.EventArgs e)
{
//Navigation.PushAsync(new homePage());
await Shell.Current.GoToAsync("//page/homePage");
}
async void SettingButton_Clicked(object sender, System.EventArgs e)
{
await Shell.Current.GoToAsync("//page/secondaire/settingsPage");
}
}

@ -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
{
}
}

@ -1,7 +1,4 @@
///// \brief Fichier pour la classe MainPage
/// \file MainPage.xaml.cs
namespace MangaMap;
namespace MangaMap;
public partial class MainPage : ContentPage
{

@ -1,153 +1,106 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net7.0;</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>
<RootNamespace>MangaMap</RootNamespace>
<UseMaui>true</UseMaui>
<SingleProject>true</SingleProject>
<ImplicitUsings>enable</ImplicitUsings>
<!--<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>Exe</OutputType>
<RootNamespace>MangaMap</RootNamespace>
<UseMaui>true</UseMaui>
<SingleProject>true</SingleProject>
<ImplicitUsings>enable</ImplicitUsings>-->
<!-- Display name -->
<ApplicationTitle>MangaMap</ApplicationTitle>
<!-- App Identifier -->
<ApplicationId>com.companyname.mangamap</ApplicationId>
<ApplicationIdGuid>61196d0c-418f-4fb6-8dc5-c920275e1035</ApplicationIdGuid>
<!-- Versions -->
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
<ApplicationVersion>1</ApplicationVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">11.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">13.1</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'tizen'">6.5</SupportedOSPlatformVersion>
</PropertyGroup>
<ItemGroup>
<!-- App Icon -->
<MauiIcon Include="Resources\AppIcon\logo.png" />
<!-- Splash Screen -->
<MauiSplashScreen Include="Resources\Splash\splash.svg" Color="#512BD4" BaseSize="128,128" />
<!-- Images -->
<MauiImage Include="Resources\Images\*" />
<MauiImage Update="Resources\Images\dotnet_bot.svg" BaseSize="168,208" />
<!-- Custom Fonts -->
<MauiFont Include="Resources\Fonts\*" />
<!-- Raw Assets (also remove the "Resources\Raw" prefix) -->
<MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" />
</ItemGroup>
<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>
<None Remove="Resources\AppIcon\logo.png" />
<None Remove="Resources\Images\account_circle.png" />
<None Remove="Resources\Images\Evangelion.jpg" />
<None Remove="Resources\Images\logo.png" />
<None Remove="Resources\Images\OK.png" />
<None Remove="Resources\Images\settings.png" />
</ItemGroup>
<ItemGroup>
<MauiImage Include="Resources\AppIcon\logo.png" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="7.0.0" />
</ItemGroup>
<ItemGroup>
<Compile Update="CustomHeader.xaml.cs">
<DependentUpon>CustomHeader.xaml</DependentUpon>
</Compile>
<Compile Update="Views\Composants\ListOeuvre.xaml.cs">
<DependentUpon>ListOeuvre.xaml</DependentUpon>
</Compile>
<Compile Update="Views\CreateOeuvre.xaml.cs">
<DependentUpon>createOeuvre.xaml</DependentUpon>
</Compile>
<Compile Update="Views\loginAdminPage.xaml.cs">
<DependentUpon>loginAdminPage.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\ListOeuvre.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Views\Composants\StyleBouton.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Views\createOeuvre.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\loginAdminPage.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>
<ItemGroup>
<ProjectReference Include="..\DataContractPersistance\DataContractPersistance.csproj" />
<ProjectReference Include="..\Models\Models.csproj" />
<ProjectReference Include="..\Stub\Stub.csproj" />
</ItemGroup>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<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>Exe</OutputType>
<RootNamespace>MangaMap</RootNamespace>
<UseMaui>true</UseMaui>
<SingleProject>true</SingleProject>
<ImplicitUsings>enable</ImplicitUsings>
<!-- Display name -->
<ApplicationTitle>MangaMap</ApplicationTitle>
<!-- App Identifier -->
<ApplicationId>com.companyname.mangamap</ApplicationId>
<ApplicationIdGuid>61196d0c-418f-4fb6-8dc5-c920275e1035</ApplicationIdGuid>
<!-- Versions -->
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
<ApplicationVersion>1</ApplicationVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">11.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">13.1</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'tizen'">6.5</SupportedOSPlatformVersion>
</PropertyGroup>
<ItemGroup>
<!-- App Icon -->
<MauiIcon Include="Resources\AppIcon\appicon.svg" ForegroundFile="Resources\AppIcon\appiconfg.svg" Color="#512BD4" />
<!-- Splash Screen -->
<MauiSplashScreen Include="Resources\Splash\splash.svg" Color="#512BD4" BaseSize="128,128" />
<!-- Images -->
<MauiImage Include="Resources\Images\*" />
<MauiImage Update="Resources\Images\dotnet_bot.svg" BaseSize="168,208" />
<!-- Custom Fonts -->
<MauiFont Include="Resources\Fonts\*" />
<!-- Raw Assets (also remove the "Resources\Raw" prefix) -->
<MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" />
</ItemGroup>
<ItemGroup>
<AndroidResource Remove="Component\**" />
<Compile Remove="Component\**" />
<EmbeddedResource Remove="Component\**" />
<MauiCss Remove="Component\**" />
<MauiXaml Remove="Component\**" />
<None Remove="Component\**" />
</ItemGroup>
<ItemGroup>
<None Remove="Resources\Images\Evangelion.jpg" />
<None Remove="Resources\Images\logo.png" />
<None Remove="Resources\Images\settings.png" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="7.0.0" />
</ItemGroup>
<ItemGroup>
<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\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>

@ -0,0 +1,27 @@

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}") = "MangaMap", "MangaMap.csproj", "{1946288E-37BA-420F-89BD-A1C3D4178344}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{1946288E-37BA-420F-89BD-A1C3D4178344}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1946288E-37BA-420F-89BD-A1C3D4178344}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1946288E-37BA-420F-89BD-A1C3D4178344}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{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
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {61F7FB11-1E47-470C-91E2-47F8143E1572}
EndGlobalSection
EndGlobal

@ -1,7 +1,4 @@
///// \brief Fichier pour la classe MauiProgram
/// \file MauiProgram.cs
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging;
namespace MangaMap;

@ -0,0 +1,23 @@
using MangaMap.Views;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MangaMap.Model
{
public class Admin : Personne
{
public Admin(string motDePasse, string email, string pseudo)
{
MotDePasse = motDePasse;
Email = email;
Pseudo = pseudo;
}
public void ajouterAnime() { }
public void supprimerAnime() { }
}
}

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

@ -0,0 +1,68 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using MangaMap.Stub;
namespace MangaMap.Model
{
public class Manager
{
public IPersistanceManager Persistance { get; set; }
public List<Admin> Admins { get; private set; }
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;
}
public Manager()
{
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();
foreach (var item in donne.Item1)
{
Oeuvres.Add(item);
}
Utilisateurs.AddRange(donne.Item2);
}
public void sauvegarder()
{
Persistance.sauvegarder(Oeuvres, Utilisateurs);
}
}
}

@ -0,0 +1,44 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;
namespace MangaMap.Model
{
[DataContract]
public class Oeuvre
{
[DataMember]
public string Nom { get; private set; }
[DataMember]
public List <string> Genre { get; private set; }
[DataMember]
public string Type { get; private set; }
[DataMember]
public string Description { get; private set; }
[DataMember]
public int Note { get; private set; }
[DataMember]
public int NbEpisodes { get; private set; }
[DataMember]
public string Affiche { get; private set; }
public Oeuvre(string nom, List<string> genre, string type, string description, int note, int nbEpisode, string affiche)
{
Nom = nom;
Genre = genre;
Type = type;
Description = description;
Note = note;
NbEpisodes = nbEpisode;
Affiche = affiche;
}
public void AjouterEpisode(int nb)
{
NbEpisodes = NbEpisodes + nb;
}
}
}

@ -0,0 +1,62 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;
namespace MangaMap.Model
{
[DataContract]
public class Personne
{
[DataMember]
public string MotDePasse { get; set; }
[DataMember]
public string Email { get; set; }
[DataMember]
public string Pseudo { get; set; }
public bool MofifierMotDePasse(string MotDePasse)
{
string test = "";
test = Console.ReadLine();
if (test == this.MotDePasse)
{
this.MotDePasse = MotDePasse.Trim();
return true;
}
return false;
}
public bool MofifierEmail(string Email)
{
string test = "";
test = Console.ReadLine();
if (test == this.MotDePasse)
{
this.Email = Email.Trim();
return true;
}
return false;
}
public bool MofifierPseudo(string Pseudo)
{
string test = "";
test = Console.ReadLine();
if (test == this.MotDePasse)
{
this.Pseudo = Pseudo.Trim();
return true;
}
return false;
}
}
}

@ -0,0 +1,57 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;
namespace MangaMap.Model
{
[DataContract]
public class Utilisateur : Personne
{
[DataMember]
public string nom { get; private set; }
[DataMember]
public string prenom { get; private set; }
[DataMember]
public int age { get; private set; }
[DataMember]
public List<Oeuvre> ListeOeuvreEnVisionnage { get; set; }
[DataMember]
public List<Oeuvre> ListeOeuvreDejaVu { get; private set; }
[DataMember]
public List<Oeuvre> ListeOeuvrePourPlusTard { get; private set; }
[DataMember]
public List<Oeuvre> ListeOeuvreFavorites { get; private set; }
public Utilisateur(string email, string pseudo, string mdp, string nom, string prenom, int age)
{
Email = email;
Pseudo = pseudo;
MotDePasse = mdp;
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()
{
this.nom = null;
this.prenom = null;
this.age = 0;
}
}
}

Before

Width:  |  Height:  |  Size: 231 B

After

Width:  |  Height:  |  Size: 231 B

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Before

Width:  |  Height:  |  Size: 101 KiB

After

Width:  |  Height:  |  Size: 101 KiB

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 31 KiB

Before

Width:  |  Height:  |  Size: 573 KiB

After

Width:  |  Height:  |  Size: 573 KiB

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

@ -403,8 +403,8 @@
</Style>
<Style TargetType="ImageButton" x:Key="ImageAnime">
<Setter Property="HeightRequest" Value="150" />
<Setter Property="WidthRequest" Value="130" />
<Setter Property="HeightRequest" Value="170" />
<Setter Property="WidthRequest" Value="150" />
<Setter Property="CornerRadius" Value="15" />
<Setter Property="Aspect" Value="Fill" />
</Style>

@ -1,11 +1,6 @@
///// \brief Fichier pour la classe DataContractXml
///// \author HERSAN Mathéo, JOURDY Vianney
/// \file DataContractXML.cs
using Models;
using MangaMap.Model;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.Linq;
using System.Runtime.Serialization;
@ -13,31 +8,18 @@ using System.Text;
using System.Threading.Tasks;
using System.Xml;
namespace DataContractPersistance
namespace MangaMap.Stub
{
/// <summary>
/// Implémentation de l'interface IPersistanceManager utilisant la sérialisation avec DataContract.
/// </summary>
public class DataContractXml : IPersistanceManager
public class DataContract : IPersistanceManager
{
/// <summary>
/// Obtient ou définit le nom du fichier de sauvegarde XML.
/// </summary>
public string FileName { get; set; } = "SauvegardeDonnees.xml";
/// <summary>
/// Obtient ou définit le chemin du fichier de sauvegarde xml.
/// </summary>
public string FilePath { get; set; } = Path.Combine(AppDomain.CurrentDomain.BaseDirectory);
/// <summary>
/// Charge les données sauvegardées à partir du fichier xml.
/// </summary>
/// <returns>Un tuple contenant la liste des oeuvres et la liste des utilisateurs.</returns>
public (ObservableCollection<Oeuvre>, List<Utilisateur>) chargeDonne()
public (List<Oeuvre>, List<Utilisateur>) chargeDonne()
{
var serializer = new DataContractSerializer(typeof(DataToPersist));
DataToPersist? data;
DataToPersist data;
if (File.Exists(Path.Combine(FilePath, FileName))) // Vérifiez si le fichier existe
{
@ -51,17 +33,10 @@ namespace DataContractPersistance
data = new DataToPersist(); // Si le fichier n'existe pas, créez une nouvelle liste
}
return (data!.Oeuvres, data.Utilisateurs);
return (data.Oeuvres, data.Utilisateurs);
}
/// <summary>
/// Sauvegarde les données dans le fichier XML.
/// </summary>
/// <param name="o">La liste des oeuvres à sauvegarder.</param>
/// <param name="u">La liste des utilisateurs à sauvegarder.</param>
public void sauvegarder(ObservableCollection<Oeuvre> o, List<Utilisateur> u)
public void sauvegarder(List<Oeuvre> o, List<Utilisateur> u)
{
var serializer = new DataContractSerializer(typeof(DataToPersist));
@ -71,6 +46,11 @@ namespace DataContractPersistance
Directory.CreateDirectory(FilePath);
}
/*using (Stream s = File.Create(Path.Combine(FilePath, FileName)))
{
serializer.WriteObject(s, o); //Version d'enregistrement des données sans indentation.
}*/
DataToPersist data = new DataToPersist();
data.Oeuvres = o;
data.Utilisateurs = u;
@ -80,9 +60,10 @@ namespace DataContractPersistance
{
using (XmlWriter w = XmlWriter.Create(tw, settings))
{
serializer.WriteObject(w, data); // Version d'enregistrement des données avec indentation.
serializer.WriteObject(w, data); //Version d'enregistrement des données avec indentation.
}
}
}
}
}
}

@ -0,0 +1,17 @@
using System;
using MangaMap.Model;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MangaMap.Stub
{
//Cette classe permet de définir ce qui doit être enregistrer par la persistance.
public class DataToPersist
{
public List<Oeuvre> Oeuvres { get; set; } = new List<Oeuvre>();
public List<Utilisateur> Utilisateurs { get; set; } = new List<Utilisateur>();
}
}

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

@ -0,0 +1,42 @@
using MangaMap.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MangaMap.Stub
{
public class Stub : IPersistanceManager
//Cette classe sert à faire charger un jeu de données qui n'est pas celui enregistrer dans le fichier sur l'ordinateur.
//Il permet de faire des transistion entre différent moyen de persister.
{
public (List<Oeuvre>, List<Utilisateur>) chargeDonne()
{
List<Oeuvre> l1 = new List<Oeuvre>();
List<Utilisateur> l2 = new List<Utilisateur>();
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("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);
}
public void sauvegarder(List<Oeuvre> o, List<Utilisateur> u)
{
throw new NotImplementedException();
}
}
}

@ -4,8 +4,9 @@
x:Class="MangaMap.Views.Composants.StyleBouton">
<ImageButton
Source="{Binding Affiche}"
Style="{StaticResource ImageAnime}"
Clicked="AnimeImageClickedList"/>
BackgroundColor="Red"
Source="test2.png"
Clicked="ButtonIsPressed"/>
</ContentView>

@ -0,0 +1,14 @@
namespace MangaMap.Views.Composants;
public partial class StyleBouton : ContentView
{
public StyleBouton()
{
InitializeComponent();
}
private async void ButtonIsPressed(object sender, EventArgs e)
{
await Shell.Current.Navigation.PushAsync(new ficheAnime());
}
}

@ -0,0 +1,99 @@
namespace MangaMap.Views;
using Model;
using System.ComponentModel;
using System.Diagnostics;
using System.Xml.Linq;
public partial class ficheAnime : ContentPage, INotifyPropertyChanged
{
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;
}
}
}
}

@ -0,0 +1,65 @@
<?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.ficheAnime"
Title="ficheAnime"
BackgroundColor="{StaticResource Secondary}">
<Grid RowDefinitions="40, *">
<local:NewContent1 HeightRequest="40" VerticalOptions="Start" Padding="10, 0"/>
<VerticalStackLayout Grid.Row="1">
<HorizontalStackLayout>
<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>
<Label Text="test"/>
<Label Text="test"/>
<Label Text="test" BackgroundColor="{StaticResource Primary}"/>
</Grid>
<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}"
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>

@ -0,0 +1,63 @@
<?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"
xmlns:modeles="clr-namespace:MangaMap.Model"
x:Class="MangaMap.Views.homePage"
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"
/>
<HorizontalStackLayout BindableLayout.ItemsSource="{Binding Oeuvres}" Spacing="100" HorizontalOptions="Center">
<BindableLayout.ItemTemplate>
<DataTemplate>
<ImageButton
Style="{StaticResource ImageAnime}"
BackgroundColor="Red"
Source="{Binding Affiche}"
Clicked="AnimeImageClicked"
/>
<!--<views:StyleBouton -->
</DataTemplate>
</BindableLayout.ItemTemplate>
</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>

@ -0,0 +1,28 @@
namespace MangaMap.Views;
using MangaMap.Model;
public partial class homePage : ContentPage
{
public Manager my_manager => (App.Current as App).MyManager;
public homePage()
{
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));
}
}
}

@ -0,0 +1,142 @@
<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.listPage"
BackgroundColor="Black"
x:Name="listPage">
<Grid RowDefinitions="40, *">
<local:NewContent1 HeightRequest="40" VerticalOptions="Start" Padding="10, 0"/>
<ScrollView
Grid.Row="1">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Label Text="Watching" TextColor="White" FontSize="Title" Margin="50,10,0,0" Grid.Row="0"/>
<Frame Grid.Row="1" BackgroundColor="Black" Margin="20" BorderColor="Black">
<Grid BackgroundColor="#333333" >
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid Margin="20" Grid.Row="0" ColumnDefinitions="*,300,300">
<Label Grid.Column="0"
Text="Titre" FontSize="Large" TextColor="White"
HorizontalOptions="Start" VerticalOptions="Center"/>
<Label Grid.Column="1"
Text="Score" FontSize="Large" TextColor="White"
HorizontalOptions="Center" VerticalOptions="Center"/>
<Label Grid.Column="2"
Text="Progression" FontSize="Large" TextColor="White"
HorizontalOptions="End" VerticalOptions="Center"/>
</Grid>
<ScrollView Grid.Row="1" VerticalScrollBarVisibility="Always">
<!--<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>
<Label Text="Completed" TextColor="White" FontSize="Title" Margin="50,10,0,0" Grid.Row="2"/>
<Frame Grid.Row="3" BackgroundColor="Black" Margin="20" BorderColor="Black">
<Grid BackgroundColor="#333333" >
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid Margin="20" Grid.Row="0" ColumnDefinitions="*,300,300">
<Label Grid.Column="0"
Text="Titre" FontSize="Large" TextColor="White"
HorizontalOptions="Start" VerticalOptions="Center"/>
<Label Grid.Column="1"
Text="Score" FontSize="Large" TextColor="White"
HorizontalOptions="Center" VerticalOptions="Center"/>
<Label Grid.Column="2"
Text="Progression" FontSize="Large" TextColor="White"
HorizontalOptions="End" VerticalOptions="Center"/>
</Grid>
<ScrollView Grid.Row="3" 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>
</ScrollView>
</Grid>
</Frame>
</Grid>
</ScrollView>
</Grid>
</ContentPage>

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

@ -13,11 +13,12 @@
<Entry x:Name="passwordEntry" Placeholder="Mot de passe" Margin="0,0,0,20" Style="{StaticResource ChampsMdp}"/>
<Button Text="Se connecter" Clicked="OnLoginClicked" Style="{StaticResource Bouton}" />
<Button Text="Se connecter" Clicked="OnLoginClicked" Style="{StaticResource Bouton}"/>
<StackLayout Orientation="Horizontal" HorizontalOptions="Center">
<Label Text="Pas de compte ? " TextColor="#FFFFFF" Margin="0,12,5,0"/>
<Button Text="S'inscrire" TextColor="{StaticResource Primary}" BackgroundColor="{StaticResource Secondary}" BorderColor="{StaticResource Secondary}" Clicked="OnSignUpClicked"/>
<Label Text="Pas de compte ? " TextColor="#FFFFFF" Margin="0,0,5,0"/>
<Label Text="S'inscrire" TextColor="{StaticResource Primary}">
</Label>
</StackLayout>
</StackLayout>

@ -0,0 +1,50 @@
namespace MangaMap.Views;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using MangaMap.Stub;
using MangaMap.Model;
public partial class loginPage : ContentPage
{
public Manager my_manager => (App.Current as App).MyManager;
public loginPage()
{
InitializeComponent();
}
async void OnLoginClicked(object sender, EventArgs e)
{
// Récupération de l'email et du mot de passe entrés
string email = emailEntry.Text;
string password = passwordEntry.Text;
if (string.IsNullOrWhiteSpace(email) ||
string.IsNullOrWhiteSpace(password))
{
await DisplayAlert("Erreur", "Veuillez remplir tous les champs.", "OK");
return;
}
// Vérifier que l'e-mail a la bonne forme
if (!Regex.IsMatch(email, @"^[^@\s]+@[^@\s]+\.[^@\s]+$"))
{
await DisplayAlert("Erreur", "L'email n'est pas valide.", "OK");
return;
}
// Vérifier que l'utilisateur existe
Utilisateur utilisateur = my_manager.Utilisateurs.FirstOrDefault(u => u.Email == email && u.MotDePasse == password);
if (utilisateur == null)
{
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());
}
}

@ -9,17 +9,10 @@
<local:NewContent1 HeightRequest="40" VerticalOptions="Start" Padding="10, 0"/>
<StackLayout VerticalOptions="Center" HorizontalOptions="Center" Grid.Row="1">
<Button Text="Modifier le compte" Clicked="ModifyAccountClicked" Margin="0,0,0,10" Style="{StaticResource Bouton}"/>
<Button Text="Deconnexion" Clicked="OnDisconnectClicked" Margin="0,0,0,30" Style="{StaticResource Bouton}"/>
<Button Text="Connexion Admin" Clicked="LoginAdminClicked" Style="{StaticResource Bouton}"/>
<Button Text="Ajouter une série" Clicked="AddClicked" Style="{StaticResource Bouton}"/>
<Button Text="Deconnexion" Clicked="OnDisconnectClicked" Margin="0,0,0,30" Style="{StaticResource Bouton}"/>
<Entry x:Name="oeuvreEntry" Placeholder="Oeuvre à modifier" Margin="0,10,0,0" Style="{StaticResource Champs}"/>
<Button Text="Modifier l'ouvre" Clicked="ModifyClicked" Style="{StaticResource Bouton}"/>
<Button Text="Connexion/Inscription" Clicked="OnLoginClicked" Style="{StaticResource Bouton}"/>
</StackLayout>
</Grid>

@ -0,0 +1,19 @@
namespace MangaMap.Views;
public partial class settingsPage : ContentPage
{
public settingsPage()
{
InitializeComponent();
}
private async void OnDisconnectClicked(object sender, EventArgs e)
{
await Shell.Current.Navigation.PushAsync(new loginPage());
}
private void OnLoginClicked(object sender, EventArgs e)
{
//
}
}

@ -26,8 +26,8 @@
<Button Text="S'inscire" Clicked="OnSignUpClicked" Style="{StaticResource Bouton}"/>
<StackLayout Orientation="Horizontal" HorizontalOptions="Center">
<Label Text="Déjà un compte ? " TextColor="#FFFFFF" Margin="0,12,5,0"/>
<Button Text="Se connecter" TextColor="{StaticResource Primary}" BackgroundColor="{StaticResource Secondary}" BorderColor="{StaticResource Secondary}" Clicked="OnLoginClicked"/>
<Label Text="Déjà un compte ? " TextColor="#FFFFFF" Margin="0,0,5,0"/>
<Label Text="Se connecter" TextColor="{StaticResource Primary}"/>
</StackLayout>
</StackLayout>

@ -1,46 +1,19 @@
///// \brief Fichier pour la classe signUpPage
///// \author HERSAN Mathéo, JOURDY Vianney
/// \file signUpPage.xaml.cs
namespace MangaMap.Views;
using Models;
using MangaMap.Model;
using System.Text.RegularExpressions;
using static System.Runtime.InteropServices.JavaScript.JSType;
/// <summary>
/// Classe représentant la page d'inscription de l'application.
/// </summary>
public partial class signUpPage : ContentPage
{
/// <summary>
/// Référence au gestionnaire de l'application.
/// </summary>
public Manager my_manager => (App.Current as App).MyManager;
/// <summary>
/// Constructeur de la page d'inscription.
/// </summary>
public signUpPage()
{
public signUpPage()
{
InitializeComponent();
}
/// <summary>
/// Gestionnaire d'événement lorsqu'un utilisateur clique sur le bouton "Connexion".
/// </summary>
/// <param name="sender">L'objet qui a déclenché l'événement.</param>
/// <param name="e">Arguments de l'événement.</param>
async void OnLoginClicked(object sender, EventArgs e)
{
await Shell.Current.GoToAsync("//page/secondaire/connexionPage");
}
}
/// <summary>
/// Gestionnaire d'événement lorsqu'un utilisateur clique sur le bouton "Inscription".
/// </summary>
/// <param name="sender">L'objet qui a déclenché l'événement.</param>
/// <param name="e">Arguments de l'événement.</param>
async void OnSignUpClicked(object sender, System.EventArgs e)
{
// Récupérer les valeurs des entrées
@ -54,7 +27,7 @@ public partial class signUpPage : ContentPage
foreach (Utilisateur u in my_manager.Utilisateurs)
{
if (u.Email == email || u.Pseudo == pseudo)
if (u.Email == email ||u.Pseudo==pseudo)
{
await DisplayAlert("Erreur", "L'utilisateur existe déjà.", "OK");
return;
@ -62,7 +35,7 @@ public partial class signUpPage : ContentPage
}
if (string.IsNullOrWhiteSpace(email) ||
string.IsNullOrWhiteSpace(password) || string.IsNullOrWhiteSpace(confirmPassword))
string.IsNullOrWhiteSpace(password) || string.IsNullOrWhiteSpace(confirmPassword))
{
await DisplayAlert("Erreur", "Veuillez remplir tous les champs.", "OK");
return;
@ -100,16 +73,11 @@ public partial class signUpPage : ContentPage
my_manager.Utilisateurs.Add(util);
my_manager.sauvegarder();
my_manager.UtilisateurActuel = util;
await Shell.Current.GoToAsync("//page/homePage");
await Navigation.PushAsync(new homePage());
return;
}
}
/// <summary>
/// Vérifie si un mot de passe est suffisamment fort.
/// </summary>
/// <param name="password">Le mot de passe à vérifier.</param>
/// <returns>True si le mot de passe est suffisamment fort, sinon False.</returns>
bool IsPasswordStrong(string password)
{
// Vérifier si le mot de passe est assez long

@ -2,13 +2,6 @@
Vianney Jourdy (G9) Hersan Mathéo (G10)
[![Build Status](https://codefirst.iut.uca.fr/api/badges/vianney.jourdy/MapManga/status.svg)](https://codefirst.iut.uca.fr/vianney.jourdy/MapManga)
[![Quality Gate Status](https://codefirst.iut.uca.fr/sonar/api/project_badges/measure?project=MangaMap&metric=alert_status&token=ebbdc36d23b25e2104d276df1bf5ae218f26970b)](https://codefirst.iut.uca.fr/sonar/dashboard?id=MangaMap)
[![Bugs](https://codefirst.iut.uca.fr/sonar/api/project_badges/measure?project=MangaMap&metric=bugs&token=ebbdc36d23b25e2104d276df1bf5ae218f26970b)](https://codefirst.iut.uca.fr/sonar/dashboard?id=MangaMap)
[![Coverage](https://codefirst.iut.uca.fr/sonar/api/project_badges/measure?project=MangaMap&metric=coverage&token=ebbdc36d23b25e2104d276df1bf5ae218f26970b)](https://codefirst.iut.uca.fr/sonar/dashboard?id=MangaMap)
[![Vulnerabilities](https://codefirst.iut.uca.fr/sonar/api/project_badges/measure?project=MangaMap&metric=vulnerabilities&token=ebbdc36d23b25e2104d276df1bf5ae218f26970b)](https://codefirst.iut.uca.fr/sonar/dashboard?id=MangaMap)
[![Maintainability Rating](https://codefirst.iut.uca.fr/sonar/api/project_badges/measure?project=MangaMap&metric=sqale_rating&token=ebbdc36d23b25e2104d276df1bf5ae218f26970b)](https://codefirst.iut.uca.fr/sonar/dashboard?id=MangaMap)
## 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.
@ -28,7 +21,6 @@ All the information about MapManga are [here](https://codefirst.iut.uca.fr/git/v
## Screen Capture
![homePage](/Documentation/Images/homePage.png)
![loginPage](/Documentation/Images/connexionPage.png)
![signUpPage](/Documentation/Images/signUpPage.png)
![settingsPage](/Documentation/Images/settingsPage.png)
@ -45,5 +37,8 @@ All the information about MapManga are [here](https://codefirst.iut.uca.fr/git/v
## Contributors
- [JOURDY Vianney](https://codefirst.iut.uca.fr/git/vianney.jourdy)
- [HERSAN Mathéo](https://codefirst.iut.uca.fr/git/matheo.hersan)

@ -0,0 +1,63 @@
kind: pipeline
type: docker
name: MangaMap
trigger:
branch:
- master
- C#/model
event:
- push
steps:
- name: build
image: hub.codefirst.iut.uca.fr/marc.chevaldonne/codefirst-dotnet7-maui:latest
volumes:
- name: Documentation
path: /Documentation
commands:
- cd src/MapManga/
- dotnet restore MangaMap.sln
- dotnet build MangaMap.sln -c Release --no-restore /p:AndroidSdkDirectory=$ANDROID_SDK_ROOT -property:Aapt2ToolPath=$ANDROID_SDK_ROOT/build-tools/33.0.0
- name: tests
image: hub.codefirst.iut.uca.fr/marc.chevaldonne/codefirst-dotnet7-maui:latest
commands:
- cd src/MapManga/
- dotnet restore MangaMap.sln
- dotnet test MangaMap.sln --logger trx --no-restore /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura --collect "XPlat Code Coverage"
depends_on: [build]
- name: code-analysis
image: hub.codefirst.iut.uca.fr/marc.chevaldonne/codefirst-dronesonarplugin-dotnet7-maui
commands:
- cd src/MapManga/
- dotnet restore MangaMap.sln
- dotnet sonarscanner begin /k:TestCI /d:sonar.host.url=$${PLUGIN_SONAR_HOST} /d:sonar.coverageReportPaths="coveragereport/SonarQube.xml" /d:sonar.coverage.exclusions="Tests/**" /d:sonar.login=$${PLUGIN_SONAR_TOKEN}
- reportgenerator -reports:"**/coverage.cobertura.xml" -reporttypes:SonarQube -targetdir:"coveragereport"
- dotnet publish MangaMap.sln -c Release --no-restore -o CI_PROJECT_DIR/build/release
- dotnet sonarscanner end /d:sonar.login=$${PLUGIN_SONAR_TOKEN}
secrets: [ SECRET_SONAR_LOGIN ]
settings:
# accessible en ligne de commande par ${PLUGIN_SONAR_HOST}
sonar_host: https://codefirst.iut.uca.fr/sonar/
# accessible en ligne de commande par ${PLUGIN_SONAR_TOKEN}
sonar_token:
from_secret: SECRET_SONAR_LOGIN
depends_on: [tests]
- name: generate-and-deploy-docs
image: hub.codefirst.iut.uca.fr/maxime.batista/codefirst-docdeployer
failure: ignore
commands:
- /entrypoint.sh -l Documentation/doxygen -t doxygen
when:
branch:
- master
event:
- push
depends_on: [ build, tests ]
volumes:
- name: docs
temp: {}

@ -1,82 +0,0 @@
///// \brief Fichier pour la classe DataContractJson
///// \author HERSAN Mathéo, JOURDY Vianney
/// \file DataContractJSON.cs
using Models;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.Linq;
using System.Runtime.Serialization.Json;
using System.Text;
using System.Threading.Tasks;
namespace DataContractPersistance
{
/// <summary>
/// Implémentation de l'interface IPersistanceManager utilisant la sérialisation avec DataContract.
/// </summary>
public class DataContractJson : IPersistanceManager
{
/// <summary>
/// Obtient ou définit le nom du fichier de sauvegarde JSON.
/// </summary>
public string FileName { get; set; } = "SauvegardeDonnees.json";
/// <summary>
/// Obtient ou définit le chemin du fichier de sauvegarde JSON.
/// </summary>
public string FilePath { get; set; } = Path.Combine(AppDomain.CurrentDomain.BaseDirectory);
/// <summary>
/// Charge les données sauvegardées à partir du fichier JSON.
/// </summary>
/// <returns>Un tuple contenant la liste des oeuvres et la liste des utilisateurs.</returns>
public (ObservableCollection<Oeuvre>, List<Utilisateur>) chargeDonne()
{
DataContractJsonSerializer jsonSerializer = new DataContractJsonSerializer(typeof(DataToPersist));
DataToPersist? data;
using (FileStream stream2 = File.OpenRead(Path.Combine(FilePath, FileName)))
{
data = jsonSerializer.ReadObject(stream2) as DataToPersist;
}
return (data!.Oeuvres, data.Utilisateurs);
}
/// <summary>
/// Sauvegarde les données dans le fichier JSON.
/// </summary>
/// <param name="o">La liste des oeuvres à sauvegarder.</param>
/// <param name="u">La liste des utilisateurs à sauvegarder.</param>
public void sauvegarder(ObservableCollection<Oeuvre> o, List<Utilisateur> u)
{
DataToPersist data = new DataToPersist();
data.Oeuvres = o;
data.Utilisateurs = u;
if (!Directory.Exists(FilePath))
{
Debug.WriteLine("Directory doesn't exist.");
Directory.CreateDirectory(FilePath);
}
DataContractJsonSerializer jsonSerializer = new DataContractJsonSerializer(typeof(DataToPersist));
using (FileStream stream = File.Create(Path.Combine(FilePath, FileName)))
{
using (var writer = JsonReaderWriterFactory.CreateJsonWriter(
stream,
Encoding.UTF8,
false,
true))//<- this boolean says that we sant indentation
{
jsonSerializer.WriteObject(writer, data);
writer.Flush();
}
}
}
}
}

@ -1,13 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Models\Models.csproj" />
</ItemGroup>
</Project>

@ -1,30 +0,0 @@
///// \brief Fichier pour la classe DataToPersist
///// \author HERSAN Mathéo, JOURDY Vianney
/// \file DataToPersist.cs
using System;
using Models;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Collections.ObjectModel;
namespace DataContractPersistance
{
/// <summary>
/// Classe de données pour la persistance contenant les listes des oeuvres et des utilisateurs.
/// </summary>
public class DataToPersist
{
/// <summary>
/// Obtient ou définit la liste des oeuvres à persister.
/// </summary>
public ObservableCollection<Oeuvre> Oeuvres { get; set; } = new ObservableCollection<Oeuvre>();
/// <summary>
/// Obtient ou définit la liste des utilisateurs à persister.
/// </summary>
public List<Utilisateur> Utilisateurs { get; set; } = new List<Utilisateur>();
}
}

@ -1,63 +0,0 @@
///// \brief Fichier pour la classe App
///// \author HERSAN Mathéo, JOURDY Vianney
/// \file App.xaml.cs
using Models;
using Stub;
using MangaMap.Views;
using System.Diagnostics;
namespace MangaMap;
/// <summary>
/// Classe représentant l'application principale.
/// </summary>
public partial class App : Application
{
/// <summary>
/// Nom du fichier de sauvegarde des données.
/// </summary>
public string FileName { get; set; } = "SauvegardeDonnees.xml";
/// <summary>
/// Chemin du fichier de sauvegarde des données.
/// </summary>
public string FilePath { get; set; } = Path.Combine(AppDomain.CurrentDomain.BaseDirectory);
/// <summary>
/// Gestionnaire principal de l'application.
/// </summary>
public Manager MyManager { get; private set; } = new Manager(new Stub.Stub()); // Utilise le Stub comme moyen de persistance.
/// <summary>
/// Administrateur principal de l'application.
/// </summary>
public Admin MyAdmin { get; private set; } = new Admin("test", "test@test.ts", "Pseudo_test");
/// <summary>
/// Constructeur de l'application.
/// </summary>
public App()
{
InitializeComponent();
if (File.Exists(Path.Combine(FilePath, FileName)))
{
MyManager = new Manager(new DataContractPersistance.DataContractXml()); // Utilise le DataContract comme moyen de persistance.
//MyManager = new Manager(new Stub.DataContractJson()); // Utilise le DataContract comme moyen de persistance.
}
MyManager.charger();
MyManager.Admins.Add(MyAdmin);
MainPage = new AppShell();
if (!File.Exists(Path.Combine(FilePath, FileName)))
{
MyManager.Persistance = new DataContractPersistance.DataContractXml(); // Utilise le Stub comme moyen de persistance.
}
MyManager.sauvegarder();
Console.WriteLine("Sauvegarde effectuée.");
}
}

@ -1,33 +0,0 @@
///// \brief Fichier pour la classe AppShell
///// \author HERSAN Mathéo, JOURDY Vianney
/// \file AppShell.xaml.cs
using MangaMap.Views;
namespace MangaMap;
/// <summary>
/// Classe représentant le Shell.
/// </summary>
public partial class AppShell : Shell
{
/// <summary>
/// Constructeur du shell de l'application.
/// </summary>
public AppShell()
{
InitializeComponent();
// Enregistrement des routes pour les pages de l'application
Routing.RegisterRoute("homePagedetails", typeof(homePage));
Routing.RegisterRoute("inscriptionPagedetails", typeof(signUpPage));
Routing.RegisterRoute("connexionPagedetails", typeof(loginPage));
Routing.RegisterRoute("settingsPagedetails", typeof(settingsPage));
Routing.RegisterRoute("listPagedetails", typeof(listPage));
Routing.RegisterRoute("fichePagedetails", typeof(ficheAnime));
Routing.RegisterRoute("connexionAdminPagedetails", typeof(loginAdminPage));
Routing.RegisterRoute("createPagedetails", typeof(createOeuvre));
Routing.RegisterRoute("modifyPagedetails", typeof(modifyOeuvre));
Routing.RegisterRoute("loginModifyPagedetails", typeof(loginModifyPage));
}
}

@ -1,39 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="MangaMap.NewContent1"
Background="{StaticResource Primary}">
<Grid ColumnDefinitions="50, *,100,40, 40">
<ImageButton Source="logo.png"
MaximumHeightRequest="30"
MaximumWidthRequest="30"
BackgroundColor="{StaticResource Primary}"
VerticalOptions="Center"
Clicked="ImageButton_Clicked"/>
<ImageButton Grid.Column="2"
Source="listbutton.png"
MaximumWidthRequest="30"
MaximumHeightRequest="30"
BackgroundColor="{StaticResource Primary}"
VerticalOptions="Center"
Clicked="ListButton_Clicked"
IsVisible="{Binding IsUserLoggedIn}" />
<ImageButton Grid.Column="3"
Source = "account_circle.png"
MaximumHeightRequest="30"
MaximumWidthRequest="30"
BackgroundColor="{StaticResource Primary}"
VerticalOptions="Center"
Clicked="AccountButton_Clicked"/>
<ImageButton Grid.Column="4"
Source="settings.png"
MaximumHeightRequest="30"
MaximumWidthRequest="30"
BackgroundColor="{StaticResource Primary}"
VerticalOptions="Center"
Clicked="SettingButton_Clicked"/>
</Grid>
</ContentView>

@ -1,79 +0,0 @@
///// \brief Fichier pour la classe CustomHeader
///// \author HERSAN Mathéo, JOURDY Vianney
/// \file CustomHeader.xaml.cs
using MangaMap.Views;
namespace MangaMap;
using Models;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.Windows.Input;
using System.Xml.Linq;
using Microsoft.Maui.Graphics;
using INotifyPropertyChanged = System.ComponentModel.INotifyPropertyChanged;
/// <summary>
/// Classe représentant le contenu d'en-tête personnalisé (CustomHeader).
/// </summary>
public partial class NewContent1 : ContentView, INotifyPropertyChanged
{
public Manager my_manager => (App.Current as App).MyManager;
/// <summary>
/// Constructeur du contenu d'en-tête personnalisé.
/// </summary>
public NewContent1()
{
InitializeComponent();
}
/// <summary>
/// Gère l'événement de clic sur le bouton d'accueil.
/// </summary>
/// <param name="sender">L'objet déclencheur de l'événement.</param>
/// <param name="e">Les arguments de l'événement.</param>
async void ImageButton_Clicked(System.Object sender, System.EventArgs e)
{
await Shell.Current.GoToAsync("//page/homePage");
}
/// <summary>
/// Gère l'événement de clic sur le bouton de paramètres.
/// </summary>
/// <param name="sender">L'objet déclencheur de l'événement.</param>
/// <param name="e">Les arguments de l'événement.</param>
async void SettingButton_Clicked(object sender, System.EventArgs e)
{
await Shell.Current.GoToAsync("//page/secondaire/settingsPage");
}
/// <summary>
/// Gère l'événement de clic sur le bouton de compte.
/// </summary>
/// <param name="sender">L'objet déclencheur de l'événement.</param>
/// <param name="e">Les arguments de l'événement.</param>
async void AccountButton_Clicked(object sender, System.EventArgs e)
{
if (my_manager.UtilisateurActuel.Email != null)
{
return;
}
await Shell.Current.GoToAsync("//page/secondaire/connexionPage");
}
/// <summary>
/// Gère l'événement de clic sur le bouton de liste.
/// </summary>
/// <param name="sender">L'objet déclencheur de l'événement.</param>
/// <param name="e">Les arguments de l'événement.</param>
async void ListButton_Clicked(object sender, System.EventArgs e)
{
if (my_manager.UtilisateurActuel.Email == null)
{
return;
}
await Navigation.PushAsync(new listPage());
//await Shell.Current.GoToAsync("//page/secondaire/listPage");
}
}

@ -1,51 +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}") = "MangaMap", "MangaMap.csproj", "{1946288E-37BA-420F-89BD-A1C3D4178344}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Models", "..\Models\Models.csproj", "{D13B26C4-A575-4577-A735-0B04DC02BC85}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UnitTests", "..\UnitTests\UnitTests.csproj", "{6B675815-FEE2-49D0-BAF9-84ECD5116FF9}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Stub", "..\Stub\Stub.csproj", "{434D7C7C-2B01-44AA-8619-28D65657C47A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DataContractPersistance", "..\DataContractPersistance\DataContractPersistance.csproj", "{49C8C786-B3A1-48FE-A120-E5209A441320}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{1946288E-37BA-420F-89BD-A1C3D4178344}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1946288E-37BA-420F-89BD-A1C3D4178344}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1946288E-37BA-420F-89BD-A1C3D4178344}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{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
{6B675815-FEE2-49D0-BAF9-84ECD5116FF9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6B675815-FEE2-49D0-BAF9-84ECD5116FF9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6B675815-FEE2-49D0-BAF9-84ECD5116FF9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6B675815-FEE2-49D0-BAF9-84ECD5116FF9}.Release|Any CPU.Build.0 = Release|Any CPU
{434D7C7C-2B01-44AA-8619-28D65657C47A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{434D7C7C-2B01-44AA-8619-28D65657C47A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{434D7C7C-2B01-44AA-8619-28D65657C47A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{434D7C7C-2B01-44AA-8619-28D65657C47A}.Release|Any CPU.Build.0 = Release|Any CPU
{49C8C786-B3A1-48FE-A120-E5209A441320}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{49C8C786-B3A1-48FE-A120-E5209A441320}.Debug|Any CPU.Build.0 = Debug|Any CPU
{49C8C786-B3A1-48FE-A120-E5209A441320}.Release|Any CPU.ActiveCfg = Release|Any CPU
{49C8C786-B3A1-48FE-A120-E5209A441320}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {61F7FB11-1E47-470C-91E2-47F8143E1572}
EndGlobalSection
EndGlobal

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 265 B

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save