diff --git a/.drone.yml b/.drone.yml
index c3131b8..2e2b85c 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -1,6 +1,6 @@
kind: pipeline
type: docker
-name: CI_CONSECO
+name: CI_CONSECO_MAUI
trigger :
event:
@@ -10,27 +10,29 @@ steps:
- name: build
image: mcr.microsoft.com/dotnet/sdk:6.0
commands:
- - cd Code
- - dotnet restore CI_CONSECO.sln
- - dotnet build CI_CONSECO.sln -c Release --no-restore
- - dotnet publish CI_CONSECO.sln -c Release --no-restore -o CI_PROJECT_DIR/build/release
+ - cd Sources
+ - dotnet workload restore
+ - dotnet restore CI_MAUI.sln
+ - dotnet build CI_MAUI.sln -c Release --no-restore
+ - dotnet publish CI_MAUI.sln -c Release --no-restore -o CI_PROJECT_DIR/build/release
- name: tests
image: mcr.microsoft.com/dotnet/sdk:6.0
commands:
- - cd Code
- - dotnet restore CI_CONSECO.sln
- - dotnet test CI_CONSECO.sln --no-restore
+ - cd Sources
+ - dotnet restore CI_MAUI.sln
+ - dotnet test CI_MAUI.sln --no-restore
depends_on: [build]
- name: code-analysis
image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dronesonarplugin-dotnet6
commands:
- - cd Code/
- - dotnet restore CI_CONSECO.sln
- - dotnet sonarscanner begin /k:ConsEco /d:sonar.host.url=$${PLUGIN_SONAR_HOST} /d:sonar.coverageReportPaths="coveragereport/SonarQube.xml" /d:sonar.coverage.exclusions="Tests/**" /d:sonar.login=$${PLUGIN_SONAR_TOKEN}
- - dotnet build CI_CONSECO.sln -c Release --no-restore
- - dotnet test CI_CONSECO.sln --logger trx --no-restore /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura --collect "XPlat Code Coverage"
+ - cd Sources/
+ - dotnet workload restore
+ - dotnet restore CI_MAUI.sln
+ - dotnet sonarscanner begin /k:ConsEcoMAUI /d:sonar.host.url=$${PLUGIN_SONAR_HOST} /d:sonar.coverageReportPaths="coveragereport/SonarQube.xml" /d:sonar.coverage.exclusions="Tests/**" /d:sonar.login=$${PLUGIN_SONAR_TOKEN}
+ - dotnet build CI_MAUI.sln -c Release --no-restore
+ - dotnet test CI_MAUI.sln --logger trx --no-restore /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura --collect "XPlat Code Coverage"
- reportgenerator -reports:"**/coverage.cobertura.xml" -reporttypes:SonarQube -targetdir:"coveragereport"
- - dotnet publish CI_CONSECO.sln -c Release --no-restore -o CI_PROJECT_DIR/build/release
+ - dotnet publish CI_MAUI.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:
@@ -39,4 +41,14 @@ steps:
# accessible en ligne de commande par ${PLUGIN_SONAR_TOKEN}
sonar_token:
from_secret: SECRET_SONAR_LOGIN
- depends_on: [tests]
\ No newline at end of file
+ depends_on: [tests]
+ # database container deployment
+ - name: deploy-container-mysql
+ image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dockerproxy-clientdrone:latest
+ environment:
+ IMAGENAME: postgres
+ CONTAINERNAME: mysql
+ COMMAND: create
+ PRIVATE: true
+ POSTGRES_PASSWORD: oui
+
\ No newline at end of file
diff --git a/Code/.gitignore b/Code/.gitignore
deleted file mode 100644
index ca1c7a3..0000000
--- a/Code/.gitignore
+++ /dev/null
@@ -1,400 +0,0 @@
-# ---> VisualStudio
-## Ignore Visual Studio temporary files, build results, and
-## files generated by popular Visual Studio add-ons.
-##
-## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore
-
-# User-specific files
-*.rsuser
-*.suo
-*.user
-*.userosscache
-*.sln.docstates
-
-# User-specific files (MonoDevelop/Xamarin Studio)
-*.userprefs
-
-# Mono auto generated files
-mono_crash.*
-
-# Build results
-[Dd]ebug/
-[Dd]ebugPublic/
-[Rr]elease/
-[Rr]eleases/
-x64/
-x86/
-[Ww][Ii][Nn]32/
-[Aa][Rr][Mm]/
-[Aa][Rr][Mm]64/
-bld/
-[Bb]in/
-[Oo]bj/
-[Ll]og/
-[Ll]ogs/
-
-# Visual Studio 2015/2017 cache/options directory
-.vs/
-# Uncomment if you have tasks that create the project's static files in wwwroot
-#wwwroot/
-
-# Visual Studio 2017 auto generated files
-Generated\ Files/
-
-# MSTest test Results
-[Tt]est[Rr]esult*/
-[Bb]uild[Ll]og.*
-
-# NUnit
-*.VisualState.xml
-TestResult.xml
-nunit-*.xml
-
-# Build Results of an ATL Project
-[Dd]ebugPS/
-[Rr]eleasePS/
-dlldata.c
-
-# Benchmark Results
-BenchmarkDotNet.Artifacts/
-
-# .NET Core
-project.lock.json
-project.fragment.lock.json
-artifacts/
-
-# ASP.NET Scaffolding
-ScaffoldingReadMe.txt
-
-# StyleCop
-StyleCopReport.xml
-
-# Files built by Visual Studio
-*_i.c
-*_p.c
-*_h.h
-*.ilk
-*.meta
-*.obj
-*.iobj
-*.pch
-*.pdb
-*.ipdb
-*.pgc
-*.pgd
-*.rsp
-*.sbr
-*.tlb
-*.tli
-*.tlh
-*.tmp
-*.tmp_proj
-*_wpftmp.csproj
-*.log
-*.tlog
-*.vspscc
-*.vssscc
-.builds
-*.pidb
-*.svclog
-*.scc
-
-# Chutzpah Test files
-_Chutzpah*
-
-# Visual C++ cache files
-ipch/
-*.aps
-*.ncb
-*.opendb
-*.opensdf
-*.sdf
-*.cachefile
-*.VC.db
-*.VC.VC.opendb
-
-# Visual Studio profiler
-*.psess
-*.vsp
-*.vspx
-*.sap
-
-# Visual Studio Trace Files
-*.e2e
-
-# TFS 2012 Local Workspace
-$tf/
-
-# Guidance Automation Toolkit
-*.gpState
-
-# ReSharper is a .NET coding add-in
-_ReSharper*/
-*.[Rr]e[Ss]harper
-*.DotSettings.user
-
-# TeamCity is a build add-in
-_TeamCity*
-
-# DotCover is a Code Coverage Tool
-*.dotCover
-
-# AxoCover is a Code Coverage Tool
-.axoCover/*
-!.axoCover/settings.json
-
-# Coverlet is a free, cross platform Code Coverage Tool
-coverage*.json
-coverage*.xml
-coverage*.info
-
-# Visual Studio code coverage results
-*.coverage
-*.coveragexml
-
-# NCrunch
-_NCrunch_*
-.*crunch*.local.xml
-nCrunchTemp_*
-
-# MightyMoose
-*.mm.*
-AutoTest.Net/
-
-# Web workbench (sass)
-.sass-cache/
-
-# Installshield output folder
-[Ee]xpress/
-
-# DocProject is a documentation generator add-in
-DocProject/buildhelp/
-DocProject/Help/*.HxT
-DocProject/Help/*.HxC
-DocProject/Help/*.hhc
-DocProject/Help/*.hhk
-DocProject/Help/*.hhp
-DocProject/Help/Html2
-DocProject/Help/html
-
-# Click-Once directory
-publish/
-
-# Publish Web Output
-*.[Pp]ublish.xml
-*.azurePubxml
-# Note: Comment the next line if you want to checkin your web deploy settings,
-# but database connection strings (with potential passwords) will be unencrypted
-*.pubxml
-*.publishproj
-
-# Microsoft Azure Web App publish settings. Comment the next line if you want to
-# checkin your Azure Web App publish settings, but sensitive information contained
-# in these scripts will be unencrypted
-PublishScripts/
-
-# NuGet Packages
-*.nupkg
-# NuGet Symbol Packages
-*.snupkg
-# The packages folder can be ignored because of Package Restore
-**/[Pp]ackages/*
-# except build/, which is used as an MSBuild target.
-!**/[Pp]ackages/build/
-# Uncomment if necessary however generally it will be regenerated when needed
-#!**/[Pp]ackages/repositories.config
-# NuGet v3's project.json files produces more ignorable files
-*.nuget.props
-*.nuget.targets
-
-# Microsoft Azure Build Output
-csx/
-*.build.csdef
-
-# Microsoft Azure Emulator
-ecf/
-rcf/
-
-# Windows Store app package directories and files
-AppPackages/
-BundleArtifacts/
-Package.StoreAssociation.xml
-_pkginfo.txt
-*.appx
-*.appxbundle
-*.appxupload
-
-# Visual Studio cache files
-# files ending in .cache can be ignored
-*.[Cc]ache
-# but keep track of directories ending in .cache
-!?*.[Cc]ache/
-
-# Others
-ClientBin/
-~$*
-*~
-*.dbmdl
-*.dbproj.schemaview
-*.jfm
-*.pfx
-*.publishsettings
-orleans.codegen.cs
-
-# Including strong name files can present a security risk
-# (https://github.com/github/gitignore/pull/2483#issue-259490424)
-#*.snk
-
-# Since there are multiple workflows, uncomment next line to ignore bower_components
-# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
-#bower_components/
-
-# RIA/Silverlight projects
-Generated_Code/
-
-# Backup & report files from converting an old project file
-# to a newer Visual Studio version. Backup files are not needed,
-# because we have git ;-)
-_UpgradeReport_Files/
-Backup*/
-UpgradeLog*.XML
-UpgradeLog*.htm
-ServiceFabricBackup/
-*.rptproj.bak
-
-# SQL Server files
-*.mdf
-*.ldf
-*.ndf
-
-# Business Intelligence projects
-*.rdl.data
-*.bim.layout
-*.bim_*.settings
-*.rptproj.rsuser
-*- [Bb]ackup.rdl
-*- [Bb]ackup ([0-9]).rdl
-*- [Bb]ackup ([0-9][0-9]).rdl
-
-# Microsoft Fakes
-FakesAssemblies/
-
-# GhostDoc plugin setting file
-*.GhostDoc.xml
-
-# Node.js Tools for Visual Studio
-.ntvs_analysis.dat
-node_modules/
-
-# Visual Studio 6 build log
-*.plg
-
-# Visual Studio 6 workspace options file
-*.opt
-
-# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
-*.vbw
-
-# Visual Studio 6 auto-generated project file (contains which files were open etc.)
-*.vbp
-
-# Visual Studio 6 workspace and project file (working project files containing files to include in project)
-*.dsw
-*.dsp
-
-# Visual Studio 6 technical files
-*.ncb
-*.aps
-
-# Visual Studio LightSwitch build output
-**/*.HTMLClient/GeneratedArtifacts
-**/*.DesktopClient/GeneratedArtifacts
-**/*.DesktopClient/ModelManifest.xml
-**/*.Server/GeneratedArtifacts
-**/*.Server/ModelManifest.xml
-_Pvt_Extensions
-
-# Paket dependency manager
-.paket/paket.exe
-paket-files/
-
-# FAKE - F# Make
-.fake/
-
-# CodeRush personal settings
-.cr/personal
-
-# Python Tools for Visual Studio (PTVS)
-__pycache__/
-*.pyc
-
-# Cake - Uncomment if you are using it
-# tools/**
-# !tools/packages.config
-
-# Tabs Studio
-*.tss
-
-# Telerik's JustMock configuration file
-*.jmconfig
-
-# BizTalk build output
-*.btp.cs
-*.btm.cs
-*.odx.cs
-*.xsd.cs
-
-# OpenCover UI analysis results
-OpenCover/
-
-# Azure Stream Analytics local run output
-ASALocalRun/
-
-# MSBuild Binary and Structured Log
-*.binlog
-
-# NVidia Nsight GPU debugger configuration file
-*.nvuser
-
-# MFractors (Xamarin productivity tool) working folder
-.mfractor/
-
-# Local History for Visual Studio
-.localhistory/
-
-# Visual Studio History (VSHistory) files
-.vshistory/
-
-# BeatPulse healthcheck temp database
-healthchecksdb
-
-# Backup folder for Package Reference Convert tool in Visual Studio 2017
-MigrationBackup/
-
-# Ionide (cross platform F# VS Code tools) working folder
-.ionide/
-
-# Fody - auto-generated XML schema
-FodyWeavers.xsd
-
-# VS Code files for those working on multiple tools
-.vscode/*
-!.vscode/settings.json
-!.vscode/tasks.json
-!.vscode/launch.json
-!.vscode/extensions.json
-*.code-workspace
-
-# Local History for Visual Studio Code
-.history/
-
-# Windows Installer files from build outputs
-*.cab
-*.msi
-*.msix
-*.msm
-*.msp
-
-# JetBrains Rider
-*.sln.iml
-
diff --git a/Code/CI_CONSECO.sln b/Code/CI_CONSECO.sln
deleted file mode 100644
index 90db61c..0000000
--- a/Code/CI_CONSECO.sln
+++ /dev/null
@@ -1,37 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 17
-VisualStudioVersion = 17.2.32616.157
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Model", "Model\Model.csproj", "{ACFA83F8-98C8-43AE-9328-B3F751098FFA}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestFonctionnel", "TestFonctionnel\TestFonctionnel.csproj", "{7AC4F84F-1124-4EC1-BF38-17F3F4FBEB3E}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestsUnitaires", "TestsUnitaires\TestsUnitaires.csproj", "{B1AE713C-B5DE-4E81-A33F-818AAD0548A7}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {ACFA83F8-98C8-43AE-9328-B3F751098FFA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {ACFA83F8-98C8-43AE-9328-B3F751098FFA}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {ACFA83F8-98C8-43AE-9328-B3F751098FFA}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {ACFA83F8-98C8-43AE-9328-B3F751098FFA}.Release|Any CPU.Build.0 = Release|Any CPU
- {7AC4F84F-1124-4EC1-BF38-17F3F4FBEB3E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {7AC4F84F-1124-4EC1-BF38-17F3F4FBEB3E}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {7AC4F84F-1124-4EC1-BF38-17F3F4FBEB3E}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {7AC4F84F-1124-4EC1-BF38-17F3F4FBEB3E}.Release|Any CPU.Build.0 = Release|Any CPU
- {B1AE713C-B5DE-4E81-A33F-818AAD0548A7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {B1AE713C-B5DE-4E81-A33F-818AAD0548A7}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {B1AE713C-B5DE-4E81-A33F-818AAD0548A7}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {B1AE713C-B5DE-4E81-A33F-818AAD0548A7}.Release|Any CPU.Build.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- SolutionGuid = {997F299E-EAB1-4F11-AC37-BCC0B7D63CA4}
- EndGlobalSection
-EndGlobal
diff --git a/Code/ConsEco.sln b/Code/ConsEco.sln
deleted file mode 100644
index ad4e961..0000000
--- a/Code/ConsEco.sln
+++ /dev/null
@@ -1,43 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 17
-VisualStudioVersion = 17.2.32616.157
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IHM", "IHM\IHM.csproj", "{355FC972-9C0D-4CBD-8003-EFBDACA7CFFF}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Model", "Model\Model.csproj", "{ACFA83F8-98C8-43AE-9328-B3F751098FFA}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestFonctionnel", "TestFonctionnel\TestFonctionnel.csproj", "{7AC4F84F-1124-4EC1-BF38-17F3F4FBEB3E}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestsUnitaires", "TestsUnitaires\TestsUnitaires.csproj", "{B1AE713C-B5DE-4E81-A33F-818AAD0548A7}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {355FC972-9C0D-4CBD-8003-EFBDACA7CFFF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {355FC972-9C0D-4CBD-8003-EFBDACA7CFFF}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {355FC972-9C0D-4CBD-8003-EFBDACA7CFFF}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {355FC972-9C0D-4CBD-8003-EFBDACA7CFFF}.Release|Any CPU.Build.0 = Release|Any CPU
- {ACFA83F8-98C8-43AE-9328-B3F751098FFA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {ACFA83F8-98C8-43AE-9328-B3F751098FFA}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {ACFA83F8-98C8-43AE-9328-B3F751098FFA}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {ACFA83F8-98C8-43AE-9328-B3F751098FFA}.Release|Any CPU.Build.0 = Release|Any CPU
- {7AC4F84F-1124-4EC1-BF38-17F3F4FBEB3E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {7AC4F84F-1124-4EC1-BF38-17F3F4FBEB3E}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {7AC4F84F-1124-4EC1-BF38-17F3F4FBEB3E}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {7AC4F84F-1124-4EC1-BF38-17F3F4FBEB3E}.Release|Any CPU.Build.0 = Release|Any CPU
- {B1AE713C-B5DE-4E81-A33F-818AAD0548A7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {B1AE713C-B5DE-4E81-A33F-818AAD0548A7}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {B1AE713C-B5DE-4E81-A33F-818AAD0548A7}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {B1AE713C-B5DE-4E81-A33F-818AAD0548A7}.Release|Any CPU.Build.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- SolutionGuid = {997F299E-EAB1-4F11-AC37-BCC0B7D63CA4}
- EndGlobalSection
-EndGlobal
diff --git a/Code/IHM/App.xaml b/Code/IHM/App.xaml
deleted file mode 100644
index 8ff84b3..0000000
--- a/Code/IHM/App.xaml
+++ /dev/null
@@ -1,165 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Code/IHM/App.xaml.cs b/Code/IHM/App.xaml.cs
deleted file mode 100644
index ec2e22c..0000000
--- a/Code/IHM/App.xaml.cs
+++ /dev/null
@@ -1,22 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Configuration;
-using System.Data;
-using System.Linq;
-using System.Threading.Tasks;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Media;
-
-namespace IHM
-{
- ///
- /// Interaction logic for App.xaml
- ///
- public partial class App : Application
- {
- public Navigator Navigator { get; private set; } = new Navigator();
-
-
- }
-}
diff --git a/Code/IHM/AssemblyInfo.cs b/Code/IHM/AssemblyInfo.cs
deleted file mode 100644
index 74087a1..0000000
--- a/Code/IHM/AssemblyInfo.cs
+++ /dev/null
@@ -1,10 +0,0 @@
-using System.Windows;
-
-[assembly: ThemeInfo(
- ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
- //(used if a resource is not found in the page,
- // or application resource dictionaries)
- ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
- //(used if a resource is not found in the page,
- // app, or any theme specific resource dictionaries)
-)]
diff --git a/Code/IHM/Converters/Func2WindowPartConverter.cs b/Code/IHM/Converters/Func2WindowPartConverter.cs
deleted file mode 100644
index d825da7..0000000
--- a/Code/IHM/Converters/Func2WindowPartConverter.cs
+++ /dev/null
@@ -1,28 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Globalization;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows.Controls;
-using System.Windows.Data;
-
-namespace IHM.Converters
-{
- public class Func2WindowPartConverter : IValueConverter
- {
- public object? Convert(object value, Type targetType, object parameter, CultureInfo culture)
- {
- Func? windowPartCreator = value as Func;
- if (windowPartCreator == null)
- {
- return null;
- }
- return windowPartCreator();
- }
- public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
- {
- throw new NotImplementedException();
- }
- }
-}
diff --git a/Code/IHM/IHM.csproj b/Code/IHM/IHM.csproj
deleted file mode 100644
index 7e1d10d..0000000
--- a/Code/IHM/IHM.csproj
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
- WinExe
- net6.0-windows
- enable
- true
-
-
-
-
-
-
-
-
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
-
-
diff --git a/Code/IHM/MainWindow.xaml b/Code/IHM/MainWindow.xaml
deleted file mode 100644
index 3eb358b..0000000
--- a/Code/IHM/MainWindow.xaml
+++ /dev/null
@@ -1,38 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Code/IHM/MainWindow.xaml.cs b/Code/IHM/MainWindow.xaml.cs
deleted file mode 100644
index a6edc37..0000000
--- a/Code/IHM/MainWindow.xaml.cs
+++ /dev/null
@@ -1,128 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Windows.Navigation;
-using System.Windows.Shapes;
-
-namespace IHM
-{
- ///
- /// Interaction logic for MainWindow.xaml
- ///
- public partial class MainWindow : Window
- {
- public Navigator Nav => (App.Current as App).Navigator;
- public MainWindow()
- {
- InitializeComponent();
- DataContext = this;
- }
-
- public void ChangerStyleBtn(Button btn)
- {
-
- StackPanel sp = (StackPanel)btn.Parent;
- if (sp == null) return;
- UIElementCollection UIEC = sp.Children;
- if (UIEC == null) return;
- foreach (UIElement obj in UIEC)
- {
-
- if (obj as Button != null)
- {
- (obj as Button).IsDefault = false;
- }
-
- }
- btn.IsDefault = true;
- }
-
- private void Button_Click_TableauDeBord(object sender, RoutedEventArgs e)
- {
-
- Button btn = (Button)sender;
- if (btn == null) return;
- if (btn.IsDefault == false)
- {
- Nav.NavigateTo(Navigator.PART_TABLEAU_DE_BORD);
- ChangerStyleBtn(btn);
-
-
- }
- else return;
-
- }
-
- private void Button_Click_Compte(object sender, RoutedEventArgs e)
- {
-
- Button btn = (Button)sender;
- if (btn == null) return;
- if (btn.IsDefault == false)
- {
-
- Nav.NavigateTo(Navigator.PART_COMPTE);
- ChangerStyleBtn(btn);
-
- }
- else return;
-
- }
-
- private void Button_Click_Operation(object sender, RoutedEventArgs e)
- {
- Button btn = (Button)sender;
- if (btn == null) return;
- if (btn.IsDefault == false)
- {
-
- Nav.NavigateTo(Navigator.PART_OPERATION);
- ChangerStyleBtn(btn);
-
- }
- else return;
-
- }
-
- private void Button_Click_Echeancier(object sender, RoutedEventArgs e)
- {
- Button btn = (Button)sender;
- if (btn == null) return;
- if (btn.IsDefault == false)
- {
-
- Nav.NavigateTo(Navigator.PART_ECHEANCIER);
- ChangerStyleBtn(btn);
-
- }
- else return;
-
- }
-
- private void Button_Click_Planification(object sender, RoutedEventArgs e)
- {
- Button btn = (Button)sender;
- if (btn == null) return;
- if (btn.IsDefault == false)
- {
-
- Nav.NavigateTo(Navigator.PART_PLANIFICATION);
- ChangerStyleBtn(btn);
-
- }
- else return;
- }
-
-
- }
-}
diff --git a/Code/IHM/Navigator.cs b/Code/IHM/Navigator.cs
deleted file mode 100644
index 0daa481..0000000
--- a/Code/IHM/Navigator.cs
+++ /dev/null
@@ -1,103 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel;
-using System.Linq;
-using System.Runtime.CompilerServices;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows.Controls;
-
-namespace IHM
-{
- public class Navigator : INotifyPropertyChanged
- {
- public const string PART_MAIN = "Main";
- public const string PART_CONNEXION = "Connexion";
- public const string PART_INSCRIPTION = "Inscription";
-
- public const string PART_TABLEAU_DE_BORD = "Tableau de Bord";
-
- public const string PART_COMPTE = "Compte";
- public const string PART_AJOUTER_BANQUE = "Ajouter une banque";
- public const string PART_SUPPRIMER_BANQUE = "Supprimer une banque";
- public const string PART_AJOUTER_COMPTE = "Ajouter une compte";
- public const string PART_SUPPRIMER_COMPTE = "Supprimer un compte";
- public const string PART_MODIFSOLDE = "ModifSolde";
-
- public const string PART_OPERATION = "Opération";
-
- public const string PART_ECHEANCIER = "Echéancier";
- public const string PART_AJOUTER_ECHEANCE = "Enregistrer une échéance";
- public const string PART_SUPPRIMER_ECHEANCE = "Supprimer une échéance";
-
- public const string PART_PLANIFICATION = "Planification";
- public const string PART_AJOUTER_PLANIFICATION = "Ajouter une planification";
- public const string PART_SUPPRIMER_PLANIFICATION = "Supprimer une planification";
-
- public const string PART_EFFECTUER_CREDIT = "Effectuer un crédit";
- public const string PART_EFFECTUER_DEBIT = "Effectuer un débit";
- public const string PART_RETIRER_OPERATION = "Retirer une opération";
- public const string PART_SUPPRIMER_OPERATION = "Supprimer une opération";
-
- public ReadOnlyDictionary> WindowPart { get; private set; }
-
- Dictionary> windowPart { get; set; } = new Dictionary>
- {
- [PART_MAIN] = () => new UCBienvenue(),
- [PART_CONNEXION] = () => new UCConnexion(),
- [PART_COMPTE] = () => new UCCompte(),
- [PART_OPERATION] = () => new UCOperation(),
- [PART_ECHEANCIER] = () => new UCEcheancier(),
- [PART_PLANIFICATION] = () => new UCPlanification(),
- [PART_INSCRIPTION] = () => new UCInscription(),
- [PART_MODIFSOLDE] = () => new UCModifSolde(),
- [PART_AJOUTER_BANQUE] = () => new UCAjouterBanque(),
- [PART_SUPPRIMER_BANQUE] = () => new UCSupprimerBanque(),
- [PART_AJOUTER_COMPTE] = () => new UCAjouterCompte(),
- [PART_SUPPRIMER_COMPTE] = () => new UCSupprimerCompte(),
- [PART_AJOUTER_ECHEANCE] = () => new UCAjouterEcheance(),
- [PART_SUPPRIMER_ECHEANCE] = () => new UCSupprimerEcheance(),
- [PART_AJOUTER_PLANIFICATION] = () => new UCAjouterPlanification(),
- [PART_SUPPRIMER_PLANIFICATION] = () => new UCSupprimerPlanification(),
- [PART_TABLEAU_DE_BORD] = () => new UCTableauDeBord(),
- [PART_EFFECTUER_CREDIT] = () => new UCEffectuerCredit(),
- [PART_EFFECTUER_DEBIT] = () => new UCEffectuerCredit(),
- [PART_RETIRER_OPERATION] = () => new UCEffectuerCredit(),
- [PART_SUPPRIMER_OPERATION] = () => new UCEffectuerCredit()
- };
-
-
- public Navigator()
- {
- WindowPart = new ReadOnlyDictionary>(windowPart);
-
- SelectedUserControlCreator = windowPart.First();
- }
-
- public KeyValuePair> SelectedUserControlCreator
- {
- get => selectedUserControlCreator;
- set
- {
- if (selectedUserControlCreator.Equals(value)) return;
- selectedUserControlCreator = value;
- OnPropertyChanged();
- }
- }
-
- private KeyValuePair> selectedUserControlCreator;
-
- public event PropertyChangedEventHandler? PropertyChanged;
- void OnPropertyChanged([CallerMemberName] string propertyName = "")
- => PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
-
- public void NavigateTo(string windowPartName)
- {
- if (WindowPart.ContainsKey(windowPartName))
- {
- SelectedUserControlCreator = WindowPart.Single(kvp => kvp.Key == windowPartName);
- }
- }
- }
-}
diff --git a/Code/IHM/UCAjouterBanque.xaml b/Code/IHM/UCAjouterBanque.xaml
deleted file mode 100644
index 4e47493..0000000
--- a/Code/IHM/UCAjouterBanque.xaml
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
-
-
diff --git a/Code/IHM/UCAjouterBanque.xaml.cs b/Code/IHM/UCAjouterBanque.xaml.cs
deleted file mode 100644
index ac52266..0000000
--- a/Code/IHM/UCAjouterBanque.xaml.cs
+++ /dev/null
@@ -1,34 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Windows.Navigation;
-using System.Windows.Shapes;
-
-namespace IHM
-{
- ///
- /// Logique d'interaction pour UCAjouterBanque.xaml
- ///
- public partial class UCAjouterBanque : UserControl
- {
- public Navigator Nav => (App.Current as App).Navigator;
- public UCAjouterBanque()
- {
- InitializeComponent();
- }
-
- private void Button_Click_Retour(object sender, RoutedEventArgs e)
- {
- Nav.NavigateTo(Navigator.PART_COMPTE);
- }
- }
-}
diff --git a/Code/IHM/UCAjouterCompte.xaml b/Code/IHM/UCAjouterCompte.xaml
deleted file mode 100644
index 4460ea8..0000000
--- a/Code/IHM/UCAjouterCompte.xaml
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
-
-
diff --git a/Code/IHM/UCAjouterCompte.xaml.cs b/Code/IHM/UCAjouterCompte.xaml.cs
deleted file mode 100644
index e8ed547..0000000
--- a/Code/IHM/UCAjouterCompte.xaml.cs
+++ /dev/null
@@ -1,35 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Windows.Navigation;
-using System.Windows.Shapes;
-
-namespace IHM
-{
- ///
- /// Logique d'interaction pour UCAjouterCompte.xaml
- ///
- public partial class UCAjouterCompte : UserControl
- {
- public Navigator Nav => (App.Current as App).Navigator;
-
- public UCAjouterCompte()
- {
- InitializeComponent();
- }
-
- private void Button_Click_Retour(object sender, RoutedEventArgs e)
- {
- Nav.NavigateTo(Navigator.PART_COMPTE);
- }
- }
-}
diff --git a/Code/IHM/UCAjouterEcheance.xaml b/Code/IHM/UCAjouterEcheance.xaml
deleted file mode 100644
index 5a61dc1..0000000
--- a/Code/IHM/UCAjouterEcheance.xaml
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
-
-
diff --git a/Code/IHM/UCAjouterEcheance.xaml.cs b/Code/IHM/UCAjouterEcheance.xaml.cs
deleted file mode 100644
index 449d1a6..0000000
--- a/Code/IHM/UCAjouterEcheance.xaml.cs
+++ /dev/null
@@ -1,35 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Windows.Navigation;
-using System.Windows.Shapes;
-
-namespace IHM
-{
- ///
- /// Logique d'interaction pour UCAjouterEcheance.xaml
- ///
- public partial class UCAjouterEcheance : UserControl
- {
- public Navigator Nav => (App.Current as App).Navigator;
-
- public UCAjouterEcheance()
- {
- InitializeComponent();
- }
-
- private void Button_Click_Retour(object sender, RoutedEventArgs e)
- {
- Nav.NavigateTo(Navigator.PART_ECHEANCIER);
- }
- }
-}
diff --git a/Code/IHM/UCAjouterPlanification.xaml b/Code/IHM/UCAjouterPlanification.xaml
deleted file mode 100644
index a29b4b9..0000000
--- a/Code/IHM/UCAjouterPlanification.xaml
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
-
-
diff --git a/Code/IHM/UCAjouterPlanification.xaml.cs b/Code/IHM/UCAjouterPlanification.xaml.cs
deleted file mode 100644
index 8aada78..0000000
--- a/Code/IHM/UCAjouterPlanification.xaml.cs
+++ /dev/null
@@ -1,35 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Windows.Navigation;
-using System.Windows.Shapes;
-
-namespace IHM
-{
- ///
- /// Logique d'interaction pour UCAjouterPlanification.xaml
- ///
- public partial class UCAjouterPlanification : UserControl
- {
- public Navigator Nav => (App.Current as App).Navigator;
-
- public UCAjouterPlanification()
- {
- InitializeComponent();
- }
-
- private void Button_Click_Retour(object sender, RoutedEventArgs e)
- {
- Nav.NavigateTo(Navigator.PART_PLANIFICATION);
- }
- }
-}
diff --git a/Code/IHM/UCBienvenue.xaml b/Code/IHM/UCBienvenue.xaml
deleted file mode 100644
index 9fa2dad..0000000
--- a/Code/IHM/UCBienvenue.xaml
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
- Bienvenue sur Cons'Eco
-
-
-
- La première application d'aide à la gestion de budget personnel ou en entreprise
-
-
-
-
-
-
-
-
-
- Vous pouvez créer un compte
-
-
-
-
-
- Ou vous connecter si vous en possédée déjà un
-
-
-
-
-
-
diff --git a/Code/IHM/UCBienvenue.xaml.cs b/Code/IHM/UCBienvenue.xaml.cs
deleted file mode 100644
index 939e30a..0000000
--- a/Code/IHM/UCBienvenue.xaml.cs
+++ /dev/null
@@ -1,40 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Windows.Navigation;
-using System.Windows.Shapes;
-
-namespace IHM
-{
- ///
- /// Logique d'interaction pour UCBienvenue.xaml
- ///
- public partial class UCBienvenue : UserControl
- {
- public Navigator Nav => (App.Current as App).Navigator;
- public UCBienvenue()
- {
- InitializeComponent();
- DataContext = this;
- }
-
- private void Button_Click_Inscription(object sender, RoutedEventArgs e)
- {
- Nav.NavigateTo(Navigator.PART_INSCRIPTION);
- }
-
- private void Button_Click_Connexion(object sender, RoutedEventArgs e)
- {
- Nav.NavigateTo(Navigator.PART_CONNEXION);
- }
- }
-}
diff --git a/Code/IHM/UCCompte.xaml b/Code/IHM/UCCompte.xaml
deleted file mode 100644
index d670437..0000000
--- a/Code/IHM/UCCompte.xaml
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
-
-
-
- Compte
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Code/IHM/UCCompte.xaml.cs b/Code/IHM/UCCompte.xaml.cs
deleted file mode 100644
index 7364dfb..0000000
--- a/Code/IHM/UCCompte.xaml.cs
+++ /dev/null
@@ -1,52 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Windows.Navigation;
-using System.Windows.Shapes;
-
-namespace IHM
-{
-
- public partial class UCCompte : UserControl
- {
- public Navigator Nav => (App.Current as App).Navigator;
- public UCCompte()
- {
- InitializeComponent();
- }
- private void Button_Click_ModifSolde(object sender, RoutedEventArgs e)
- {
- Nav.NavigateTo(Navigator.PART_MODIFSOLDE);
- }
-
- private void Button_Click_Ajouter_Banque(object sender, RoutedEventArgs e)
- {
- Nav.NavigateTo(Navigator.PART_AJOUTER_BANQUE);
- }
-
- private void Button_Click_Supprimer_Banque(object sender, RoutedEventArgs e)
- {
- Nav.NavigateTo(Navigator.PART_SUPPRIMER_BANQUE);
- }
-
- private void Button_Click_Ajouter_Compte(object sender, RoutedEventArgs e)
- {
- Nav.NavigateTo(Navigator.PART_AJOUTER_COMPTE);
- }
-
- private void Button_Click_Supprimer_Compte(object sender, RoutedEventArgs e)
- {
- Nav.NavigateTo(Navigator.PART_SUPPRIMER_COMPTE);
- }
- }
-
-}
diff --git a/Code/IHM/UCConnexion.xaml b/Code/IHM/UCConnexion.xaml
deleted file mode 100644
index fec8188..0000000
--- a/Code/IHM/UCConnexion.xaml
+++ /dev/null
@@ -1,71 +0,0 @@
-
-
-
- Connexion
- Connectez vous à un compte déjà existant
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Nom d'utilisateur
-
- Veuillez renseigner votre nom d'utilisateurs
-
-
-
-
-
-
-
-
-
-
- Mot de passe
-
-
- Veuillez renseigner votre mot de passe
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Code/IHM/UCConnexion.xaml.cs b/Code/IHM/UCConnexion.xaml.cs
deleted file mode 100644
index 1b8f659..0000000
--- a/Code/IHM/UCConnexion.xaml.cs
+++ /dev/null
@@ -1,58 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Windows.Navigation;
-using System.Windows.Shapes;
-
-namespace IHM
-{
- ///
- /// Logique d'interaction pour UCConnexion.xaml
- ///
- public partial class UCConnexion : UserControl
- {
- public Navigator Nav => (App.Current as App).Navigator;
- public UCConnexion()
- {
- InitializeComponent();
- }
-
- private void Button_Click_Acceuil(object sender, RoutedEventArgs e)
- {
- Nav.NavigateTo(Navigator.PART_MAIN);
- }
-
- private void Button_Click_Connection(object sender, RoutedEventArgs e)
- {
- ErrorPassword.Visibility = Visibility.Hidden;
- Password.Background = new SolidColorBrush(Colors.White);
- ErrorUserName.Visibility = Visibility.Hidden;
- UserName.Background = new SolidColorBrush(Colors.White);
- if (UserName.Text.ToString() == "")
- {
- ErrorUserName.Visibility = Visibility.Visible;
- UserName.Background = new BrushConverter().ConvertFromString("#FF6347") as SolidColorBrush;
- }
- if (Password.Password.ToString() == "")
- {
- ErrorPassword.Visibility = Visibility.Visible;
- Password.Background = new BrushConverter().ConvertFromString("#FF6347") as SolidColorBrush;
- }
- }
-
- private void Button_Click_Forget_Password(object sender, RoutedEventArgs e)
- {
- // TO DO
- }
-
- }
-}
diff --git a/Code/IHM/UCEcheancier.xaml b/Code/IHM/UCEcheancier.xaml
deleted file mode 100644
index 655e587..0000000
--- a/Code/IHM/UCEcheancier.xaml
+++ /dev/null
@@ -1,43 +0,0 @@
-
-
- Echeancier
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Code/IHM/UCEcheancier.xaml.cs b/Code/IHM/UCEcheancier.xaml.cs
deleted file mode 100644
index 0a7d142..0000000
--- a/Code/IHM/UCEcheancier.xaml.cs
+++ /dev/null
@@ -1,40 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Windows.Navigation;
-using System.Windows.Shapes;
-
-namespace IHM
-{
- ///
- /// Logique d'interaction pour UCEcheancier.xaml
- ///
- public partial class UCEcheancier : UserControl
- {
- public Navigator Nav => (App.Current as App).Navigator;
-
- public UCEcheancier()
- {
- InitializeComponent();
- }
-
- private void Button_Click_Ajouter_Echeance(object sender, RoutedEventArgs e)
- {
- Nav.NavigateTo(Navigator.PART_AJOUTER_ECHEANCE);
- }
-
- private void Button_Click_Supprimer_Echeance(object sender, RoutedEventArgs e)
- {
- Nav.NavigateTo(Navigator.PART_SUPPRIMER_ECHEANCE);
- }
- }
-}
diff --git a/Code/IHM/UCEffectuerCredit.xaml b/Code/IHM/UCEffectuerCredit.xaml
deleted file mode 100644
index d920541..0000000
--- a/Code/IHM/UCEffectuerCredit.xaml
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
-
-
diff --git a/Code/IHM/UCEffectuerCredit.xaml.cs b/Code/IHM/UCEffectuerCredit.xaml.cs
deleted file mode 100644
index 537cf8b..0000000
--- a/Code/IHM/UCEffectuerCredit.xaml.cs
+++ /dev/null
@@ -1,34 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Windows.Navigation;
-using System.Windows.Shapes;
-
-namespace IHM
-{
- ///
- /// Logique d'interaction pour UserControl1.xaml
- ///
- public partial class UCEffectuerCredit : UserControl
- {
- public Navigator Nav => (App.Current as App).Navigator;
-
- public UCEffectuerCredit()
- {
- InitializeComponent();
- }
- private void Button_Click_Retour(object sender, RoutedEventArgs e)
- {
- Nav.NavigateTo(Navigator.PART_OPERATION);
- }
- }
-}
diff --git a/Code/IHM/UCEffectuerDebit.xaml b/Code/IHM/UCEffectuerDebit.xaml
deleted file mode 100644
index eb98616..0000000
--- a/Code/IHM/UCEffectuerDebit.xaml
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
-
-
diff --git a/Code/IHM/UCEffectuerDebit.xaml.cs b/Code/IHM/UCEffectuerDebit.xaml.cs
deleted file mode 100644
index 80e7d5a..0000000
--- a/Code/IHM/UCEffectuerDebit.xaml.cs
+++ /dev/null
@@ -1,34 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Windows.Navigation;
-using System.Windows.Shapes;
-
-namespace IHM
-{
- ///
- /// Logique d'interaction pour UserControl1.xaml
- ///
- public partial class UCEffectuerDebit : UserControl
- {
- public Navigator Nav => (App.Current as App).Navigator;
-
- public UCEffectuerDebit()
- {
- InitializeComponent();
- }
- private void Button_Click_Retour(object sender, RoutedEventArgs e)
- {
- Nav.NavigateTo(Navigator.PART_OPERATION);
- }
- }
-}
diff --git a/Code/IHM/UCInscription.xaml b/Code/IHM/UCInscription.xaml
deleted file mode 100644
index 7cc2357..0000000
--- a/Code/IHM/UCInscription.xaml
+++ /dev/null
@@ -1,94 +0,0 @@
-
-
-
- Inscription
- Veuillez créer votre compte en retrant vos informations
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Code/IHM/UCInscription.xaml.cs b/Code/IHM/UCInscription.xaml.cs
deleted file mode 100644
index 73dee6c..0000000
--- a/Code/IHM/UCInscription.xaml.cs
+++ /dev/null
@@ -1,39 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Windows.Navigation;
-using System.Windows.Shapes;
-
-namespace IHM
-{
- ///
- /// Logique d'interaction pour UCInscription.xaml
- ///
- public partial class UCInscription : UserControl
- {
- public Navigator Nav => (App.Current as App).Navigator;
-
- public UCInscription()
- {
- InitializeComponent();
- }
- private void Button_Click_Acceuil(object sender, RoutedEventArgs e)
- {
- Nav.NavigateTo(Navigator.PART_MAIN);
- }
-
- private void Button_Click_Validation(object sender, RoutedEventArgs e)
- {
- // TO DO
- }
- }
-}
diff --git a/Code/IHM/UCModifSolde.xaml b/Code/IHM/UCModifSolde.xaml
deleted file mode 100644
index 24ad5c2..0000000
--- a/Code/IHM/UCModifSolde.xaml
+++ /dev/null
@@ -1,37 +0,0 @@
-
-
-
- Modification de votre solde
-
-
-
-
-
-
-
-
- Nouveau solde
-
-
-
-
-
-
-
-
-
-
diff --git a/Code/IHM/UCModifSolde.xaml.cs b/Code/IHM/UCModifSolde.xaml.cs
deleted file mode 100644
index f081079..0000000
--- a/Code/IHM/UCModifSolde.xaml.cs
+++ /dev/null
@@ -1,34 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Windows.Navigation;
-using System.Windows.Shapes;
-
-namespace IHM
-{
- ///
- /// Logique d'interaction pour Page1.xaml
- ///
- public partial class UCModifSolde : UserControl
- {
- public Navigator Nav => (App.Current as App).Navigator;
-
- public UCModifSolde()
- {
- InitializeComponent();
- }
- private void Button_Click_Compte(object sender, RoutedEventArgs e)
- {
- Nav.NavigateTo(Navigator.PART_COMPTE);
- }
- }
-}
diff --git a/Code/IHM/UCOperation.xaml b/Code/IHM/UCOperation.xaml
deleted file mode 100644
index 46f6016..0000000
--- a/Code/IHM/UCOperation.xaml
+++ /dev/null
@@ -1,46 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Code/IHM/UCOperation.xaml.cs b/Code/IHM/UCOperation.xaml.cs
deleted file mode 100644
index c712b51..0000000
--- a/Code/IHM/UCOperation.xaml.cs
+++ /dev/null
@@ -1,46 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Windows.Navigation;
-using System.Windows.Shapes;
-
-namespace IHM
-{
- ///
- /// Logique d'interaction pour UCOperation.xaml
- ///
- public partial class UCOperation : UserControl
- {
- public Navigator Nav => (App.Current as App).Navigator;
-
- public UCOperation()
- {
- InitializeComponent();
- }
- private void Button_Click_EffectuerCredit(object sender, RoutedEventArgs e)
- {
- Nav.NavigateTo(Navigator.PART_EFFECTUER_CREDIT);
- }
- private void Button_Click_EffectuerDebit(object sender, RoutedEventArgs e)
- {
- Nav.NavigateTo(Navigator.PART_EFFECTUER_DEBIT);
- }
- private void Button_Click_RetirerOperation(object sender, RoutedEventArgs e)
- {
- Nav.NavigateTo(Navigator.PART_RETIRER_OPERATION);
- }
- private void Button_Click_SupprimerOperation(object sender, RoutedEventArgs e)
- {
- Nav.NavigateTo(Navigator.PART_SUPPRIMER_OPERATION);
- }
- }
-}
diff --git a/Code/IHM/UCPlanification.xaml b/Code/IHM/UCPlanification.xaml
deleted file mode 100644
index 4579724..0000000
--- a/Code/IHM/UCPlanification.xaml
+++ /dev/null
@@ -1,50 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Code/IHM/UCPlanification.xaml.cs b/Code/IHM/UCPlanification.xaml.cs
deleted file mode 100644
index bd08468..0000000
--- a/Code/IHM/UCPlanification.xaml.cs
+++ /dev/null
@@ -1,40 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Windows.Navigation;
-using System.Windows.Shapes;
-
-namespace IHM
-{
- ///
- /// Logique d'interaction pour UCPlannification.xaml
- ///
- public partial class UCPlanification : UserControl
- {
- public Navigator Nav => (App.Current as App).Navigator;
-
- public UCPlanification()
- {
- InitializeComponent();
- }
-
- private void Button_Click_Ajouter_Planification(object sender, RoutedEventArgs e)
- {
- Nav.NavigateTo(Navigator.PART_AJOUTER_PLANIFICATION);
- }
-
- private void Button_Click_Supprimer_Planification(object sender, RoutedEventArgs e)
- {
- Nav.NavigateTo(Navigator.PART_SUPPRIMER_PLANIFICATION);
- }
- }
-}
diff --git a/Code/IHM/UCRetirerOperation.xaml b/Code/IHM/UCRetirerOperation.xaml
deleted file mode 100644
index d38f7a0..0000000
--- a/Code/IHM/UCRetirerOperation.xaml
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Code/IHM/UCRetirerOperation.xaml.cs b/Code/IHM/UCRetirerOperation.xaml.cs
deleted file mode 100644
index 13319a6..0000000
--- a/Code/IHM/UCRetirerOperation.xaml.cs
+++ /dev/null
@@ -1,34 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Windows.Navigation;
-using System.Windows.Shapes;
-
-namespace IHM
-{
- ///
- /// Logique d'interaction pour UserControl2.xaml
- ///
- public partial class UCRetirerOperation : UserControl
- {
- public Navigator Nav => (App.Current as App).Navigator;
-
- public UCRetirerOperation()
- {
- InitializeComponent();
- }
- private void Button_Click_Retour(object sender, RoutedEventArgs e)
- {
- Nav.NavigateTo(Navigator.PART_OPERATION);
- }
- }
-}
diff --git a/Code/IHM/UCSupprimerBanque.xaml b/Code/IHM/UCSupprimerBanque.xaml
deleted file mode 100644
index 87c694b..0000000
--- a/Code/IHM/UCSupprimerBanque.xaml
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
-
-
diff --git a/Code/IHM/UCSupprimerBanque.xaml.cs b/Code/IHM/UCSupprimerBanque.xaml.cs
deleted file mode 100644
index 763c752..0000000
--- a/Code/IHM/UCSupprimerBanque.xaml.cs
+++ /dev/null
@@ -1,34 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Windows.Navigation;
-using System.Windows.Shapes;
-
-namespace IHM
-{
- ///
- /// Logique d'interaction pour UCSupprimerBanque.xaml
- ///
- public partial class UCSupprimerBanque : UserControl
- {
- public Navigator Nav => (App.Current as App).Navigator;
- public UCSupprimerBanque()
- {
- InitializeComponent();
- }
-
- private void Button_Click_Retour(object sender, RoutedEventArgs e)
- {
- Nav.NavigateTo(Navigator.PART_COMPTE);
- }
- }
-}
diff --git a/Code/IHM/UCSupprimerCompte.xaml b/Code/IHM/UCSupprimerCompte.xaml
deleted file mode 100644
index 38ec1d4..0000000
--- a/Code/IHM/UCSupprimerCompte.xaml
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
-
-
-
diff --git a/Code/IHM/UCSupprimerCompte.xaml.cs b/Code/IHM/UCSupprimerCompte.xaml.cs
deleted file mode 100644
index 9402e27..0000000
--- a/Code/IHM/UCSupprimerCompte.xaml.cs
+++ /dev/null
@@ -1,35 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Windows.Navigation;
-using System.Windows.Shapes;
-
-namespace IHM
-{
- ///
- /// Logique d'interaction pour UCSupprimerCompte.xaml
- ///
- public partial class UCSupprimerCompte : UserControl
- {
- public Navigator Nav => (App.Current as App).Navigator;
-
- public UCSupprimerCompte()
- {
- InitializeComponent();
- }
-
- private void Button_Click_Retour(object sender, RoutedEventArgs e)
- {
- Nav.NavigateTo(Navigator.PART_COMPTE);
- }
- }
-}
diff --git a/Code/IHM/UCSupprimerEcheance.xaml b/Code/IHM/UCSupprimerEcheance.xaml
deleted file mode 100644
index a5f5e43..0000000
--- a/Code/IHM/UCSupprimerEcheance.xaml
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
-
-
diff --git a/Code/IHM/UCSupprimerEcheance.xaml.cs b/Code/IHM/UCSupprimerEcheance.xaml.cs
deleted file mode 100644
index cbdcfea..0000000
--- a/Code/IHM/UCSupprimerEcheance.xaml.cs
+++ /dev/null
@@ -1,35 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Windows.Navigation;
-using System.Windows.Shapes;
-
-namespace IHM
-{
- ///
- /// Logique d'interaction pour UCSupprimerEcheance.xaml
- ///
- public partial class UCSupprimerEcheance : UserControl
- {
- public Navigator Nav => (App.Current as App).Navigator;
-
- public UCSupprimerEcheance()
- {
- InitializeComponent();
- }
-
- private void Button_Click_Retour(object sender, RoutedEventArgs e)
- {
- Nav.NavigateTo(Navigator.PART_ECHEANCIER);
- }
- }
-}
diff --git a/Code/IHM/UCSupprimerOperation.xaml b/Code/IHM/UCSupprimerOperation.xaml
deleted file mode 100644
index 6ff42ec..0000000
--- a/Code/IHM/UCSupprimerOperation.xaml
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Code/IHM/UCSupprimerOperation.xaml.cs b/Code/IHM/UCSupprimerOperation.xaml.cs
deleted file mode 100644
index 7b8e9ce..0000000
--- a/Code/IHM/UCSupprimerOperation.xaml.cs
+++ /dev/null
@@ -1,34 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Windows.Navigation;
-using System.Windows.Shapes;
-
-namespace IHM
-{
- ///
- /// Logique d'interaction pour UserControl3.xaml
- ///
- public partial class UCSupprimerOperation : UserControl
- {
- public Navigator Nav => (App.Current as App).Navigator;
-
- public UCSupprimerOperation()
- {
- InitializeComponent();
- }
- private void Button_Click_Retour(object sender, RoutedEventArgs e)
- {
- Nav.NavigateTo(Navigator.PART_OPERATION);
- }
- }
-}
diff --git a/Code/IHM/UCSupprimerPlanification.xaml b/Code/IHM/UCSupprimerPlanification.xaml
deleted file mode 100644
index 5593411..0000000
--- a/Code/IHM/UCSupprimerPlanification.xaml
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
-
-
diff --git a/Code/IHM/UCSupprimerPlanification.xaml.cs b/Code/IHM/UCSupprimerPlanification.xaml.cs
deleted file mode 100644
index 2ea2934..0000000
--- a/Code/IHM/UCSupprimerPlanification.xaml.cs
+++ /dev/null
@@ -1,35 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Windows.Navigation;
-using System.Windows.Shapes;
-
-namespace IHM
-{
- ///
- /// Logique d'interaction pour UCSupprimerPlanification.xaml
- ///
- public partial class UCSupprimerPlanification : UserControl
- {
- public Navigator Nav => (App.Current as App).Navigator;
-
- public UCSupprimerPlanification()
- {
- InitializeComponent();
- }
-
- private void Button_Click_Retour(object sender, RoutedEventArgs e)
- {
- Nav.NavigateTo(Navigator.PART_PLANIFICATION);
- }
- }
-}
diff --git a/Code/IHM/UCTableauDeBord.xaml b/Code/IHM/UCTableauDeBord.xaml
deleted file mode 100644
index 51c72e1..0000000
--- a/Code/IHM/UCTableauDeBord.xaml
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
diff --git a/Code/IHM/UCTableauDeBord.xaml.cs b/Code/IHM/UCTableauDeBord.xaml.cs
deleted file mode 100644
index 9bcbd8a..0000000
--- a/Code/IHM/UCTableauDeBord.xaml.cs
+++ /dev/null
@@ -1,28 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Windows.Navigation;
-using System.Windows.Shapes;
-
-namespace IHM
-{
- ///
- /// Logique d'interaction pour UCTableauDeBord.xaml
- ///
- public partial class UCTableauDeBord : UserControl
- {
- public UCTableauDeBord()
- {
- InitializeComponent();
- }
- }
-}
diff --git a/Code/IHM/images/fond.jpg b/Code/IHM/images/fond.jpg
deleted file mode 100644
index 014a6d6..0000000
Binary files a/Code/IHM/images/fond.jpg and /dev/null differ
diff --git a/Code/IHM/images/fond2.png b/Code/IHM/images/fond2.png
deleted file mode 100644
index 51886cd..0000000
Binary files a/Code/IHM/images/fond2.png and /dev/null differ
diff --git a/Code/Model/Class1.cs b/Code/Model/Class1.cs
deleted file mode 100644
index 34183dd..0000000
--- a/Code/Model/Class1.cs
+++ /dev/null
@@ -1,7 +0,0 @@
-namespace Model
-{
- public class Class1
- {
-
- }
-}
\ No newline at end of file
diff --git a/Code/TestsUnitaires/UnitTest1.cs b/Code/TestsUnitaires/UnitTest1.cs
deleted file mode 100644
index 8813a19..0000000
--- a/Code/TestsUnitaires/UnitTest1.cs
+++ /dev/null
@@ -1,11 +0,0 @@
-namespace TestsUnitaires
-{
- public class UnitTest1
- {
- [Fact]
- public void Test1()
- {
-
- }
- }
-}
\ No newline at end of file
diff --git a/Sources/CI_MAUI.sln b/Sources/CI_MAUI.sln
new file mode 100644
index 0000000..126a18e
--- /dev/null
+++ b/Sources/CI_MAUI.sln
@@ -0,0 +1,43 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.3.32929.385
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Data_CI", "Data\Data_CI.csproj", "{9FD613C3-9936-4637-9AB7-9A683153E617}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Model_CI", "Modele\Model_CI.csproj", "{06E6FABA-C337-4C09-9A4F-C0A51A7F3D47}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestFonctionnel_CI", "TestFonctionnel\TestFonctionnel_CI.csproj", "{22C49933-E857-4CDC-ACD6-F5C26B249774}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestsUnitaires_CI", "TestsUnitaires\TestsUnitaires_CI.csproj", "{DF85B95E-4164-405F-906C-A8945F826DCB}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {9FD613C3-9936-4637-9AB7-9A683153E617}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {9FD613C3-9936-4637-9AB7-9A683153E617}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {9FD613C3-9936-4637-9AB7-9A683153E617}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {9FD613C3-9936-4637-9AB7-9A683153E617}.Release|Any CPU.Build.0 = Release|Any CPU
+ {06E6FABA-C337-4C09-9A4F-C0A51A7F3D47}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {06E6FABA-C337-4C09-9A4F-C0A51A7F3D47}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {06E6FABA-C337-4C09-9A4F-C0A51A7F3D47}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {06E6FABA-C337-4C09-9A4F-C0A51A7F3D47}.Release|Any CPU.Build.0 = Release|Any CPU
+ {22C49933-E857-4CDC-ACD6-F5C26B249774}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {22C49933-E857-4CDC-ACD6-F5C26B249774}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {22C49933-E857-4CDC-ACD6-F5C26B249774}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {22C49933-E857-4CDC-ACD6-F5C26B249774}.Release|Any CPU.Build.0 = Release|Any CPU
+ {DF85B95E-4164-405F-906C-A8945F826DCB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {DF85B95E-4164-405F-906C-A8945F826DCB}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {DF85B95E-4164-405F-906C-A8945F826DCB}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {DF85B95E-4164-405F-906C-A8945F826DCB}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {D9E83E0F-F18B-4EB1-98D1-62C05F7DE77E}
+ EndGlobalSection
+EndGlobal
diff --git a/Sources/Data/Data.csproj b/Sources/Data/Data.csproj
new file mode 100644
index 0000000..27fb33c
--- /dev/null
+++ b/Sources/Data/Data.csproj
@@ -0,0 +1,28 @@
+
+
+
+ net6.0;net6.0-android;net6.0-ios;net6.0-maccatalyst
+ $(TargetFrameworks);net6.0-windows10.0.19041.0
+
+
+ true
+ true
+ enable
+
+ 14.2
+ 14.0
+ 21.0
+ 10.0.17763.0
+ 10.0.17763.0
+ 6.5
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Sources/Data/Data_CI.csproj b/Sources/Data/Data_CI.csproj
new file mode 100644
index 0000000..d3b5f41
--- /dev/null
+++ b/Sources/Data/Data_CI.csproj
@@ -0,0 +1,23 @@
+
+
+
+ net6.0
+ enable
+ enable
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Sources/Data/PersLinqToPgSQL.cs b/Sources/Data/PersLinqToPgSQL.cs
new file mode 100644
index 0000000..c20020c
--- /dev/null
+++ b/Sources/Data/PersLinqToPgSQL.cs
@@ -0,0 +1,339 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Data;
+using System.Configuration;
+using Npgsql;
+using System.IO;
+using System.Diagnostics;
+using System.Windows;
+using System.Threading;
+using Model;
+using System.Runtime.CompilerServices;
+using System.Data.Common;
+
+namespace LinqToPgSQL
+{
+ public class PersLinqToPgSQL : IPersistanceManager
+ {
+ private Hash hash = new Hash();
+ string connexionBDD = String.Format("Server=90.114.135.116; Username=postgres; Database=conseco; Port=5432; Password=lulu; SSLMode=Prefer");
+
+ public string LoadInscrit(string id, string mdp)
+ {
+ int resultat=0;
+ var conn = new NpgsqlConnection(connexionBDD);
+ Console.Out.WriteLine("Ouverture de la connection");
+ conn.Open();
+ NpgsqlParameter p1 = new NpgsqlParameter { ParameterName = "p", Value = id };
+ NpgsqlParameter p2 = new NpgsqlParameter { ParameterName = "p2", Value = mdp };
+ NpgsqlCommand cmd = new NpgsqlCommand($"SELECT id FROM INSCRIT WHERE (nom=(@p) OR mail=(@p)) AND mdp=@p2", conn);
+ cmd.Parameters.Add(p1);
+ cmd.Parameters.Add(p2);
+ NpgsqlDataReader dr = cmd.ExecuteReader();
+ try
+ {
+ dr.Read();
+ resultat = dr.GetInt32(0);
+ dr.Close();
+ return resultat.ToString();
+ }
+ catch (Exception ex)
+ {
+ Debug.WriteLine(ex+"Utilisateur inconnu");
+ dr.Close();
+ return "null";//a changer doit retester
+ }
+
+ }
+
+ public bool ExistEmail(string mail)
+ {
+ var conn = new NpgsqlConnection(connexionBDD);
+ Console.Out.WriteLine("Ouverture de la connection");
+ try
+ {
+ conn.Open();
+ }
+ catch
+ {
+ conn.Close();
+ Debug.WriteLine("Problème de connection à la base de données. Aprés fermeture, l'application se fermera automatiquement.");
+ Environment.Exit(-1);
+ }
+
+ NpgsqlDataReader dbReader = new NpgsqlCommand("SELECT mail FROM Inscrit", conn).ExecuteReader();
+
+ while (dbReader.Read())
+ {
+ if (dbReader.GetString(0) == mail)
+ {
+ dbReader.Close();
+ return true;
+ }
+ }
+
+ dbReader.Close();
+ return false;
+ }
+
+ public async void ChangePasswordBdd(string mail, string newMdp)
+ {
+ Hash hash = new Hash();
+ string hashedMdp = hash.CreateHashCode(newMdp);
+ var conn = new NpgsqlConnection(connexionBDD);
+ Console.Out.WriteLine("Ouverture de la connection");
+ try
+ {
+ conn.Open();
+ }
+ catch
+ {
+ conn.Close();
+ Debug.WriteLine("Problème de connection à la base de données. Aprés fermeture, l'application se fermera automatiquement.");
+ Environment.Exit(-1);
+ }
+ await using var cmd = new NpgsqlCommand($"UPDATE Inscrit SET mdp = (@newmdp) WHERE mail = (@mail);", conn)
+ {
+ Parameters =
+ {
+ new NpgsqlParameter("newmdp", hashedMdp),
+ new NpgsqlParameter("mail", mail),
+ }
+ };
+ await cmd.ExecuteNonQueryAsync();
+ }
+
+ public string LastInscrit()
+ {
+ string resultat = "";
+ var conn = new NpgsqlConnection(connexionBDD);
+ conn.Open();
+ NpgsqlDataReader dr = new NpgsqlCommand($"SELECT max(id) FROM INSCRIT", conn).ExecuteReader();
+ try
+ {
+ dr.Read();
+ resultat = dr.GetString(0);
+ dr.Close();
+ return resultat;
+ }
+ catch (Exception ex)
+ {
+ Debug.WriteLine(ex + "Problème bdd");
+ dr.Close();
+ return "null";//a changer doit retester
+ }
+
+ }
+
+
+
+ public async void CreateInscrit(Inscrit inscrit)
+ {
+ string mdpHash = hash.CreateHashCode(inscrit.Mdp);
+ Console.WriteLine("AAAAAA"+mdpHash.Length);
+ var conn = new NpgsqlConnection(connexionBDD);
+ conn.Open();
+ await using var cmd = new NpgsqlCommand($"INSERT INTO Inscrit (nom,prenom,mail,mdp) VALUES ((@name), (@surname), (@mail), (@password))", conn)
+ {
+ Parameters =
+ {
+ new NpgsqlParameter("name", inscrit.Nom),
+ new NpgsqlParameter("surname", inscrit.Prenom),
+ new NpgsqlParameter("mail", inscrit.Mail),
+ new NpgsqlParameter("password", mdpHash),
+ }
+ };
+ await cmd.ExecuteNonQueryAsync();
+ }
+
+ public string RecupMdpBdd(string mail)
+ {
+ var conn = new NpgsqlConnection(connexionBDD);
+ Console.Out.WriteLine("Ouverture de la connection");
+ try
+ {
+ conn.Open();
+ }
+ catch
+ {
+ conn.Close();
+ Debug.WriteLine("Problème de connection à la base de données. Aprés fermeture, l'application se fermera automatiquement.");
+ Environment.Exit(-1);
+ }
+ NpgsqlCommand cmd = new NpgsqlCommand($"SELECT mdp FROM Inscrit WHERE mail = (@mail)", conn)
+ {
+ Parameters =
+ {
+ new NpgsqlParameter("mail", mail),
+ }
+ };
+ NpgsqlDataReader dataReader = cmd.ExecuteReader();
+ if (dataReader.Read())
+ {
+ return dataReader.GetString(0);
+ }
+ return null;
+ }
+
+ public IEnumerable LoadBanque()
+ {
+ List ListeBanques = new List();
+
+ var conn = new NpgsqlConnection(connexionBDD);
+ Console.Out.WriteLine("Ouverture de la connection");
+ try
+ {
+ conn.Open();
+ }
+ catch
+ {
+ conn.Close();
+ Debug.WriteLine("Problème de connection à la base de donnée. Aprés fermeture, l'application se fermera automatiquement");
+ Environment.Exit(-1);
+
+ }
+
+
+ NpgsqlDataReader dbReader = new NpgsqlCommand("SELECT * FROM Banque", conn).ExecuteReader();
+
+ while (dbReader.Read())
+ {
+
+ ListeBanques.Add(new Banque(dbReader.GetString(0), dbReader.GetString(1), dbReader.GetString(2)));
+
+ }
+
+
+ dbReader.Close();
+
+
+ return ListeBanques;
+ }
+
+ /*Charge le compte d'un inscrit*/
+ public IEnumerable LoadCompte(Inscrit i)
+ {
+ List ListeCompte = new List();
+
+ var conn = new NpgsqlConnection(connexionBDD);
+ Console.Out.WriteLine("Ouverture de la connection");
+ try
+ {
+ conn.Open();
+ }
+ catch
+ {
+ conn.Close();
+ Debug.WriteLine("Problème de connection à la base de données. Aprés fermeture, l'application se fermera automatiquement.");
+ Environment.Exit(-1);
+ }
+
+ string requete = "Select * FROM Compte c, InscrBanque ib, Inscrit i WHERE c.idInscrit = ib.idInscrit AND c.idInscritBanque = ib.id AND i.id = (@p1)";
+ NpgsqlDataReader dbReader = new NpgsqlCommand("Select * FROM Compte c, InscrBanque ib, Inscrit i WHERE c.idInscrit = ib.idInscrit AND c.idInscritBanque = ib.id AND i.id = (@p1) ", conn).ExecuteReader();
+
+ using (var command1 = new NpgsqlCommand(requete, conn))
+ {
+ command1.Parameters.AddWithValue("p", i.Id);
+ /*await command1.ExecuteNonQueryAsync();*/
+ }
+
+
+ while (dbReader.Read())
+ {
+ ListeCompte.Add(new Compte(dbReader.GetString(0), dbReader.GetInt64(1)));
+ }
+ dbReader.Close();
+ return ListeCompte;
+ }
+
+ /*Suppression d'un inscrit dans la base de données*/
+ public async void SupprimerInscritBdd(Inscrit i)
+ {
+ /*List ListeInscrits = new List(LoadInscrit());*/
+
+ var conn = new NpgsqlConnection(connexionBDD);
+ Console.Out.WriteLine("Ouverture de la connection");
+ try
+ {
+ conn.Open();
+ }
+ catch
+ {
+ conn.Close();
+ Debug.WriteLine("Problème de connection à la base de données. Aprés fermeture, l'application se fermera automatiquement.");
+ Environment.Exit(-1);
+ }
+
+
+ string requete = $"DELETE FROM INSCRIT WHERE id=(@p)";
+ string requeteFKey = $"DELETE FROM DEVISEINSCRIT WHERE idInscrit=(@p2)";
+ using (var command1 = new NpgsqlCommand(requeteFKey, conn))
+ {
+ command1.Parameters.AddWithValue("p", i.Id);
+ await command1.ExecuteNonQueryAsync();
+ }
+
+
+ SupprimerToutesBanquesBdd(i);
+ /* SupprimerCompteBdd(i);
+ SupprimerEcheancierBdd(i);
+ SupprimerPlanificationBdd(i);
+ */
+ }
+
+ /* Suppression de toutes les banques d'un inscrit*/
+ public async void SupprimerToutesBanquesBdd(Inscrit i)
+ {
+ var conn = new NpgsqlConnection(connexionBDD);
+ Console.Out.WriteLine("Ouverture de la connection");
+ try
+ {
+ conn.Open();
+ }
+ catch
+ {
+ conn.Close();
+ Debug.WriteLine("Problème de connection ave la base de données. Aprés fermeture de la fenêtre, l'application se fermera automatiquement");
+ Environment.Exit(-1);
+ }
+ string requete = $"DELETE * FROM BANQUE b, INSCRBANQUE ib WHERE b.nom=ib.nomBanque AND ib.idInscrit=(@id)";
+ using (var command1 = new NpgsqlCommand(requete, conn))
+ {
+ command1.Parameters.AddWithValue("p", i.Id);
+ await command1.ExecuteNonQueryAsync();
+ }
+ }
+
+ /*Suppression d'une banque d'un inscrit*/
+ public async void SupprimerBanqueBdd(Inscrit i, Banque b)
+ {
+ var conn = new NpgsqlConnection(connexionBDD);
+ Console.Out.WriteLine("Ouverture de la connection");
+ try
+ {
+ conn.Open();
+ }
+ catch
+ {
+ conn.Close();
+ Debug.WriteLine("Problème de connection avec la base de données. Aprés fermeture de la fenêtre, l'application se fermera automatiquement");
+ Environment.Exit(-1);
+ }
+
+ await using var cmd = new NpgsqlCommand("DELETE FROM InscrBanque WHERE nombanque=(@b) AND idinscrit=(@i)", conn)
+ {
+ Parameters =
+ {
+ new("b", b.Nom),
+ new("i", i.Id)
+ }
+ };
+ await cmd.ExecuteNonQueryAsync();
+
+ // attente des autres supression
+ }
+ }
+}
\ No newline at end of file
diff --git a/Sources/Data/Platforms/Android/PlatformClass1.cs b/Sources/Data/Platforms/Android/PlatformClass1.cs
new file mode 100644
index 0000000..33e1388
--- /dev/null
+++ b/Sources/Data/Platforms/Android/PlatformClass1.cs
@@ -0,0 +1,7 @@
+namespace Data
+{
+ // All the code in this file is only included on Android.
+ public class PlatformClass1
+ {
+ }
+}
\ No newline at end of file
diff --git a/Sources/Data/Platforms/MacCatalyst/PlatformClass1.cs b/Sources/Data/Platforms/MacCatalyst/PlatformClass1.cs
new file mode 100644
index 0000000..3864800
--- /dev/null
+++ b/Sources/Data/Platforms/MacCatalyst/PlatformClass1.cs
@@ -0,0 +1,7 @@
+namespace Data
+{
+ // All the code in this file is only included on Mac Catalyst.
+ public class PlatformClass1
+ {
+ }
+}
\ No newline at end of file
diff --git a/Sources/Data/Platforms/Tizen/PlatformClass1.cs b/Sources/Data/Platforms/Tizen/PlatformClass1.cs
new file mode 100644
index 0000000..13906c5
--- /dev/null
+++ b/Sources/Data/Platforms/Tizen/PlatformClass1.cs
@@ -0,0 +1,9 @@
+using System;
+
+namespace Data
+{
+ // All the code in this file is only included on Tizen.
+ public class PlatformClass1
+ {
+ }
+}
\ No newline at end of file
diff --git a/Sources/Data/Platforms/Windows/PlatformClass1.cs b/Sources/Data/Platforms/Windows/PlatformClass1.cs
new file mode 100644
index 0000000..a06a940
--- /dev/null
+++ b/Sources/Data/Platforms/Windows/PlatformClass1.cs
@@ -0,0 +1,7 @@
+namespace Data
+{
+ // All the code in this file is only included on Windows.
+ public class PlatformClass1
+ {
+ }
+}
\ No newline at end of file
diff --git a/Sources/Data/Platforms/iOS/PlatformClass1.cs b/Sources/Data/Platforms/iOS/PlatformClass1.cs
new file mode 100644
index 0000000..dd74838
--- /dev/null
+++ b/Sources/Data/Platforms/iOS/PlatformClass1.cs
@@ -0,0 +1,7 @@
+namespace Data
+{
+ // All the code in this file is only included on iOS.
+ public class PlatformClass1
+ {
+ }
+}
\ No newline at end of file
diff --git a/Sources/IHM/App.xaml b/Sources/IHM/App.xaml
new file mode 100644
index 0000000..d5a6223
--- /dev/null
+++ b/Sources/IHM/App.xaml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Sources/IHM/App.xaml.cs b/Sources/IHM/App.xaml.cs
new file mode 100644
index 0000000..58578b3
--- /dev/null
+++ b/Sources/IHM/App.xaml.cs
@@ -0,0 +1,20 @@
+using LinqToPgSQL;
+using Model;
+
+namespace IHM
+{
+ public partial class App : Application
+ {
+ public Manager Manager { get; set; } = new Manager(new PersLinqToPgSQL());
+ public App()
+ {
+ InitializeComponent();
+
+ MainPage = new AppShell();
+
+
+
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/Sources/IHM/AppShell.xaml b/Sources/IHM/AppShell.xaml
new file mode 100644
index 0000000..97c5410
--- /dev/null
+++ b/Sources/IHM/AppShell.xaml
@@ -0,0 +1,43 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Sources/IHM/AppShell.xaml.cs b/Sources/IHM/AppShell.xaml.cs
new file mode 100644
index 0000000..998f5b4
--- /dev/null
+++ b/Sources/IHM/AppShell.xaml.cs
@@ -0,0 +1,21 @@
+using Model;
+
+namespace IHM
+{
+ public partial class AppShell : Shell
+ {
+ public Manager Mgr => (App.Current as App).Manager;
+
+ public AppShell()
+ {
+ InitializeComponent();
+ Routing.RegisterRoute("DashBoard", typeof(DashBoard));
+ Routing.RegisterRoute("Inscription", typeof(Inscription));
+ Routing.RegisterRoute("ForgetPassword", typeof(ForgetPassword));
+ Routing.RegisterRoute("ChangePassword", typeof(ChangePassword));
+ }
+
+
+
+ }
+}
\ No newline at end of file
diff --git a/Sources/IHM/ChangePassword.xaml b/Sources/IHM/ChangePassword.xaml
new file mode 100644
index 0000000..673404d
--- /dev/null
+++ b/Sources/IHM/ChangePassword.xaml
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Sources/IHM/ChangePassword.xaml.cs b/Sources/IHM/ChangePassword.xaml.cs
new file mode 100644
index 0000000..5f31f93
--- /dev/null
+++ b/Sources/IHM/ChangePassword.xaml.cs
@@ -0,0 +1,45 @@
+using Model;
+
+namespace IHM;
+
+public partial class ChangePassword : ContentPage
+{
+ public Manager Mgr => (App.Current as App).Manager;
+ private string MailUser;
+ public ChangePassword(string mailUser)
+ {
+ InitializeComponent();
+ MailUser = mailUser;
+ }
+
+ private void ValidationButton_Clicked(object sender, EventArgs e)
+ {
+ if (EntryNewMdp.Text == null || EntryNewMdpConfirmation.Text == null)
+ {
+ AffichError("Champ non valide", "Veuillez remplir tout les champs", "OK");
+ }
+ else {
+ if (!EntryNewMdp.Text.Equals(EntryNewMdpConfirmation.Text))
+ {
+ AffichError("mot de passe non identique", "veuillez entrer des mots de passe identique", "OK");
+ }
+ else
+ {
+ Mgr.changePasswordBdd(MailUser, EntryNewMdp.Text);
+ AffichError("mdp changé", "mot de passe bien changé", "ok");
+ NavigateTo("../..");
+ }
+ }
+ }
+
+ private async void NavigateTo(string path)
+ {
+ await Shell.Current.GoToAsync(path);
+ }
+
+
+ private async void AffichError(string s, string s1, string s2)
+ {
+ await DisplayAlert(s, s1, s2);
+ }
+}
\ No newline at end of file
diff --git a/Sources/IHM/Dashboard.xaml b/Sources/IHM/Dashboard.xaml
new file mode 100644
index 0000000..751ce20
--- /dev/null
+++ b/Sources/IHM/Dashboard.xaml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Sources/IHM/Dashboard.xaml.cs b/Sources/IHM/Dashboard.xaml.cs
new file mode 100644
index 0000000..dabbff7
--- /dev/null
+++ b/Sources/IHM/Dashboard.xaml.cs
@@ -0,0 +1,27 @@
+using Model;
+
+namespace IHM;
+
+public partial class DashBoard : ContentPage
+{
+ public Manager Mgr => (App.Current as App).Manager;
+ public DashBoard()
+ {
+ InitializeComponent();
+ //Routing.RegisterRoute(nameof(DashBoard), typeof(DashBoard));
+
+
+ if (Mgr.SelectedInscrit == null)
+ {
+ loadInscription();
+ }
+
+
+
+ }
+
+ public async void loadInscription()
+ {
+ await Navigation.PushModalAsync(new MainPage());
+ }
+}
\ No newline at end of file
diff --git a/Sources/IHM/ForgetPassword.xaml b/Sources/IHM/ForgetPassword.xaml
new file mode 100644
index 0000000..92c34bb
--- /dev/null
+++ b/Sources/IHM/ForgetPassword.xaml
@@ -0,0 +1,50 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Sources/IHM/ForgetPassword.xaml.cs b/Sources/IHM/ForgetPassword.xaml.cs
new file mode 100644
index 0000000..b4eac3f
--- /dev/null
+++ b/Sources/IHM/ForgetPassword.xaml.cs
@@ -0,0 +1,48 @@
+using Model;
+using Email = Model.Email;
+
+namespace IHM;
+
+public partial class ForgetPassword : ContentPage
+{
+ public Manager Mgr => (App.Current as App).Manager;
+ private string code;
+ public ForgetPassword()
+ {
+ InitializeComponent();
+ }
+ public void SearchEmail(object sender, EventArgs e)
+ {
+ if (EntryMail.Text == null)
+ {
+ AffichError("Email inconnue", "Aucun compte existant portant cette adresse mail", "OK");
+ }
+ if (Mgr.existEmail(EntryMail.Text)){
+ Random generator = new Random();
+ code = generator.Next(0, 1000000).ToString("D6");
+ Email.CreateMail(EntryMail.Text, code);
+ ValidateReceptCode.IsVisible = true;
+ }
+ }
+ private async void AffichError(string s, string s1, string s2)
+ {
+ await DisplayAlert(s, s1, s2);
+ }
+
+ private void ValideCode(object sender, EventArgs e)
+ {
+ if(EntryCodeRecept.Text == code)
+ {
+ NavigateTo();
+ }
+ else
+ {
+ AffichError("Code non identique", "Veuillez entrer le même code que celui reçu par mail", "OK");
+ }
+ }
+
+ public async void NavigateTo()
+ {
+ await Navigation.PushModalAsync(new ChangePassword(EntryMail.Text));
+ }
+}
\ No newline at end of file
diff --git a/Sources/IHM/IHM.csproj b/Sources/IHM/IHM.csproj
new file mode 100644
index 0000000..9ef10c6
--- /dev/null
+++ b/Sources/IHM/IHM.csproj
@@ -0,0 +1,96 @@
+
+
+
+ net6.0-android;net6.0-ios;net6.0-maccatalyst
+ $(TargetFrameworks);net6.0-windows10.0.19041.0
+
+
+ Exe
+ IHM
+ true
+ true
+ enable
+
+
+ Cons'Eco
+
+
+ com.companyname.ihm
+ 33DC848D-F9BE-4608-823D-9556390F7E87
+
+
+ 1.0
+ 1
+
+ 14.2
+ 14.0
+ 21.0
+ 10.0.17763.0
+ 10.0.17763.0
+ 6.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ PreserveNewest
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ MSBuild:Compile
+
+
+ MSBuild:Compile
+
+
+ MSBuild:Compile
+
+
+ MSBuild:Compile
+
+
+ MSBuild:Compile
+
+
+ MSBuild:Compile
+
+
+ MSBuild:Compile
+
+
+
+
diff --git a/Sources/IHM/Inscription.xaml b/Sources/IHM/Inscription.xaml
new file mode 100644
index 0000000..26f4cea
--- /dev/null
+++ b/Sources/IHM/Inscription.xaml
@@ -0,0 +1,86 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Sources/IHM/Inscription.xaml.cs b/Sources/IHM/Inscription.xaml.cs
new file mode 100644
index 0000000..bc88336
--- /dev/null
+++ b/Sources/IHM/Inscription.xaml.cs
@@ -0,0 +1,73 @@
+using Model;
+using Email = Model.Email;
+
+namespace IHM;
+
+public partial class Inscription : ContentPage
+{
+ private string code;
+ public Manager Mgr => (App.Current as App).Manager;
+ public Inscription()
+ {
+ InitializeComponent();
+ }
+ public void InscriptionOnClicked(object sender, EventArgs e)
+ {
+ if (EntryNewName.Text == null || EntryNewMail.Text == null || EntryConfirmationPassword.Text == null || EntryNewPassword.Text == null ||
+ EntryNewSurname.Text == null)
+ {
+ AffichError("Champ invalide", "Veuillez compléter tout les champs", "OK");
+ }
+ else
+ {
+ if(EntryNewPassword.Text.Equals(EntryConfirmationPassword.Text)) {
+ if (Mgr.existEmail(EntryNewMail.Text))
+ {
+ AffichError("Mail existant", "un compte porte déjà cette adresse mail, veuillez en changer", "OK");
+ }
+ else
+ {
+ try
+ {
+ Random generator = new Random();
+ code = generator.Next(0, 1000000).ToString("D6");
+ Email.CreateMail(EntryNewMail.Text, code);
+ ValidateReceptCode.IsVisible = true;
+ }
+ catch (Exception ex)
+ {
+ AffichError("Information invalide", ex.Message, "OK");
+ }
+ }
+ }
+ else
+ {
+ AffichError("Mot de passe de confirmation invalide", "Veuillez mettre deux mots de passe identiques", "OK");
+ }
+ }
+ }
+ private void ValideCode(object sender, EventArgs e)
+ {
+ if (EntryCodeRecept.Text == code)
+ {
+ Inscrit inscrit = new Inscrit(Mgr.lastInscrit() + 1, EntryNewName.Text, EntryNewMail.Text, EntryNewSurname.Text, EntryNewPassword.Text);
+ Mgr.createInscrit(inscrit);
+ AffichError("compte créé", "Compte bien créé", "OK");
+ NavigateTo("..");
+ }
+ else
+ {
+ AffichError("Code non identique", "Veuillez entrer le même code que celui reçu par mail", "OK");
+ }
+ }
+
+ private async void AffichError(string s, string s1, string s2)
+ {
+ await DisplayAlert(s, s1, s2);
+ }
+
+ private async void NavigateTo(string s)
+ {
+ await Shell.Current.GoToAsync(s);
+ }
+}
\ No newline at end of file
diff --git a/Sources/IHM/MainPage.xaml b/Sources/IHM/MainPage.xaml
new file mode 100644
index 0000000..109a56e
--- /dev/null
+++ b/Sources/IHM/MainPage.xaml
@@ -0,0 +1,81 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Sources/IHM/MainPage.xaml.cs b/Sources/IHM/MainPage.xaml.cs
new file mode 100644
index 0000000..cee9116
--- /dev/null
+++ b/Sources/IHM/MainPage.xaml.cs
@@ -0,0 +1,53 @@
+using Model;
+using System.Windows.Input;
+
+namespace IHM
+{
+ public partial class MainPage : ContentPage
+ {
+ public Manager Mgr => (App.Current as App).Manager;
+ public MainPage()
+ {
+ InitializeComponent();
+ BindingContext = this;
+ }
+
+ public void ConnectionOnClicked(object sender, EventArgs e)
+ {
+ if(EntryMail.Text == null || EntryPassworld.Text == null)
+ {
+ AffichError("Champ invalide", "Veuillez compléter tout les champs", "OK");
+ }
+ else {
+ if (Mgr.existEmail(EntryMail.Text))
+ {
+ if (Mgr.isEqualHash(Mgr.recupMdpBdd(EntryMail.Text), EntryPassworld.Text))
+ {
+ Mgr.LoadInscrit(EntryMail.Text, EntryPassworld.Text);
+ ConnexionValide();
+ }
+ else
+ {
+ AffichError("Mot de passe non valide", "Le mot de passe ne correspond pas à celui existant pout cette adresse mail", "OK");
+ }
+ }
+ else
+ {
+ AffichError("Compte inexistant", "Email ou mot de passe invalide", "OK");
+ }
+ }
+ }
+
+ private async void ConnexionValide()
+ {
+ await Navigation.PopModalAsync();
+ }
+
+ private async void AffichError(string s, string s1, string s2)
+ {
+ await DisplayAlert(s, s1, s2);
+ }
+
+ public ICommand TapCommand => new Command(async (page) => await Shell.Current.GoToAsync(page));
+ }
+}
\ No newline at end of file
diff --git a/Sources/IHM/MauiProgram.cs b/Sources/IHM/MauiProgram.cs
new file mode 100644
index 0000000..894d33c
--- /dev/null
+++ b/Sources/IHM/MauiProgram.cs
@@ -0,0 +1,19 @@
+namespace IHM
+{
+ public static class MauiProgram
+ {
+ public static MauiApp CreateMauiApp()
+ {
+ var builder = MauiApp.CreateBuilder();
+ builder
+ .UseMauiApp()
+ .ConfigureFonts(fonts =>
+ {
+ fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
+ fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
+ });
+
+ return builder.Build();
+ }
+ }
+}
\ No newline at end of file
diff --git a/Sources/IHM/Operations.xaml b/Sources/IHM/Operations.xaml
new file mode 100644
index 0000000..36ee16a
--- /dev/null
+++ b/Sources/IHM/Operations.xaml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Sources/IHM/Operations.xaml.cs b/Sources/IHM/Operations.xaml.cs
new file mode 100644
index 0000000..dd1c8e6
--- /dev/null
+++ b/Sources/IHM/Operations.xaml.cs
@@ -0,0 +1,9 @@
+namespace IHM;
+
+public partial class Operations : ContentPage
+{
+ public Operations()
+ {
+ InitializeComponent();
+ }
+}
\ No newline at end of file
diff --git a/Sources/IHM/Planification.xaml b/Sources/IHM/Planification.xaml
new file mode 100644
index 0000000..4c94860
--- /dev/null
+++ b/Sources/IHM/Planification.xaml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Sources/IHM/Planification.xaml.cs b/Sources/IHM/Planification.xaml.cs
new file mode 100644
index 0000000..0b63edf
--- /dev/null
+++ b/Sources/IHM/Planification.xaml.cs
@@ -0,0 +1,9 @@
+namespace IHM;
+
+public partial class Planification : ContentPage
+{
+ public Planification()
+ {
+ InitializeComponent();
+ }
+}
\ No newline at end of file
diff --git a/Sources/IHM/Platforms/Android/AndroidManifest.xml b/Sources/IHM/Platforms/Android/AndroidManifest.xml
new file mode 100644
index 0000000..8bef340
--- /dev/null
+++ b/Sources/IHM/Platforms/Android/AndroidManifest.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Sources/IHM/Platforms/Android/MainActivity.cs b/Sources/IHM/Platforms/Android/MainActivity.cs
new file mode 100644
index 0000000..c180d56
--- /dev/null
+++ b/Sources/IHM/Platforms/Android/MainActivity.cs
@@ -0,0 +1,11 @@
+using Android.App;
+using Android.Content.PM;
+using Android.OS;
+
+namespace IHM
+{
+ [Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize | ConfigChanges.Density)]
+ public class MainActivity : MauiAppCompatActivity
+ {
+ }
+}
\ No newline at end of file
diff --git a/Sources/IHM/Platforms/Android/MainApplication.cs b/Sources/IHM/Platforms/Android/MainApplication.cs
new file mode 100644
index 0000000..0d0a486
--- /dev/null
+++ b/Sources/IHM/Platforms/Android/MainApplication.cs
@@ -0,0 +1,16 @@
+using Android.App;
+using Android.Runtime;
+
+namespace IHM
+{
+ [Application]
+ public class MainApplication : MauiApplication
+ {
+ public MainApplication(IntPtr handle, JniHandleOwnership ownership)
+ : base(handle, ownership)
+ {
+ }
+
+ protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
+ }
+}
\ No newline at end of file
diff --git a/Sources/IHM/Platforms/Android/Resources/values/colors.xml b/Sources/IHM/Platforms/Android/Resources/values/colors.xml
new file mode 100644
index 0000000..c04d749
--- /dev/null
+++ b/Sources/IHM/Platforms/Android/Resources/values/colors.xml
@@ -0,0 +1,6 @@
+
+
+ #512BD4
+ #2B0B98
+ #2B0B98
+
\ No newline at end of file
diff --git a/Sources/IHM/Platforms/MacCatalyst/AppDelegate.cs b/Sources/IHM/Platforms/MacCatalyst/AppDelegate.cs
new file mode 100644
index 0000000..0807952
--- /dev/null
+++ b/Sources/IHM/Platforms/MacCatalyst/AppDelegate.cs
@@ -0,0 +1,10 @@
+using Foundation;
+
+namespace IHM
+{
+ [Register("AppDelegate")]
+ public class AppDelegate : MauiUIApplicationDelegate
+ {
+ protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
+ }
+}
\ No newline at end of file
diff --git a/Sources/IHM/Platforms/MacCatalyst/Info.plist b/Sources/IHM/Platforms/MacCatalyst/Info.plist
new file mode 100644
index 0000000..c96dd0a
--- /dev/null
+++ b/Sources/IHM/Platforms/MacCatalyst/Info.plist
@@ -0,0 +1,30 @@
+
+
+
+
+ UIDeviceFamily
+
+ 1
+ 2
+
+ UIRequiredDeviceCapabilities
+
+ arm64
+
+ UISupportedInterfaceOrientations
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ UISupportedInterfaceOrientations~ipad
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationPortraitUpsideDown
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ XSAppIconAssets
+ Assets.xcassets/appicon.appiconset
+
+
diff --git a/Sources/IHM/Platforms/MacCatalyst/Program.cs b/Sources/IHM/Platforms/MacCatalyst/Program.cs
new file mode 100644
index 0000000..a61b384
--- /dev/null
+++ b/Sources/IHM/Platforms/MacCatalyst/Program.cs
@@ -0,0 +1,16 @@
+using ObjCRuntime;
+using UIKit;
+
+namespace IHM
+{
+ public class Program
+ {
+ // This is the main entry point of the application.
+ static void Main(string[] args)
+ {
+ // if you want to use a different Application Delegate class from "AppDelegate"
+ // you can specify it here.
+ UIApplication.Main(args, null, typeof(AppDelegate));
+ }
+ }
+}
\ No newline at end of file
diff --git a/Sources/IHM/Platforms/Tizen/Main.cs b/Sources/IHM/Platforms/Tizen/Main.cs
new file mode 100644
index 0000000..914caab
--- /dev/null
+++ b/Sources/IHM/Platforms/Tizen/Main.cs
@@ -0,0 +1,17 @@
+using Microsoft.Maui;
+using Microsoft.Maui.Hosting;
+using System;
+
+namespace IHM
+{
+ internal class Program : MauiApplication
+ {
+ protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
+
+ static void Main(string[] args)
+ {
+ var app = new Program();
+ app.Run(args);
+ }
+ }
+}
\ No newline at end of file
diff --git a/Sources/IHM/Platforms/Tizen/tizen-manifest.xml b/Sources/IHM/Platforms/Tizen/tizen-manifest.xml
new file mode 100644
index 0000000..d93629c
--- /dev/null
+++ b/Sources/IHM/Platforms/Tizen/tizen-manifest.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+ maui-appicon-placeholder
+
+
+
+
+ http://tizen.org/privilege/internet
+
+
+
+
\ No newline at end of file
diff --git a/Sources/IHM/Platforms/Windows/App.xaml b/Sources/IHM/Platforms/Windows/App.xaml
new file mode 100644
index 0000000..83a2b3d
--- /dev/null
+++ b/Sources/IHM/Platforms/Windows/App.xaml
@@ -0,0 +1,8 @@
+
+
+
diff --git a/Sources/IHM/Platforms/Windows/App.xaml.cs b/Sources/IHM/Platforms/Windows/App.xaml.cs
new file mode 100644
index 0000000..9ee56b1
--- /dev/null
+++ b/Sources/IHM/Platforms/Windows/App.xaml.cs
@@ -0,0 +1,24 @@
+using Microsoft.UI.Xaml;
+
+// To learn more about WinUI, the WinUI project structure,
+// and more about our project templates, see: http://aka.ms/winui-project-info.
+
+namespace IHM.WinUI
+{
+ ///
+ /// Provides application-specific behavior to supplement the default Application class.
+ ///
+ public partial class App : MauiWinUIApplication
+ {
+ ///
+ /// Initializes the singleton application object. This is the first line of authored code
+ /// executed, and as such is the logical equivalent of main() or WinMain().
+ ///
+ public App()
+ {
+ this.InitializeComponent();
+ }
+
+ protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
+ }
+}
\ No newline at end of file
diff --git a/Sources/IHM/Platforms/Windows/Package.appxmanifest b/Sources/IHM/Platforms/Windows/Package.appxmanifest
new file mode 100644
index 0000000..2bcb11e
--- /dev/null
+++ b/Sources/IHM/Platforms/Windows/Package.appxmanifest
@@ -0,0 +1,43 @@
+
+
+
+
+
+
+ $placeholder$
+ User Name
+ $placeholder$.png
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Sources/IHM/Platforms/Windows/app.manifest b/Sources/IHM/Platforms/Windows/app.manifest
new file mode 100644
index 0000000..2f466d0
--- /dev/null
+++ b/Sources/IHM/Platforms/Windows/app.manifest
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+ true/PM
+ PerMonitorV2, PerMonitor
+
+
+
diff --git a/Sources/IHM/Platforms/iOS/AppDelegate.cs b/Sources/IHM/Platforms/iOS/AppDelegate.cs
new file mode 100644
index 0000000..0807952
--- /dev/null
+++ b/Sources/IHM/Platforms/iOS/AppDelegate.cs
@@ -0,0 +1,10 @@
+using Foundation;
+
+namespace IHM
+{
+ [Register("AppDelegate")]
+ public class AppDelegate : MauiUIApplicationDelegate
+ {
+ protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
+ }
+}
\ No newline at end of file
diff --git a/Sources/IHM/Platforms/iOS/Info.plist b/Sources/IHM/Platforms/iOS/Info.plist
new file mode 100644
index 0000000..0004a4f
--- /dev/null
+++ b/Sources/IHM/Platforms/iOS/Info.plist
@@ -0,0 +1,32 @@
+
+
+
+
+ LSRequiresIPhoneOS
+
+ UIDeviceFamily
+
+ 1
+ 2
+
+ UIRequiredDeviceCapabilities
+
+ arm64
+
+ UISupportedInterfaceOrientations
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ UISupportedInterfaceOrientations~ipad
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationPortraitUpsideDown
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ XSAppIconAssets
+ Assets.xcassets/appicon.appiconset
+
+
diff --git a/Sources/IHM/Platforms/iOS/Program.cs b/Sources/IHM/Platforms/iOS/Program.cs
new file mode 100644
index 0000000..a61b384
--- /dev/null
+++ b/Sources/IHM/Platforms/iOS/Program.cs
@@ -0,0 +1,16 @@
+using ObjCRuntime;
+using UIKit;
+
+namespace IHM
+{
+ public class Program
+ {
+ // This is the main entry point of the application.
+ static void Main(string[] args)
+ {
+ // if you want to use a different Application Delegate class from "AppDelegate"
+ // you can specify it here.
+ UIApplication.Main(args, null, typeof(AppDelegate));
+ }
+ }
+}
\ No newline at end of file
diff --git a/Sources/IHM/Properties/launchSettings.json b/Sources/IHM/Properties/launchSettings.json
new file mode 100644
index 0000000..edf8aad
--- /dev/null
+++ b/Sources/IHM/Properties/launchSettings.json
@@ -0,0 +1,8 @@
+{
+ "profiles": {
+ "Windows Machine": {
+ "commandName": "MsixPackage",
+ "nativeDebugging": false
+ }
+ }
+}
\ No newline at end of file
diff --git a/Sources/IHM/Resources/AppIcon/appiconfg.svg b/Sources/IHM/Resources/AppIcon/appiconfg.svg
new file mode 100644
index 0000000..21dfb25
--- /dev/null
+++ b/Sources/IHM/Resources/AppIcon/appiconfg.svg
@@ -0,0 +1,8 @@
+
+
+
\ No newline at end of file
diff --git a/Sources/IHM/Resources/AppIcon/logo.svg b/Sources/IHM/Resources/AppIcon/logo.svg
new file mode 100644
index 0000000..16c9fb8
--- /dev/null
+++ b/Sources/IHM/Resources/AppIcon/logo.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/Sources/IHM/Resources/Fonts/OpenSans-Regular.ttf b/Sources/IHM/Resources/Fonts/OpenSans-Regular.ttf
new file mode 100644
index 0000000..939e348
Binary files /dev/null and b/Sources/IHM/Resources/Fonts/OpenSans-Regular.ttf differ
diff --git a/Sources/IHM/Resources/Fonts/OpenSans-Semibold.ttf b/Sources/IHM/Resources/Fonts/OpenSans-Semibold.ttf
new file mode 100644
index 0000000..9589fe4
Binary files /dev/null and b/Sources/IHM/Resources/Fonts/OpenSans-Semibold.ttf differ
diff --git a/Sources/IHM/Resources/Images/NavBar/dollar_black.png b/Sources/IHM/Resources/Images/NavBar/dollar_black.png
new file mode 100644
index 0000000..6972351
Binary files /dev/null and b/Sources/IHM/Resources/Images/NavBar/dollar_black.png differ
diff --git a/Sources/IHM/Resources/Images/NavBar/home_black.png b/Sources/IHM/Resources/Images/NavBar/home_black.png
new file mode 100644
index 0000000..4a2eee8
Binary files /dev/null and b/Sources/IHM/Resources/Images/NavBar/home_black.png differ
diff --git a/Sources/IHM/Resources/Images/NavBar/planification_black.png b/Sources/IHM/Resources/Images/NavBar/planification_black.png
new file mode 100644
index 0000000..83b2046
Binary files /dev/null and b/Sources/IHM/Resources/Images/NavBar/planification_black.png differ
diff --git a/Sources/IHM/Resources/Images/NavBar/settings_black.png b/Sources/IHM/Resources/Images/NavBar/settings_black.png
new file mode 100644
index 0000000..0a8f499
Binary files /dev/null and b/Sources/IHM/Resources/Images/NavBar/settings_black.png differ
diff --git a/Sources/IHM/Resources/Images/dotnet_bot.svg b/Sources/IHM/Resources/Images/dotnet_bot.svg
new file mode 100644
index 0000000..abfaff2
--- /dev/null
+++ b/Sources/IHM/Resources/Images/dotnet_bot.svg
@@ -0,0 +1,93 @@
+
diff --git a/Code/IHM/images/logo.png b/Sources/IHM/Resources/Images/logo_sans_fond.png
similarity index 100%
rename from Code/IHM/images/logo.png
rename to Sources/IHM/Resources/Images/logo_sans_fond.png
diff --git a/Sources/IHM/Resources/Raw/AboutAssets.txt b/Sources/IHM/Resources/Raw/AboutAssets.txt
new file mode 100644
index 0000000..15d6244
--- /dev/null
+++ b/Sources/IHM/Resources/Raw/AboutAssets.txt
@@ -0,0 +1,15 @@
+Any raw assets you want to be deployed with your application can be placed in
+this directory (and child directories). Deployment of the asset to your application
+is automatically handled by the following `MauiAsset` Build Action within your `.csproj`.
+
+
+
+These files will be deployed with you package and will be accessible using Essentials:
+
+ async Task LoadMauiAsset()
+ {
+ using var stream = await FileSystem.OpenAppPackageFileAsync("AboutAssets.txt");
+ using var reader = new StreamReader(stream);
+
+ var contents = reader.ReadToEnd();
+ }
diff --git a/Sources/IHM/Resources/Splash/logo.svg b/Sources/IHM/Resources/Splash/logo.svg
new file mode 100644
index 0000000..277e052
--- /dev/null
+++ b/Sources/IHM/Resources/Splash/logo.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/Sources/IHM/Resources/Splash/splash.svg b/Sources/IHM/Resources/Splash/splash.svg
new file mode 100644
index 0000000..21dfb25
--- /dev/null
+++ b/Sources/IHM/Resources/Splash/splash.svg
@@ -0,0 +1,8 @@
+
+
+
\ No newline at end of file
diff --git a/Sources/IHM/Resources/Styles/Colors.xaml b/Sources/IHM/Resources/Styles/Colors.xaml
new file mode 100644
index 0000000..245758b
--- /dev/null
+++ b/Sources/IHM/Resources/Styles/Colors.xaml
@@ -0,0 +1,44 @@
+
+
+
+
+ #512BD4
+ #DFD8F7
+ #2B0B98
+ White
+ Black
+ #E1E1E1
+ #C8C8C8
+ #ACACAC
+ #919191
+ #6E6E6E
+ #404040
+ #212121
+ #141414
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ #F7B548
+ #FFD590
+ #FFE5B9
+ #28C2D1
+ #7BDDEF
+ #C3F2F4
+ #3E8EED
+ #72ACF1
+ #A7CBF6
+
+
\ No newline at end of file
diff --git a/Sources/IHM/Resources/Styles/Styles.xaml b/Sources/IHM/Resources/Styles/Styles.xaml
new file mode 100644
index 0000000..1ec9d55
--- /dev/null
+++ b/Sources/IHM/Resources/Styles/Styles.xaml
@@ -0,0 +1,384 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Sources/IHM/Settings.xaml b/Sources/IHM/Settings.xaml
new file mode 100644
index 0000000..af6e452
--- /dev/null
+++ b/Sources/IHM/Settings.xaml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Sources/IHM/Settings.xaml.cs b/Sources/IHM/Settings.xaml.cs
new file mode 100644
index 0000000..b46d7af
--- /dev/null
+++ b/Sources/IHM/Settings.xaml.cs
@@ -0,0 +1,9 @@
+namespace IHM;
+
+public partial class Settings : ContentPage
+{
+ public Settings()
+ {
+ InitializeComponent();
+ }
+}
\ No newline at end of file
diff --git a/Sources/Modele/Banque.cs b/Sources/Modele/Banque.cs
new file mode 100644
index 0000000..698a523
--- /dev/null
+++ b/Sources/Modele/Banque.cs
@@ -0,0 +1,61 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Model
+{
+ public class Banque
+ {
+ public string Nom { get; private set; }
+ public string UrlSite { get; private set; }
+ public string UrlLogo { get; private set; }
+ public List ListeDesComptes { get; private set; } = new List();
+
+ public Banque(string nom, string urlSite, string urlLogo)
+ {
+ Nom = nom;
+ UrlSite = urlSite;
+ UrlLogo = urlLogo;
+ }
+
+ public Banque(string nom, string urlSite, string urlLogo, Listlescomptes)
+ {
+ Nom = nom;
+ UrlSite = urlSite;
+ UrlLogo = urlLogo;
+ ListeDesComptes = lescomptes;
+ }
+
+ public void AjouterCompte(Compte compte)
+ {
+ ListeDesComptes.Add(compte);
+ }
+
+ public void SupprimerCompte(Compte compte)
+ {
+ ListeDesComptes.Remove(compte);
+ }
+
+ public bool ExisteCompte(string s)
+ {
+ foreach (Compte compte in ListeDesComptes)
+ {
+ if (compte.Nom.Equals(s))
+ return true;
+ }
+ return false;
+ }
+ public Compte ReturnCompte(string s)
+ {
+ foreach (Compte compte in ListeDesComptes)
+ {
+ if (compte.Nom.Equals(s))
+ return compte;
+ }
+ throw new KeyNotFoundException();
+ }
+
+ }
+}
diff --git a/Sources/Modele/Compte.cs b/Sources/Modele/Compte.cs
new file mode 100644
index 0000000..6176571
--- /dev/null
+++ b/Sources/Modele/Compte.cs
@@ -0,0 +1,99 @@
+namespace Model
+{
+ public class Compte
+ {
+ public string Nom { get; private set; }
+ public double Solde { get; private set; }
+ public List LesOpe { get; private set; } = new List();
+ public List LesPla { get; private set; } = new List();
+ public List LesEch { get; private set; } = new List();
+ public Compte(string nom, double solde)
+ {
+ Nom = nom;
+ Solde = solde;
+ LesOpe = new List();
+ LesPla = new List();
+ LesEch = new List();
+ }
+ public Compte(string nom, double solde, List lesOpe)
+ {
+ Nom = nom;
+ Solde = solde;
+ LesOpe = lesOpe;
+ }
+ public Compte(string nom, double solde, List lesOpe, List lesPla)
+ {
+ Nom = nom;
+ Solde = solde;
+ LesOpe = lesOpe;
+ LesPla = lesPla;
+ }
+ public Compte(string nom, double solde, List lesOpe, List lesPla, List lesEch)
+ {
+ Nom = nom;
+ Solde = solde;
+ LesOpe = lesOpe;
+ LesPla = lesPla;
+ LesEch = lesEch;
+ }
+ public void modifierSolde(double s)
+ {
+ Solde = s;
+ }
+
+ public void ajouterOperation(Operation o)
+ {
+ if (o == null) throw new NullReferenceException();
+ LesOpe.Add(o);
+ }
+
+ public void cacherOperation(Operation o)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void supprimerOperation(Operation o)
+ {
+ LesOpe.Remove(o);
+ }
+
+ public void ajoutEcheance(Echeance e)
+ {
+ if(e == null) throw new NullReferenceException();
+ LesEch.Add(e);
+ }
+
+ public void supprimerEcheance(Echeance e)
+ {
+ LesEch.Remove(e);
+ }
+
+ public void ajoutPlannification(Planification p)
+ {
+ if(p == null) throw new NullReferenceException();
+ LesPla.Add(p);
+ }
+
+ public void supprimerPlannification(Planification p)
+ {
+ LesPla.Remove(p);
+ }
+
+ public override bool Equals(object obj)
+ {
+
+ if (obj == null || GetType() != obj.GetType())
+ {
+ return false;
+ }
+
+ return base.Equals(obj);
+ }
+
+ public override int GetHashCode()
+ {
+ return base.GetHashCode();
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/Sources/Modele/Devises.cs b/Sources/Modele/Devises.cs
new file mode 100644
index 0000000..aff53dd
--- /dev/null
+++ b/Sources/Modele/Devises.cs
@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Model
+{
+ public enum Devises
+ {
+ Livre_sterling,
+ Rouble,
+ Euro,
+ Yen,
+ Dollars
+ }
+}
diff --git a/Sources/Modele/Echeance.cs b/Sources/Modele/Echeance.cs
new file mode 100644
index 0000000..e8219d7
--- /dev/null
+++ b/Sources/Modele/Echeance.cs
@@ -0,0 +1,12 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Model
+{
+ public class Echeance
+ {
+ }
+}
diff --git a/Sources/Modele/Email.cs b/Sources/Modele/Email.cs
new file mode 100644
index 0000000..4b54c98
--- /dev/null
+++ b/Sources/Modele/Email.cs
@@ -0,0 +1,34 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net.Mail;
+using System.Net;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Model
+{
+ public class Email
+ {
+ public static void CreateMail(string destinator, string code)
+ {
+ NetworkCredential login;
+ SmtpClient client;
+ MailMessage msg;
+
+ login = new NetworkCredential("consEco.team@gmail.com", "wtowzznfclupjgfl");
+ client = new SmtpClient("smtp.gmail.com");
+ client.Port = 587;
+ client.EnableSsl = true;
+ client.Credentials = login;
+ msg = new MailMessage { From = new MailAddress("consEco.team@gmail.com", "ConsEco", Encoding.UTF8) };
+ msg.To.Add(destinator);
+ msg.Subject = "sujet";
+ msg.Body = code;
+ msg.BodyEncoding = Encoding.UTF8;
+ msg.IsBodyHtml = true;
+ msg.Priority = MailPriority.Normal;
+ client.SendAsync(msg, "sending ...");
+ }
+ }
+}
diff --git a/Sources/Modele/Hash.cs b/Sources/Modele/Hash.cs
new file mode 100644
index 0000000..2488f66
--- /dev/null
+++ b/Sources/Modele/Hash.cs
@@ -0,0 +1,45 @@
+using System;
+using System.Collections;
+using System.Diagnostics;
+using System.Runtime.CompilerServices;
+using System.Security.Cryptography;
+using System.Text;
+
+namespace Model
+{
+ public class Hash
+ {
+ public string CreateHashCode(string mdp)
+
+ {
+ string hashString = "";
+ byte[] hash;
+ using (SHA512 shaM = new SHA512Managed())
+ {
+ hash = shaM.ComputeHash(Encoding.UTF8.GetBytes(mdp));
+ }
+ foreach (byte b in hash)
+ {
+ hashString = hashString + b;
+ }
+ return hashString;
+ }
+
+ public bool IsEqualHash(string mdpBdd, string mdpSent)
+ {
+ string hashedMdpSent = CreateHashCode(mdpSent);
+ return hashedMdpSent.Equals(mdpBdd);
+ }
+
+ private string ByteArrayToString(byte[] arrInput)
+ {
+ int i;
+ StringBuilder sOutput = new StringBuilder(arrInput.Length);
+ for (i = 0; i < arrInput.Length; i++)
+ {
+ sOutput.Append(arrInput[i].ToString("X2"));
+ }
+ return sOutput.ToString();
+ }
+ }
+}
diff --git a/Sources/Modele/IPersistanceManager.cs b/Sources/Modele/IPersistanceManager.cs
new file mode 100644
index 0000000..207b624
--- /dev/null
+++ b/Sources/Modele/IPersistanceManager.cs
@@ -0,0 +1,21 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Model
+{
+ public interface IPersistanceManager
+ {
+ string LoadInscrit(string id,string mdp);
+ void SupprimerInscritBdd(Inscrit inscrit);
+ void SupprimerBanqueBdd(Inscrit inscrit, Banque banque);
+ void SupprimerToutesBanquesBdd(Inscrit inscrit);
+ void CreateInscrit(Inscrit inscrit);
+ string LastInscrit();
+ bool ExistEmail(string mail);
+ void ChangePasswordBdd(string mail, string newMdp);
+ string RecupMdpBdd(string mail);
+ }
+}
diff --git a/Sources/Modele/Inscrit.cs b/Sources/Modele/Inscrit.cs
new file mode 100644
index 0000000..7e05712
--- /dev/null
+++ b/Sources/Modele/Inscrit.cs
@@ -0,0 +1,99 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Text.RegularExpressions;
+using Model;
+using System.Threading.Tasks;
+
+
+namespace Model
+{
+ public class Inscrit
+ {
+ public Hash hash = new Hash();
+
+ public string Id { get; private set; }
+ public string Nom { get; private set; }
+
+ public string Mail
+ {
+ get => mail;
+ set
+ {
+ if (value.Length == 0)
+ {
+ throw new InvalidMailException(value, "Longueur d'un mail doit être superieur a 0");
+ }
+ if (!Regex.IsMatch(value, "(@)(.+)"))
+ {
+ throw new InvalidMailException(value, "Un mail doit contenir le symbole '@'");
+ }
+ mail = value;
+ }
+ }
+ private string mail;
+
+ public string Prenom { get; private set; }
+
+ public string Mdp
+ {
+ get => mdp;
+ set
+ {
+ if (value.Length <= 8)
+ {
+ throw new InvalidPasswordException(value, "La longeur d'un mot de passe doit être obligatoirement superieure a 8");
+ }
+ if (!Regex.IsMatch(value, "[A-Z]+"))
+ {
+ throw new InvalidPasswordException(value, "Le mot de passe doit contenir au moins une lettre majuscule");
+ }
+ if (!Regex.IsMatch(value, "[0-9]+"))
+ {
+ throw new InvalidPasswordException(value, "Le mot de passe doit contenir au moins un chiffre");
+ }
+ mdp = value;
+ }
+ }
+ private string mdp;
+
+ public double SoldeTotal { get; private set; }
+ public Devises Dev { get; private set; }
+ public List LesBanques { get; private set; } = new List();
+
+ public Inscrit(string id, string nom, string mail, string prenom, string mdp, double soldeTotal = 0)
+ {
+ Id = id;
+ Nom = nom;
+ Mail = mail;
+ Prenom = prenom;
+ Mdp = mdp;
+ SoldeTotal = soldeTotal;
+ }
+ public Inscrit(string id, string nom, string mail, string prenom, string mdp, double soldeTotal, List lesbanques)
+ : this(id, nom, mail, prenom, mdp, soldeTotal)
+ {
+ LesBanques = lesbanques;
+ }
+
+
+
+ public void ajouterBanque(Banque banque)
+ {
+ LesBanques.Add(banque);
+ }
+
+ public void SupprimerBanque(Banque banque)
+ {
+ LesBanques.Remove(banque);
+
+ }
+
+ public void ChoisirDevise(Devises devise)
+ {
+ Dev = devise;
+ }
+
+ }
+}
diff --git a/Sources/Modele/InvalidMailException.cs b/Sources/Modele/InvalidMailException.cs
new file mode 100644
index 0000000..60a71ae
--- /dev/null
+++ b/Sources/Modele/InvalidMailException.cs
@@ -0,0 +1,32 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Model
+{
+ public class InvalidMailException : ArgumentException
+ {
+ private string Mail { get; set; }
+ public InvalidMailException():base()
+ { }
+
+ public InvalidMailException(string mail):
+ base(String.Format("{0} n'est pas un mail valide.", mail))
+ {
+ Mail = mail;
+ }
+ public InvalidMailException(string mail, string message):
+ base(message)
+ {
+ Mail = mail;
+ }
+
+ public InvalidMailException(string mail, string message, Exception innerException) :
+ base(message, innerException)
+ {
+ Mail = mail;
+ }
+ }
+}
diff --git a/Sources/Modele/InvalidPasswordException.cs b/Sources/Modele/InvalidPasswordException.cs
new file mode 100644
index 0000000..46e022f
--- /dev/null
+++ b/Sources/Modele/InvalidPasswordException.cs
@@ -0,0 +1,32 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Model
+{
+ public class InvalidPasswordException : ArgumentException
+ {
+ private string Mdp { get; set; }
+ public InvalidPasswordException() : base()
+ { }
+
+ public InvalidPasswordException(string mdp) :
+ base(String.Format("{0} n'est pas un mot de passe valide.", mdp))
+ {
+ Mdp = mdp;
+ }
+ public InvalidPasswordException(string mdp, string message) :
+ base(message)
+ {
+ Mdp = mdp;
+ }
+
+ public InvalidPasswordException(string mdp, string message, Exception innerException) :
+ base(message, innerException)
+ {
+ Mdp = mdp;
+ }
+ }
+}
diff --git a/Sources/Modele/Manager.cs b/Sources/Modele/Manager.cs
new file mode 100644
index 0000000..f771a24
--- /dev/null
+++ b/Sources/Modele/Manager.cs
@@ -0,0 +1,81 @@
+using System.ComponentModel;
+
+namespace Model
+{
+ public class Manager : INotifyPropertyChanged
+ {
+ public event PropertyChangedEventHandler PropertyChanged;
+ public IPersistanceManager Pers { get; private set; }
+
+ public string SelectedInscrit { get; set; }
+
+ public Hash hash = new Hash();
+
+ public Banque SelectedBanque
+ {
+ get => selectedBanque;
+ set
+ {
+ if(selectedBanque != value)
+ {
+ selectedBanque = value;
+ OnPropertyChanged(nameof(selectedBanque));
+ }
+ }
+ }
+ private Banque selectedBanque;
+
+ void OnPropertyChanged(string propertyName) => PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
+
+ public Manager(IPersistanceManager persistance)
+ {
+ Pers = persistance;
+ }
+
+ public void SupprimerInscritBdd(Inscrit i)
+ {
+ Pers.SupprimerInscritBdd(i);
+ }
+
+ public void LoadInscrit(string id, string mdp)
+ {
+ SelectedInscrit = Pers.LoadInscrit(id, mdp);
+ }
+
+ public void supprimerToutesBanquesBdd(Inscrit inscrit)
+ {
+ Pers.SupprimerToutesBanquesBdd(inscrit);
+ }
+
+ public void createInscrit(Inscrit inscrit)
+ {
+ Pers.CreateInscrit(inscrit);
+ }
+
+ public string lastInscrit()
+ {
+ return Pers.LastInscrit();
+ }
+
+ public bool existEmail(string mail)
+ {
+ return Pers.ExistEmail(mail);
+ }
+
+ public void changePasswordBdd(string mail, string newMdp)
+ {
+ Pers.ChangePasswordBdd(mail, newMdp);
+ }
+
+ public string recupMdpBdd(string mail)
+ {
+ return Pers.RecupMdpBdd(mail);
+ }
+
+ public bool isEqualHash(string mdpBdd, string mdpSent)
+ {
+ return hash.IsEqualHash(mdpBdd, mdpSent);
+ }
+ }
+
+}
diff --git a/Sources/Modele/Model.csproj b/Sources/Modele/Model.csproj
new file mode 100644
index 0000000..5e4631e
--- /dev/null
+++ b/Sources/Modele/Model.csproj
@@ -0,0 +1,20 @@
+
+
+
+ net6.0;net6.0-android;net6.0-ios;net6.0-maccatalyst
+ $(TargetFrameworks);net6.0-windows10.0.19041.0
+
+
+ true
+ true
+ enable
+
+ 14.2
+ 14.0
+ 21.0
+ 10.0.17763.0
+ 10.0.17763.0
+ 6.5
+
+
+
\ No newline at end of file
diff --git a/Sources/Modele/Model_CI.csproj b/Sources/Modele/Model_CI.csproj
new file mode 100644
index 0000000..bfc0f18
--- /dev/null
+++ b/Sources/Modele/Model_CI.csproj
@@ -0,0 +1,15 @@
+
+
+
+ net6.0
+ enable
+ enable
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Sources/Modele/Operation.cs b/Sources/Modele/Operation.cs
new file mode 100644
index 0000000..9384c33
--- /dev/null
+++ b/Sources/Modele/Operation.cs
@@ -0,0 +1,12 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Model
+{
+ public class Operation
+ {
+ }
+}
diff --git a/Sources/Modele/Planification.cs b/Sources/Modele/Planification.cs
new file mode 100644
index 0000000..58b70d8
--- /dev/null
+++ b/Sources/Modele/Planification.cs
@@ -0,0 +1,12 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Model
+{
+ public class Planification
+ {
+ }
+}
diff --git a/Sources/Modele/Platforms/Android/PlatformClass1.cs b/Sources/Modele/Platforms/Android/PlatformClass1.cs
new file mode 100644
index 0000000..ecc58a2
--- /dev/null
+++ b/Sources/Modele/Platforms/Android/PlatformClass1.cs
@@ -0,0 +1,7 @@
+namespace Modele
+{
+ // All the code in this file is only included on Android.
+ public class PlatformClass1
+ {
+ }
+}
\ No newline at end of file
diff --git a/Sources/Modele/Platforms/MacCatalyst/PlatformClass1.cs b/Sources/Modele/Platforms/MacCatalyst/PlatformClass1.cs
new file mode 100644
index 0000000..e6a2665
--- /dev/null
+++ b/Sources/Modele/Platforms/MacCatalyst/PlatformClass1.cs
@@ -0,0 +1,7 @@
+namespace Modele
+{
+ // All the code in this file is only included on Mac Catalyst.
+ public class PlatformClass1
+ {
+ }
+}
\ No newline at end of file
diff --git a/Sources/Modele/Platforms/Tizen/PlatformClass1.cs b/Sources/Modele/Platforms/Tizen/PlatformClass1.cs
new file mode 100644
index 0000000..870b22d
--- /dev/null
+++ b/Sources/Modele/Platforms/Tizen/PlatformClass1.cs
@@ -0,0 +1,9 @@
+using System;
+
+namespace Modele
+{
+ // All the code in this file is only included on Tizen.
+ public class PlatformClass1
+ {
+ }
+}
\ No newline at end of file
diff --git a/Sources/Modele/Platforms/Windows/PlatformClass1.cs b/Sources/Modele/Platforms/Windows/PlatformClass1.cs
new file mode 100644
index 0000000..368a29a
--- /dev/null
+++ b/Sources/Modele/Platforms/Windows/PlatformClass1.cs
@@ -0,0 +1,7 @@
+namespace Modele
+{
+ // All the code in this file is only included on Windows.
+ public class PlatformClass1
+ {
+ }
+}
\ No newline at end of file
diff --git a/Sources/Modele/Platforms/iOS/PlatformClass1.cs b/Sources/Modele/Platforms/iOS/PlatformClass1.cs
new file mode 100644
index 0000000..1a10e0c
--- /dev/null
+++ b/Sources/Modele/Platforms/iOS/PlatformClass1.cs
@@ -0,0 +1,7 @@
+namespace Modele
+{
+ // All the code in this file is only included on iOS.
+ public class PlatformClass1
+ {
+ }
+}
\ No newline at end of file
diff --git a/Sources/Modele/Stub.cs b/Sources/Modele/Stub.cs
new file mode 100644
index 0000000..ea68737
--- /dev/null
+++ b/Sources/Modele/Stub.cs
@@ -0,0 +1,46 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Model
+{
+ public class Stub
+ {
+ public List Banques = new();
+ public List Inscrits = new();
+ public List Comptes = new();
+
+
+
+ // ajouter load all pour tout les inscrits
+
+ public List LoadInscrit()
+ {
+ Inscrits.Add(new("00001", "Evard", "lucasevard@gmail.com","Lucas","test",10,LoadBanques()));
+ Inscrits.Add(new("00002", "Livet", "hugolivet@gmail.com", "Hugo", "test", 280,LoadBanques()));
+ Inscrits.Add(new("00003", "Smith", "smith@gmail.com", "Luke", "test", 150,LoadBanques()));
+ Inscrits.Add(new("00004", "Jean", "jean@gmail.com", "sylvain", "test", 410,LoadBanques()));
+ Inscrits.Add(new("00005", "Franc", "franc@gmail.com", "Julie", "test", 820,LoadBanques()));
+ Inscrits.Add(new("00006", "March", "march@gmail.com", "bastien", "test", 1120,LoadBanques()));
+ return Inscrits;
+ }
+ public List LoadBanques()
+ {
+ Banques.Add(new("BNP Paribas", "https://mabanque.bnpparibas/", "https://logos-marques.com/wp-content/uploads/2020/12/BNP-Paribas-logo.png",LoadCompte()));
+ Banques.Add(new("Crédit Agricole", "https://www.credit-agricole.fr", "https://yt3.ggpht.com/a/AGF-l7_mEfX2eQaGm8GefLOg5ZMRciNw-pESE3gUWg=s900-c-k-c0xffffffff-no-rj-mo",LoadCompte()));
+ return Banques;
+ }
+ public List LoadCompte()
+ {
+ Comptes.Add(new("Livret A", 1500));
+ Comptes.Add(new("Compte Courant", 2000));
+ Comptes.Add(new("PEL", 22000));
+ return Comptes;
+ }
+
+
+ }
+}
+
diff --git a/Sources/Solution.sln b/Sources/Solution.sln
new file mode 100644
index 0000000..a829154
--- /dev/null
+++ b/Sources/Solution.sln
@@ -0,0 +1,66 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.3.32929.385
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IHM", "IHM\IHM.csproj", "{C74F76BC-84E7-4ECA-BC51-796E62ADBDDD}"
+ ProjectSection(ProjectDependencies) = postProject
+ {15AF28C8-D89F-4A30-8DA9-4C561E739ED6} = {15AF28C8-D89F-4A30-8DA9-4C561E739ED6}
+ {884DB422-6E6E-4A83-9B86-412F5F80D01F} = {884DB422-6E6E-4A83-9B86-412F5F80D01F}
+ EndProjectSection
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Model", "Modele\Model.csproj", "{15AF28C8-D89F-4A30-8DA9-4C561E739ED6}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Data", "Data\Data.csproj", "{884DB422-6E6E-4A83-9B86-412F5F80D01F}"
+ ProjectSection(ProjectDependencies) = postProject
+ {15AF28C8-D89F-4A30-8DA9-4C561E739ED6} = {15AF28C8-D89F-4A30-8DA9-4C561E739ED6}
+ EndProjectSection
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestsUnitaires", "TestsUnitaires\TestsUnitaires.csproj", "{5CA80554-9ED6-4E0B-B0C0-48D214591339}"
+ ProjectSection(ProjectDependencies) = postProject
+ {15AF28C8-D89F-4A30-8DA9-4C561E739ED6} = {15AF28C8-D89F-4A30-8DA9-4C561E739ED6}
+ {884DB422-6E6E-4A83-9B86-412F5F80D01F} = {884DB422-6E6E-4A83-9B86-412F5F80D01F}
+ EndProjectSection
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestFonctionnel", "TestFonctionnel\TestFonctionnel.csproj", "{939D1174-043E-4435-B138-1CA168A675A0}"
+ ProjectSection(ProjectDependencies) = postProject
+ {15AF28C8-D89F-4A30-8DA9-4C561E739ED6} = {15AF28C8-D89F-4A30-8DA9-4C561E739ED6}
+ {884DB422-6E6E-4A83-9B86-412F5F80D01F} = {884DB422-6E6E-4A83-9B86-412F5F80D01F}
+ EndProjectSection
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {C74F76BC-84E7-4ECA-BC51-796E62ADBDDD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {C74F76BC-84E7-4ECA-BC51-796E62ADBDDD}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {C74F76BC-84E7-4ECA-BC51-796E62ADBDDD}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
+ {C74F76BC-84E7-4ECA-BC51-796E62ADBDDD}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {C74F76BC-84E7-4ECA-BC51-796E62ADBDDD}.Release|Any CPU.Build.0 = Release|Any CPU
+ {C74F76BC-84E7-4ECA-BC51-796E62ADBDDD}.Release|Any CPU.Deploy.0 = Release|Any CPU
+ {15AF28C8-D89F-4A30-8DA9-4C561E739ED6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {15AF28C8-D89F-4A30-8DA9-4C561E739ED6}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {15AF28C8-D89F-4A30-8DA9-4C561E739ED6}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {15AF28C8-D89F-4A30-8DA9-4C561E739ED6}.Release|Any CPU.Build.0 = Release|Any CPU
+ {884DB422-6E6E-4A83-9B86-412F5F80D01F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {884DB422-6E6E-4A83-9B86-412F5F80D01F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {884DB422-6E6E-4A83-9B86-412F5F80D01F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {884DB422-6E6E-4A83-9B86-412F5F80D01F}.Release|Any CPU.Build.0 = Release|Any CPU
+ {5CA80554-9ED6-4E0B-B0C0-48D214591339}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {5CA80554-9ED6-4E0B-B0C0-48D214591339}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {5CA80554-9ED6-4E0B-B0C0-48D214591339}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {5CA80554-9ED6-4E0B-B0C0-48D214591339}.Release|Any CPU.Build.0 = Release|Any CPU
+ {939D1174-043E-4435-B138-1CA168A675A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {939D1174-043E-4435-B138-1CA168A675A0}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {939D1174-043E-4435-B138-1CA168A675A0}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {939D1174-043E-4435-B138-1CA168A675A0}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {4D47853B-D1A3-49A5-84BA-CD2DC65FD105}
+ EndGlobalSection
+EndGlobal
diff --git a/Code/TestFonctionnel/Program.cs b/Sources/TestFonctionnel/Program.cs
similarity index 98%
rename from Code/TestFonctionnel/Program.cs
rename to Sources/TestFonctionnel/Program.cs
index 83fa4f4..3751555 100644
--- a/Code/TestFonctionnel/Program.cs
+++ b/Sources/TestFonctionnel/Program.cs
@@ -1,2 +1,2 @@
-// See https://aka.ms/new-console-template for more information
-Console.WriteLine("Hello, World!");
+// See https://aka.ms/new-console-template for more information
+Console.WriteLine("Hello, World!");
diff --git a/Code/TestFonctionnel/TestFonctionnel.csproj b/Sources/TestFonctionnel/TestFonctionnel.csproj
similarity index 95%
rename from Code/TestFonctionnel/TestFonctionnel.csproj
rename to Sources/TestFonctionnel/TestFonctionnel.csproj
index 40c60dd..74abf5c 100644
--- a/Code/TestFonctionnel/TestFonctionnel.csproj
+++ b/Sources/TestFonctionnel/TestFonctionnel.csproj
@@ -1,10 +1,10 @@
-
-
-
- Exe
- net6.0
- enable
- enable
-
-
-
+
+
+
+ Exe
+ net6.0
+ enable
+ enable
+
+
+
diff --git a/Code/Model/Model.csproj b/Sources/TestFonctionnel/TestFonctionnel_CI.csproj
similarity index 86%
rename from Code/Model/Model.csproj
rename to Sources/TestFonctionnel/TestFonctionnel_CI.csproj
index bafd05b..74abf5c 100644
--- a/Code/Model/Model.csproj
+++ b/Sources/TestFonctionnel/TestFonctionnel_CI.csproj
@@ -1,9 +1,10 @@
-
-
-
- net6.0
- enable
- enable
-
-
-
+
+
+
+ Exe
+ net6.0
+ enable
+ enable
+
+
+
diff --git a/Sources/TestsUnitaires/TestUnitBanque.cs b/Sources/TestsUnitaires/TestUnitBanque.cs
new file mode 100644
index 0000000..156159a
--- /dev/null
+++ b/Sources/TestsUnitaires/TestUnitBanque.cs
@@ -0,0 +1,73 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Model;
+
+namespace TestsUnitaires
+{
+ public class TestUnitBanque
+ {
+ Compte tc = new("Livret A", 16956);
+ Banque test = new("BNP Paribas", "https://mabanque.bnpparibas/", "https://logos-marques.com/wp-content/uploads/2020/12/BNP-Paribas-logo.png");
+ [Fact]
+ public void testConstructeur1()
+ {
+ Assert.NotNull(test);
+ Assert.Equal("BNP Paribas", test.Nom);
+ Assert.NotEqual("https://mabanque.bnpparibas/", test.Nom);
+ Assert.Equal("https://mabanque.bnpparibas/", test.UrlSite);
+ Assert.Equal("https://logos-marques.com/wp-content/uploads/2020/12/BNP-Paribas-logo.png", test.UrlLogo);
+ }
+ [Fact]
+ public void testConstructeur2()
+ {
+ List listeCompte = new();
+ listeCompte.Add(tc);
+ Banque test2 = new("BNP Paribas", "https://mabanque.bnpparibas/", "https://logos-marques.com/wp-content/uploads/2020/12/BNP-Paribas-logo.png", listeCompte);
+ Assert.NotNull(test);
+ Assert.NotNull(test.ListeDesComptes);
+ Assert.Equal("BNP Paribas", test.Nom);
+ Assert.NotEqual("https://mabanque.bnpparibas/", test.Nom);
+ Assert.Equal("https://mabanque.bnpparibas/", test.UrlSite);
+ Assert.Equal("https://logos-marques.com/wp-content/uploads/2020/12/BNP-Paribas-logo.png", test.UrlLogo);
+ Assert.Contains(tc,test2.ListeDesComptes);
+ }
+ [Fact]
+ public void testAjouterCompte()
+ {
+ Assert.NotNull(test.ListeDesComptes);
+ test.AjouterCompte(tc);
+ Assert.Contains(tc, test.ListeDesComptes);
+ }
+ [Fact]
+ public void testSupprimerCompte()
+ {
+ Assert.NotNull(test.ListeDesComptes);
+ test.AjouterCompte(tc);
+ Assert.Contains(tc, test.ListeDesComptes);
+ test.SupprimerCompte(tc);
+ Assert.DoesNotContain(tc, test.ListeDesComptes);
+ }
+ [Fact]
+ public void testExisteCompte()
+ {
+ List listeCompte = new();
+ listeCompte.Add(tc);
+ Banque test2 = new("BNP Paribas", "https://mabanque.bnpparibas/", "https://logos-marques.com/wp-content/uploads/2020/12/BNP-Paribas-logo.png", listeCompte);
+ Assert.True(test2.ExisteCompte("Livret A"));
+ }
+ [Fact]
+ public void testReturnCompte()
+ {
+ List listeCompte = new();
+ listeCompte.Add(tc);
+ Banque test2 = new("BNP Paribas", "https://mabanque.bnpparibas/", "https://logos-marques.com/wp-content/uploads/2020/12/BNP-Paribas-logo.png", listeCompte);
+ Assert.True(test2.ExisteCompte("Livret A"));
+ Assert.Equal(tc, test2.ReturnCompte("Livret A"));
+ }
+
+
+ }
+}
\ No newline at end of file
diff --git a/Sources/TestsUnitaires/TestUnitCompte.cs b/Sources/TestsUnitaires/TestUnitCompte.cs
new file mode 100644
index 0000000..737712b
--- /dev/null
+++ b/Sources/TestsUnitaires/TestUnitCompte.cs
@@ -0,0 +1,36 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Model;
+
+namespace TestsUnitaires
+{
+ public class TestUnitCompte
+ {
+
+ [Fact]
+ public void TestConstructeurCompte()
+ {
+ Compte c1 = new("Livret A", 234);
+ Compte c2 = new("&e23R_te7", 1245.34);
+ Assert.Equal("Livret A", c1.Nom);
+ Assert.Equal("&e23R_te7", c2.Nom);
+ Assert.Equal(234, c1.Solde);
+ Assert.Equal(1245.34, c2.Solde);
+ }
+
+ [Fact]
+ public void testSupprimerBanque()
+ {
+ Banque bq = new Banque("Crédit Agricole", "https://creditagricole.fr", "https://yt3.ggpht.com/a/AGF-l7_mEfX2eQaGm8GefLOg5ZMRciNw-pESE3gUWg=s900-c-k-c0xffffffff-no-rj-mo");
+ Inscrit i1 = new Inscrit("A1001", "Smith", "smith@gmail.com", "luke", "test20000aA", 500);
+ Assert.NotNull(i1.LesBanques);
+ i1.ajouterBanque(bq);
+ Assert.Contains(bq, i1.LesBanques);
+ i1.SupprimerBanque(bq);
+ Assert.DoesNotContain(bq, i1.LesBanques);
+ }
+ }
+}
diff --git a/Sources/TestsUnitaires/TestUnitInscrit.cs b/Sources/TestsUnitaires/TestUnitInscrit.cs
new file mode 100644
index 0000000..646f256
--- /dev/null
+++ b/Sources/TestsUnitaires/TestUnitInscrit.cs
@@ -0,0 +1,96 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Model;
+
+namespace TestsUnitaires
+{
+ public class TestUnitInscrit
+ {
+ [Fact]
+ public void testCtorInscrit()
+ {
+ Inscrit i = new Inscrit("I001", "LIVET", "Hugo.LIVET@etu.uca.fr", "Hugo", "Tu Sauras Passss:)1215", 2000);
+ Assert.NotNull(i);
+ Assert.Equal("I001", i.Id);
+ Assert.Equal("LIVET", i.Nom);
+ Assert.Equal("Hugo.LIVET@etu.uca.fr", i.Mail);
+ Assert.Equal("Hugo", i.Prenom);
+ Assert.Equal("Tu Sauras Passss:)1215", i.Mdp);
+ Assert.Equal(2000, i.SoldeTotal);
+ }
+
+ [Fact]
+ public void testCtorInscrit2()
+ {
+ List lesBanques = new List();
+ Banque b = new Banque("CA", "enavantouioui.fr", "NaN.fr");
+ lesBanques.Add(b);
+ Inscrit i = new Inscrit("I001", "LIVET", "Hugo.LIVET@etu.uca.fr", "Hugo", "Tu Sauras Passss:)1215", 2000, lesBanques);
+ Assert.NotNull(i);
+ Assert.Equal("I001", i.Id);
+ Assert.Equal("LIVET", i.Nom);
+ Assert.Equal("Hugo.LIVET@etu.uca.fr", i.Mail);
+ Assert.Equal("Hugo", i.Prenom);
+ Assert.Equal("Tu Sauras Passss:)1215", i.Mdp);
+ Assert.Equal(2000, i.SoldeTotal);
+ Assert.Contains(b, i.LesBanques);
+ lesBanques.Remove(b);
+ Assert.DoesNotContain(b, i.LesBanques);
+ }
+
+ [Fact]
+ public void testAjoutBanqueInscrit()
+ {
+ Banque b = new Banque("CA", "enavantouioui.fr", "NaN.fr");
+ Inscrit i = new Inscrit("I001", "LIVET", "Hugo.LIVET@etu.uca.fr", "Hugo", "Tu Sauras Passss:)1215", 2000);
+ i.ajouterBanque(b);
+ Assert.Contains(b, i.LesBanques);
+ }
+
+ [Fact]
+ public void testSupprimerBanqueInscrit()
+ {
+ Banque b = new Banque("CA", "enavantouioui.fr", "NaN.fr");
+ Inscrit i = new Inscrit("I001", "LIVET", "Hugo.LIVET@etu.uca.fr", "Hugo", "Tu Sauras Passss:)1215", 2000);
+ i.ajouterBanque(b);
+ i.SupprimerBanque(b);
+ Assert.DoesNotContain(b, i.LesBanques);
+ i.ajouterBanque(new Banque("CA", "enavantouioui.fr", "NaN.fr"));
+ i.SupprimerBanque(new Banque("CA", "enavantouioui.fr", "NaN.fr"));
+ Assert.DoesNotContain(new Banque("CA", "enavantouioui.fr", "NaN.fr"), i.LesBanques);
+ }
+
+ [Fact]
+ public void testChoixDeviseInscrit()
+ {
+ Inscrit i = new Inscrit("I001", "LIVET", "Hugo.LIVET@etu.uca.fr", "Hugo", "Tu Sauras Passss:)1215", 2000);
+ i.ChoisirDevise(Devises.Euro);
+ Assert.Equal(Devises.Euro, i.Dev);
+ }
+
+ [Theory]
+ [InlineData("I000001", "LIVET", "a@a.fr", "Hugo", "123Soleil@azerty", 20000, true)]//OK
+ [InlineData("I000002", "LIVET", "aa.fr", "Hugo", "123Soleil@azerty", 20000, false)]//Mail invalide psk pas de @
+ [InlineData("I000003", "LIVET", "a@a.fr", "Hugo", "123soleil@azerty", 20000, false)]//mdp Invalide psk mdp sans Maj
+ [InlineData("I000004", "LIVET", "a@a.fr", "Hugo", "Soleil@azerty", 20000, false)]//mdp Invalide psk pas de chiffres
+ public void CtorInscrit2TU(string id, string nom, string mail, string prenom, string mdp, double solde, bool notShouldThrowException)
+ {
+ if (!notShouldThrowException)
+ {
+ Assert.ThrowsAny(() => new Inscrit(id, nom, mail, prenom, mdp, solde));
+ return;
+ }
+ Inscrit i = new Inscrit(id, nom, mail, prenom, mdp, solde);
+ Assert.NotNull(i);
+ Assert.Equal(id, i.Id);
+ Assert.Equal(nom, i.Nom);
+ Assert.Equal(mail, i.Mail);
+ Assert.Equal(prenom, i.Prenom);
+ Assert.Equal(mdp, i.Mdp);
+ Assert.Equal(solde, i.SoldeTotal);
+ }
+ }
+}
diff --git a/Sources/TestsUnitaires/TestUnitPgSQL.cs b/Sources/TestsUnitaires/TestUnitPgSQL.cs
new file mode 100644
index 0000000..545f3a6
--- /dev/null
+++ b/Sources/TestsUnitaires/TestUnitPgSQL.cs
@@ -0,0 +1,23 @@
+using LinqToPgSQL;
+using Model;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace TestsUnitaires
+{
+ public class TestUnitPgSQL
+ {
+ [Fact]
+ public void testLoadInscrit()
+ {
+ Manager m = new Manager(new PersLinqToPgSQL());
+ //Assert.Null(m.SelectedBanque);
+ //m.LoadInscrit("lucasevard@gmail.com", "test");
+ //Assert.Equal(m.SelectedInscrits, "00001");
+ }
+
+ }
+}
diff --git a/Code/TestsUnitaires/TestsUnitaires.csproj b/Sources/TestsUnitaires/TestsUnitaires.csproj
similarity index 82%
rename from Code/TestsUnitaires/TestsUnitaires.csproj
rename to Sources/TestsUnitaires/TestsUnitaires.csproj
index 89d8ebd..290d390 100644
--- a/Code/TestsUnitaires/TestsUnitaires.csproj
+++ b/Sources/TestsUnitaires/TestsUnitaires.csproj
@@ -1,24 +1,29 @@
-
-
-
- net6.0
- enable
- enable
-
- false
-
-
-
-
-
-
- runtime; build; native; contentfiles; analyzers; buildtransitive
- all
-
-
- runtime; build; native; contentfiles; analyzers; buildtransitive
- all
-
-
-
-
+
+
+
+ net6.0
+ enable
+ enable
+
+ false
+
+
+
+
+
+
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+ all
+
+
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+ all
+
+
+
+
+
+
+
+
+
diff --git a/Sources/TestsUnitaires/TestsUnitaires_CI.csproj b/Sources/TestsUnitaires/TestsUnitaires_CI.csproj
new file mode 100644
index 0000000..eba0372
--- /dev/null
+++ b/Sources/TestsUnitaires/TestsUnitaires_CI.csproj
@@ -0,0 +1,29 @@
+
+
+
+ net6.0
+ enable
+ enable
+
+ false
+
+
+
+
+
+
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+ all
+
+
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+ all
+
+
+
+
+
+
+
+
+
diff --git a/Code/TestsUnitaires/Usings.cs b/Sources/TestsUnitaires/Usings.cs
similarity index 100%
rename from Code/TestsUnitaires/Usings.cs
rename to Sources/TestsUnitaires/Usings.cs