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/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/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 @@ - - - - - - - - - - - - - - - - - - - \ 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 @@ + + + +