Transfert du dépot ConsEcoMAUI -> ConsEco (Tout le groupe a participé au dépot ConsEcoMAUI)
continuous-integration/drone/push Build is failing Details

pull/103/head
Hugo LIVET 2 years ago
parent ff33c3c370
commit 536d533f7e

@ -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:
@ -40,4 +42,13 @@ steps:
sonar_token:
from_secret: SECRET_SONAR_LOGIN
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

400
Code/.gitignore vendored

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

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

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

@ -1,165 +0,0 @@
<Application x:Class="IHM.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:IHM"
xmlns:conv="clr-namespace:IHM.Converters"
StartupUri="MainWindow.xaml">
<Application.Resources>
<conv:Func2WindowPartConverter x:Key="Func2WpConv"/>
<Style x:Key="BorderRessource" TargetType="Border">
<Setter Property="BorderBrush" Value="#63A4FF"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Margin" Value="20"/>
<Setter Property="CornerRadius" Value="5"/>
<Setter Property="Height" Value="30"/>
<Setter Property="Width" Value="175"/>
</Style>
<Style TargetType="UserControl" x:Key="ImageFondRessource">
<Setter Property="Background">
<Setter.Value>
<VisualBrush>
<VisualBrush.Visual>
<Image Source="./images/fond.jpg">
<Image.Effect>
<BlurEffect Radius="0"/>
</Image.Effect>
</Image>
</VisualBrush.Visual>
</VisualBrush>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="TextBlockRessource" TargetType="TextBlock">
<Setter Property="HorizontalAlignment" Value="Center"/>
<Setter Property="VerticalAlignment" Value="Center"/>
</Style>
<Style x:Key="TitreDePage" TargetType="TextBlock">
<Setter Property="HorizontalAlignment" Value="Center"/>
<Setter Property="FontFamily" Value="Slab serif"/>
<Setter Property="FontSize" Value="30"/>
<Setter Property="FontWeight" Value="Bold"/>
<Setter Property="DockPanel.Dock" Value="Top"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="Margin" Value="20"/>
</Style>
<Style TargetType="Button" x:Key="TransparentButtonRessource">
<Setter Property="Background" Value="Transparent" />
<Setter Property="TextBlock.TextAlignment" Value="Center" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border CornerRadius="5" Background="Transparent" BorderBrush="#63A4FF" BorderThickness="1" >
<ContentPresenter x:Name="contentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="GreenButtonRessource" TargetType="Button">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border CornerRadius="5" BorderBrush="#63A4FF" BorderThickness="1" >
<Border.Background>
<LinearGradientBrush>
<GradientStop Color="#80FF72" Offset="0"/>
<GradientStop Color="#7EE8FA" Offset="1"/>
</LinearGradientBrush>
</Border.Background>
<ContentPresenter x:Name="contentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="HorizontalAlignment" Value="Center"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="Padding" Value="10"/>
<Setter Property="Margin" Value="60,0,0,0"/>
<Setter Property="Height" Value="25"/>
<Setter Property="Width" Value="200"/>
</Style>
<Style x:Key="OrangeButtonRessource" TargetType="Button">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border CornerRadius="5" BorderBrush="#63A4FF" BorderThickness="1" >
<Border.Background>
<LinearGradientBrush>
<GradientStop Color="#FBD72B" Offset="0"/>
<GradientStop Color="#F9484A" Offset="1"/>
</LinearGradientBrush>
</Border.Background>
<ContentPresenter x:Name="contentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="HorizontalAlignment" Value="Center"/>
<Setter Property="VerticalAlignment" Value="Center"/>
</Style>
<SolidColorBrush x:Key="CouleurPrincipale" Color="#23395d"/>
<SolidColorBrush x:Key="CouleurBouton" Color="#99425d"/>
<Style x:Key="BoutonMain" TargetType="Button">
<Setter Property="Height" Value="40"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Margin" Value="10,10,10,10" />
<Setter Property="FontSize" Value="16"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="Background" Value="{StaticResource CouleurBouton}"/>
<Style.Resources>
<Style TargetType="Border">
<Setter Property="CornerRadius" Value="20,20,20,20"/>
</Style>
</Style.Resources>
<Style.Triggers>
<Trigger Property="IsDefault" Value="True">
<Setter Property="Background" Value="Black"/>
<Trigger.EnterActions>
<BeginStoryboard>
<Storyboard>
<ColorAnimation Duration="0:0:0.5" Storyboard.TargetProperty="(Button.Background).(SolidColorBrush.Color)" To="#23395d"/>
</Storyboard>
</BeginStoryboard>
</Trigger.EnterActions>
</Trigger>
<Trigger Property ="IsMouseOver" Value="True">
<Setter Property= "Opacity" Value="0.3"/>
</Trigger>
</Style.Triggers>
</Style>
</Application.Resources>
</Application>

@ -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
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
public Navigator Navigator { get; private set; } = new Navigator();
}
}

@ -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)
)]

@ -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<UserControl>? windowPartCreator = value as Func<UserControl>;
if (windowPartCreator == null)
{
return null;
}
return windowPartCreator();
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}
}

@ -1,28 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net6.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<UseWPF>true</UseWPF>
</PropertyGroup>
<ItemGroup>
<None Remove="images\fond.jpg" />
<None Remove="images\fond2.png" />
<None Remove="images\logo.png" />
</ItemGroup>
<ItemGroup>
<Content Include="images\fond.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="images\fond2.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="images\logo.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
</Project>

@ -1,38 +0,0 @@
<Window x:Class="IHM.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:IHM"
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="800">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.30*"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="0" Background="{StaticResource CouleurPrincipale}">
<Image Source="images/logo.png" Margin="10" Grid.Column="0" Grid.Row="0" Width="75"/>
<Button Click="Button_Click_TableauDeBord" Content="Tableau de bord" Style="{StaticResource BoutonMain}" IsDefault="True"/>
<Button Click="Button_Click_Compte" Content="Compte" Style="{StaticResource BoutonMain}"/>
<Button Click="Button_Click_Operation" Content="Opérations" Style="{StaticResource BoutonMain}"/>
<Button Click="Button_Click_Echeancier" Content="Echéancier" Style="{StaticResource BoutonMain}"/>
<Button Click="Button_Click_Planification" Content="Planification" Style="{StaticResource BoutonMain}"/>
</StackPanel>
<ContentControl x:Name="contentControl"
DataContext="{Binding Nav}"
Content="{Binding SelectedUserControlCreator.Value,Converter={StaticResource Func2WpConv}}"
Grid.Column="1" Grid.Row="1"/>
</Grid>
</Window>

@ -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
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
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;
}
}
}

@ -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<string, Func<UserControl>> WindowPart { get; private set; }
Dictionary<string, Func<UserControl>> windowPart { get; set; } = new Dictionary<string, Func<UserControl>>
{
[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<string, Func<UserControl>>(windowPart);
SelectedUserControlCreator = windowPart.First();
}
public KeyValuePair<string, Func<UserControl>> SelectedUserControlCreator
{
get => selectedUserControlCreator;
set
{
if (selectedUserControlCreator.Equals(value)) return;
selectedUserControlCreator = value;
OnPropertyChanged();
}
}
private KeyValuePair<string, Func<UserControl>> 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);
}
}
}
}

@ -1,16 +0,0 @@
<UserControl x:Class="IHM.UCAjouterBanque"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:IHM"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800"
Style="{StaticResource ImageFondRessource}">
<DockPanel>
<TextBlock Text="A faire" FontSize="40"/>
<Button Click="Button_Click_Retour" Style="{StaticResource GreenButtonRessource}">
<TextBlock Text="Retour"/>
</Button>
</DockPanel>
</UserControl>

@ -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
{
/// <summary>
/// Logique d'interaction pour UCAjouterBanque.xaml
/// </summary>
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);
}
}
}

@ -1,16 +0,0 @@
<UserControl x:Class="IHM.UCAjouterCompte"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:IHM"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800"
Style="{StaticResource ImageFondRessource}">
<DockPanel>
<TextBlock Text="A FAIRE" FontSize="40"/>
<Button Click="Button_Click_Retour" Style="{StaticResource GreenButtonRessource}">
<TextBlock Text="Retour"/>
</Button>
</DockPanel>
</UserControl>

@ -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
{
/// <summary>
/// Logique d'interaction pour UCAjouterCompte.xaml
/// </summary>
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);
}
}
}

@ -1,16 +0,0 @@
<UserControl x:Class="IHM.UCAjouterEcheance"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:IHM"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800"
Style="{StaticResource ImageFondRessource}">
<DockPanel>
<TextBlock Text="A FAIRE" FontSize="40"/>
<Button Click="Button_Click_Retour" Style="{StaticResource GreenButtonRessource}">
<TextBlock Text="Retour"/>
</Button>
</DockPanel>
</UserControl>

@ -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
{
/// <summary>
/// Logique d'interaction pour UCAjouterEcheance.xaml
/// </summary>
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);
}
}
}

@ -1,16 +0,0 @@
<UserControl x:Class="IHM.UCAjouterPlanification"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:IHM"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800"
Style="{StaticResource ImageFondRessource}">
<DockPanel>
<TextBlock Text="A FAIRE" FontSize="40"/>
<Button Click="Button_Click_Retour" Style="{StaticResource GreenButtonRessource}">
<TextBlock Text="Retour"/>
</Button>
</DockPanel>
</UserControl>

@ -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
{
/// <summary>
/// Logique d'interaction pour UCAjouterPlanification.xaml
/// </summary>
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);
}
}
}

@ -1,41 +0,0 @@
<UserControl x:Class="IHM.UCBienvenue"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:IHM"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800"
Style="{StaticResource ImageFondRessource}">
<DockPanel>
<TextBlock Style="{StaticResource TitreDePage}" >Bienvenue sur Cons'Eco</TextBlock>
<Image Source="./images/logo.png" DockPanel.Dock="Top" Height="100" />
<TextBlock Foreground="Black" FontSize="15" HorizontalAlignment="Center" DockPanel.Dock="Top">
La première application d'aide à la gestion de budget personnel ou en entreprise
</TextBlock>
<Grid DockPanel.Dock="Bottom">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<StackPanel>
<TextBlock HorizontalAlignment="Center" Margin="50" FontSize="15">
Vous pouvez créer un compte
</TextBlock>
<Button Click="Button_Click_Inscription" Style="{StaticResource GreenButtonRessource}" Height="30" Width="100">
<TextBlock Text="Inscription"/>
</Button>
</StackPanel>
<StackPanel Grid.Column="1">
<TextBlock HorizontalAlignment="Center" Margin="50" FontSize="15">
Ou vous connecter si vous en possédée déjà un
</TextBlock>
<Button Click="Button_Click_Connexion" Style="{StaticResource GreenButtonRessource}" Height="30" Width="100">
<TextBlock Text="Connexion"/>
</Button>
</StackPanel>
</Grid>
</DockPanel>
</UserControl>

@ -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
{
/// <summary>
/// Logique d'interaction pour UCBienvenue.xaml
/// </summary>
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);
}
}
}

@ -1,42 +0,0 @@
<UserControl x:Class="IHM.UCCompte"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:IHM"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800"
Style="{StaticResource ImageFondRessource}">
<DockPanel>
<StackPanel DockPanel.Dock="Top">
<TextBlock Style="{StaticResource TitreDePage}" >Compte</TextBlock>
<StackPanel DockPanel.Dock="Left" Orientation="Horizontal" HorizontalAlignment="Center">
<Button Click="Button_Click_Ajouter_Banque" Style="{StaticResource GreenButtonRessource}" Height="25" Width="150" Margin="20">
<TextBlock Text="Ajouter une banque" Style="{StaticResource TextBlockRessource}"/>
</Button>
<Button Click="Button_Click_Supprimer_Banque" Style="{StaticResource GreenButtonRessource}" Height="25" Width="150" Margin="20">
<TextBlock Text="Supprimer une banque" Style="{StaticResource TextBlockRessource}"/>
</Button>
<Button Click="Button_Click_Ajouter_Compte" Style="{StaticResource GreenButtonRessource}" Height="25" Width="150" Margin="20">
<TextBlock Text="Ajouter un compte" Style="{StaticResource TextBlockRessource}"/>
</Button>
<Button Click="Button_Click_Supprimer_Compte" Style="{StaticResource GreenButtonRessource}" Height="25" Width="150" Margin="20">
<TextBlock Text="Supprimer un compte" Style="{StaticResource TextBlockRessource}"/>
</Button>
</StackPanel>
</StackPanel>
<Button Click="Button_Click_ModifSolde" DockPanel.Dock="Bottom" Style="{StaticResource GreenButtonRessource}" Height="25" Width="170" Margin="20">
<TextBlock Text="Modifier votre solde" Style="{StaticResource TextBlockRessource}"/>
</Button>
<TextBlock VerticalAlignment="Center" Text=" Le solde de votre compte courant est de : ???" Style="{StaticResource TextBlockRessource}" FontSize="16" FontWeight="DemiBold"/>
</DockPanel>
</UserControl>

@ -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);
}
}
}

@ -1,71 +0,0 @@
<UserControl x:Class="IHM.UCConnexion"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:IHM"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800"
Style="{StaticResource ImageFondRessource}">
<DockPanel>
<TextBlock Style="{StaticResource TitreDePage}" >Connexion</TextBlock>
<TextBlock DockPanel.Dock="Top" HorizontalAlignment="Center" FontSize="15" Margin="20">Connectez vous à un compte déjà existant</TextBlock>
<Button Click="Button_Click_Acceuil" Margin="20" DockPanel.Dock="Bottom" Style="{StaticResource GreenButtonRessource}">
<TextBlock Text="Retour à la page d'acceuil"/>
</Button>
<Button DockPanel.Dock="Bottom" Click="Button_Click_Connection" Style="{StaticResource GreenButtonRessource}" Height="25" Width="150">
<TextBlock Text="Se connecter" Style="{StaticResource TextBlockRessource}"/>
</Button>
<Button DockPanel.Dock="Bottom" Click="Button_Click_Forget_Password" Style="{StaticResource OrangeButtonRessource}" Height="25" Width="170" Margin="20">
<TextBlock Text="Mot de passe oublié ?" Style="{StaticResource TextBlockRessource}"/>
</Button>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<TextBlock Style="{StaticResource TextBlockRessource}" FontSize="15">Nom d'utilisateur</TextBlock>
<StackPanel Grid.Column="1" Margin="30">
<TextBlock x:Name="ErrorUserName" HorizontalAlignment="Center" FontSize="15" Foreground="#FF6347" Visibility="Hidden">Veuillez renseigner votre nom d'utilisateurs</TextBlock>
<Border Grid.Column="1" Style="{StaticResource BorderRessource}">
<TextBox x:Name="UserName">
<TextBox.Resources>
<Style TargetType="{x:Type Border}">
<Setter Property="CornerRadius" Value="5"/>
</Style>
</TextBox.Resources>
</TextBox>
</Border>
</StackPanel>
<TextBlock Grid.Row="1" Style="{StaticResource TextBlockRessource}" FontSize="15">Mot de passe</TextBlock>
<StackPanel Grid.Row="1" Grid.Column="1">
<TextBlock x:Name="ErrorPassword" HorizontalAlignment="Center" FontSize="15" Foreground="#FF6347" Visibility="Hidden">Veuillez renseigner votre mot de passe</TextBlock>
<Border Style="{StaticResource BorderRessource}">
<PasswordBox x:Name="Password">
<PasswordBox.Resources>
<Style TargetType="{x:Type Border}">
<Setter Property="CornerRadius" Value="5"/>
</Style>
</PasswordBox.Resources>
</PasswordBox>
</Border>
</StackPanel>
</Grid>
</DockPanel>
</UserControl>

@ -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
{
/// <summary>
/// Logique d'interaction pour UCConnexion.xaml
/// </summary>
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
}
}
}

@ -1,43 +0,0 @@
<UserControl x:Class="IHM.UCEcheancier"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:IHM"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800"
Style="{StaticResource ImageFondRessource}">
<DockPanel>
<TextBlock Style="{StaticResource TitreDePage}" >Echeancier</TextBlock>
<WrapPanel DockPanel.Dock="Bottom" HorizontalAlignment="Center">
<Border Style="{StaticResource BorderRessource}" Background="BlueViolet">
<TextBlock DockPanel.Dock="Bottom" Text="Total" TextAlignment="Center" VerticalAlignment="Center"/>
</Border>
<Border Style="{StaticResource BorderRessource}" Background="BlueViolet">
<TextBlock DockPanel.Dock="Bottom" Text="???" TextAlignment="Center" VerticalAlignment="Center"/>
</Border>
</WrapPanel>
<StackPanel Orientation="Vertical" HorizontalAlignment="Center">
<WrapPanel HorizontalAlignment="Center">
<Button Click="Button_Click_Ajouter_Echeance" Style="{StaticResource GreenButtonRessource}" Content="Enregistrer une échéance"/>
<Button Click="Button_Click_Supprimer_Echeance" Style="{StaticResource GreenButtonRessource}" Content="Supprimer une échéance"/>
</WrapPanel>
<WrapPanel HorizontalAlignment="Center">
<WrapPanel.Resources>
<Style TargetType="{x:Type TextBlock}">
<Setter Property="Margin" Value="60,10,30,0"/>
</Style>
</WrapPanel.Resources>
<TextBlock Text="Nom"/>
<TextBlock Text="Date"/>
<TextBlock Text="Paiement"/>
<TextBlock Text="Type"/>
<TextBlock Text="Crédit"/>
<TextBlock Text="Débit"/>
</WrapPanel>
</StackPanel>
</DockPanel>
</UserControl>

@ -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
{
/// <summary>
/// Logique d'interaction pour UCEcheancier.xaml
/// </summary>
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);
}
}
}

@ -1,16 +0,0 @@
<UserControl x:Class="IHM.UCEffectuerCredit"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:IHM"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800"
Style="{StaticResource ImageFondRessource}">
<DockPanel>
<TextBlock Text="A FAIRE" FontSize="40"/>
<Button Click="Button_Click_Retour" Style="{StaticResource GreenButtonRessource}">
<TextBlock Text="Retour"/>
</Button>
</DockPanel>
</UserControl>

@ -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
{
/// <summary>
/// Logique d'interaction pour UserControl1.xaml
/// </summary>
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);
}
}
}

@ -1,16 +0,0 @@
<UserControl x:Class="IHM.UCEffectuerDebit"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:IHM"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800"
Style="{StaticResource ImageFondRessource}">
<DockPanel>
<TextBlock Text="A FAIRE" FontSize="40"/>
<Button Click="Button_Click_Retour" Style="{StaticResource GreenButtonRessource}">
<TextBlock Text="Retour"/>
</Button>
</DockPanel>
</UserControl>

@ -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
{
/// <summary>
/// Logique d'interaction pour UserControl1.xaml
/// </summary>
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);
}
}
}

@ -1,94 +0,0 @@
<UserControl x:Class="IHM.UCInscription"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:IHM"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800"
Style="{StaticResource ImageFondRessource}">
<DockPanel>
<TextBlock Style="{StaticResource TitreDePage}" >Inscription</TextBlock>
<TextBlock DockPanel.Dock="Top" HorizontalAlignment="Center" FontSize="15" Margin="20">Veuillez créer votre compte en retrant vos informations</TextBlock>
<Button Click="Button_Click_Acceuil" Margin="20" DockPanel.Dock="Bottom" Style="{StaticResource GreenButtonRessource}">
<TextBlock Text="Retour à la page d'acceuil"/>
</Button>
<Button DockPanel.Dock="Bottom" Click="Button_Click_Validation" Style="{StaticResource GreenButtonRessource}" Height="25" Width="150">
<TextBlock Text="Valider" Style="{StaticResource TextBlockRessource}"/>
</Button>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<TextBlock Text="Nom d'utilisateur" Style="{StaticResource TextBlockRessource}"/>
<Border Grid.Column="1" Style="{StaticResource BorderRessource}">
<TextBox>
<TextBox.Resources>
<Style TargetType="{x:Type Border}">
<Setter Property="CornerRadius" Value="5"/>
</Style>
</TextBox.Resources>
</TextBox>
</Border>
<TextBlock Grid.Row="1" Text="Nom" Style="{StaticResource TextBlockRessource}"/>
<Border Grid.Column="1" Grid.Row="1" Style="{StaticResource BorderRessource}">
<TextBox>
<TextBox.Resources>
<Style TargetType="{x:Type Border}">
<Setter Property="CornerRadius" Value="5"/>
</Style>
</TextBox.Resources>
</TextBox>
</Border>
<TextBlock Grid.Row="2" Text="Prenom" Style="{StaticResource TextBlockRessource}"/>
<Border Grid.Column="1" Grid.Row="2" Style="{StaticResource BorderRessource}">
<TextBox>
<TextBox.Resources>
<Style TargetType="{x:Type Border}">
<Setter Property="CornerRadius" Value="5"/>
</Style>
</TextBox.Resources>
</TextBox>
</Border>
<TextBlock Grid.Row="3" Text="Mail" Style="{StaticResource TextBlockRessource}"/>
<Border Grid.Column="1" Grid.Row="3" Style="{StaticResource BorderRessource}">
<TextBox>
<TextBox.Resources>
<Style TargetType="{x:Type Border}">
<Setter Property="CornerRadius" Value="5"/>
</Style>
</TextBox.Resources>
</TextBox>
</Border>
<TextBlock Grid.Row="4" Text="Mot de passe" Style="{StaticResource TextBlockRessource}"/>
<Border Grid.Column="1" Grid.Row="4" Style="{StaticResource BorderRessource}">
<TextBox>
<TextBox.Resources>
<Style TargetType="{x:Type Border}">
<Setter Property="CornerRadius" Value="5"/>
</Style>
</TextBox.Resources>
</TextBox>
</Border>
</Grid>
</DockPanel>
</UserControl>

@ -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
{
/// <summary>
/// Logique d'interaction pour UCInscription.xaml
/// </summary>
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
}
}
}

@ -1,37 +0,0 @@
<UserControl x:Class="IHM.UCModifSolde"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:IHM"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800"
Style="{StaticResource ImageFondRessource}">
<DockPanel>
<TextBlock DockPanel.Dock="Top" Style="{StaticResource TitreDePage}" >Modification de votre solde</TextBlock>
<StackPanel DockPanel.Dock="Bottom" Orientation="Horizontal" Margin="20" HorizontalAlignment="Center">
<Button Click="Button_Click_Compte" Style="{StaticResource GreenButtonRessource}" Height="25" Width="170">
<TextBlock Text="Retour" Style="{StaticResource TextBlockRessource}"/>
</Button>
<Button DockPanel.Dock="Bottom" Style="{StaticResource GreenButtonRessource}" Height="25" Width="170" Margin="150,0,0,0">
<TextBlock Text="Confirmer" Style="{StaticResource TextBlockRessource}"/>
</Button>
</StackPanel>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
<TextBlock Margin="50" Height="25" Width="80">Nouveau solde</TextBlock>
<TextBox Margin="50" Height="25" Width="170">
<TextBox.Resources>
<Style TargetType="{x:Type Border}">
<Setter Property="CornerRadius" Value="5"/>
</Style>
</TextBox.Resources>
</TextBox>
</StackPanel>
</DockPanel>
</UserControl>

@ -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
{
/// <summary>
/// Logique d'interaction pour Page1.xaml
/// </summary>
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);
}
}
}

@ -1,46 +0,0 @@
<UserControl x:Class="IHM.UCOperation"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:IHM"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800"
Style="{StaticResource ImageFondRessource}">
<DockPanel>
<TextBlock DockPanel.Dock="Top" Text="Opérations" Style="{StaticResource TitreDePage}"/>
<WrapPanel DockPanel.Dock="Bottom" HorizontalAlignment="Center">
<Border Style="{StaticResource BorderRessource}" Background="BlueViolet">
<TextBlock DockPanel.Dock="Bottom" Text="Solde" TextAlignment="Center" VerticalAlignment="Center"/>
</Border>
<Border Style="{StaticResource BorderRessource}" Background="BlueViolet">
<TextBlock DockPanel.Dock="Bottom" Text="???" TextAlignment="Center" VerticalAlignment="Center"/>
</Border>
</WrapPanel>
<StackPanel Orientation="Vertical" HorizontalAlignment="Center">
<WrapPanel HorizontalAlignment="Center">
<Button Style="{StaticResource GreenButtonRessource}" Click="Button_Click_EffectuerCredit" Content="Effectuer un crédit"/>
<Button Style="{StaticResource GreenButtonRessource}" Click="Button_Click_EffectuerDebit" Content="Effectuer un débit"/>
<Button Style="{StaticResource GreenButtonRessource}" Click="Button_Click_RetirerOperation" Content="Retirer une opération"/>
<Button Style="{StaticResource GreenButtonRessource}" Click="Button_Click_SupprimerOperation" Content="Supprimer une opération"/>
</WrapPanel>
<WrapPanel HorizontalAlignment="Center">
<WrapPanel.Resources>
<Style TargetType="{x:Type TextBlock}">
<Setter Property="Margin" Value="60,10,30,0"/>
</Style>
</WrapPanel.Resources>
<TextBlock Text="Nom"/>
<TextBlock Text="Date"/>
<TextBlock Text="Paiement"/>
<TextBlock Text="Type"/>
<TextBlock Text="Crédit"/>
<TextBlock Text="Débit"/>
</WrapPanel>
</StackPanel>
</DockPanel>
</UserControl>

@ -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
{
/// <summary>
/// Logique d'interaction pour UCOperation.xaml
/// </summary>
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);
}
}
}

@ -1,50 +0,0 @@
<UserControl x:Class="IHM.UCPlanification"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:IHM"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800"
Style="{StaticResource ImageFondRessource}">
<DockPanel>
<TextBlock DockPanel.Dock="Top" Text="Planification" Style="{StaticResource TitreDePage}"/>
<WrapPanel DockPanel.Dock="Bottom" HorizontalAlignment="Center">
<Border Style="{StaticResource BorderRessource}" Background="BlueViolet">
<TextBlock DockPanel.Dock="Bottom" Text="Total" TextAlignment="Center" VerticalAlignment="Center"/>
</Border>
<Border Style="{StaticResource BorderRessource}" Background="BlueViolet">
<TextBlock DockPanel.Dock="Bottom" Text="???" TextAlignment="Center" VerticalAlignment="Center"/>
</Border>
</WrapPanel>
<StackPanel Orientation="Vertical" HorizontalAlignment="Center">
<WrapPanel HorizontalAlignment="Center">
<Button Style="{StaticResource GreenButtonRessource}" Click="Button_Click_Ajouter_Planification" Content="Enregistrer une planification"/>
<Button Style="{StaticResource GreenButtonRessource}" Click="Button_Click_Supprimer_Planification" Content="supprimer une planification"/>
</WrapPanel>
<TextBlock Text="Basculement vers échéancier tous les premiers du mois" HorizontalAlignment="Center" FontStyle="Italic"/>
<WrapPanel HorizontalAlignment="Center">
<WrapPanel.Resources>
<Style TargetType="{x:Type TextBlock}">
<Setter Property="Margin" Value="60,10,30,0"/>
</Style>
</WrapPanel.Resources>
<TextBlock Text="Nom"/>
<TextBlock Text="Date"/>
<TextBlock Text="Paiement"/>
<TextBlock Text="Type"/>
<TextBlock Text="Crédit"/>
<TextBlock Text="Débit"/>
</WrapPanel>
</StackPanel>
</DockPanel>
</UserControl>

@ -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
{
/// <summary>
/// Logique d'interaction pour UCPlannification.xaml
/// </summary>
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);
}
}
}

@ -1,16 +0,0 @@
<UserControl x:Class="IHM.UCRetirerOperation"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:IHM"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800"
Style="{StaticResource ImageFondRessource}">
<DockPanel>
<TextBlock Text="A FAIRE" FontSize="40"/>
<Button Click="Button_Click_Retour" Style="{StaticResource GreenButtonRessource}">
<TextBlock Text="Retour"/>
</Button>
</DockPanel>
</UserControl>

@ -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
{
/// <summary>
/// Logique d'interaction pour UserControl2.xaml
/// </summary>
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);
}
}
}

@ -1,16 +0,0 @@
<UserControl x:Class="IHM.UCSupprimerBanque"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:IHM"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800"
Style="{StaticResource ImageFondRessource}">
<DockPanel>
<TextBlock Text="A FAIRE" FontSize="40"/>
<Button Click="Button_Click_Retour" Style="{StaticResource GreenButtonRessource}">
<TextBlock Text="Retour"/>
</Button>
</DockPanel>
</UserControl>

@ -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
{
/// <summary>
/// Logique d'interaction pour UCSupprimerBanque.xaml
/// </summary>
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);
}
}
}

@ -1,17 +0,0 @@
<UserControl x:Class="IHM.UCSupprimerCompte"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:IHM"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800"
Style="{StaticResource ImageFondRessource}">
<DockPanel>
<TextBlock Text="A FAIRE" FontSize="40"/>
<Button Click="Button_Click_Retour" Style="{StaticResource GreenButtonRessource}">
<TextBlock Text="Retour"/>
</Button>
</DockPanel>
</UserControl>

@ -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
{
/// <summary>
/// Logique d'interaction pour UCSupprimerCompte.xaml
/// </summary>
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);
}
}
}

@ -1,16 +0,0 @@
<UserControl x:Class="IHM.UCSupprimerEcheance"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:IHM"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800"
Style="{StaticResource ImageFondRessource}">
<DockPanel>
<TextBlock Text="A FAIRE" FontSize="40"/>
<Button Click="Button_Click_Retour" Style="{StaticResource GreenButtonRessource}">
<TextBlock Text="Retour"/>
</Button>
</DockPanel>
</UserControl>

@ -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
{
/// <summary>
/// Logique d'interaction pour UCSupprimerEcheance.xaml
/// </summary>
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);
}
}
}

@ -1,16 +0,0 @@
<UserControl x:Class="IHM.UCSupprimerOperation"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:IHM"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800"
Style="{StaticResource ImageFondRessource}">
<DockPanel>
<TextBlock Text="A FAIRE" FontSize="40"/>
<Button Click="Button_Click_Retour" Style="{StaticResource GreenButtonRessource}">
<TextBlock Text="Retour"/>
</Button>
</DockPanel>
</UserControl>

@ -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
{
/// <summary>
/// Logique d'interaction pour UserControl3.xaml
/// </summary>
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);
}
}
}

@ -1,16 +0,0 @@
<UserControl x:Class="IHM.UCSupprimerPlanification"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:IHM"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800"
Style="{StaticResource ImageFondRessource}">
<DockPanel>
<TextBlock Text="A FAIRE" FontSize="40"/>
<Button Click="Button_Click_Retour" Style="{StaticResource GreenButtonRessource}">
<TextBlock Text="Retour"/>
</Button>
</DockPanel>
</UserControl>

@ -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
{
/// <summary>
/// Logique d'interaction pour UCSupprimerPlanification.xaml
/// </summary>
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);
}
}
}

@ -1,12 +0,0 @@
<UserControl x:Class="IHM.UCTableauDeBord"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:IHM"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<Grid>
</Grid>
</UserControl>

@ -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
{
/// <summary>
/// Logique d'interaction pour UCTableauDeBord.xaml
/// </summary>
public partial class UCTableauDeBord : UserControl
{
public UCTableauDeBord()
{
InitializeComponent();
}
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 567 KiB

@ -1,7 +0,0 @@
namespace Model
{
public class Class1
{
}
}

@ -1,11 +0,0 @@
namespace TestsUnitaires
{
public class UnitTest1
{
[Fact]
public void Test1()
{
}
}
}

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

@ -0,0 +1,28 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6.0;net6.0-android;net6.0-ios;net6.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net6.0-windows10.0.19041.0</TargetFrameworks>
<!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
<!-- <TargetFrameworks>$(TargetFrameworks);net6.0-tizen</TargetFrameworks> -->
<UseMaui>true</UseMaui>
<SingleProject>true</SingleProject>
<ImplicitUsings>enable</ImplicitUsings>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">14.2</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">14.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'tizen'">6.5</SupportedOSPlatformVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Npgsql" Version="6.0.7" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Modele\Model.csproj" />
</ItemGroup>
</Project>

@ -0,0 +1,23 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<Compile Remove="Platforms\**" />
<EmbeddedResource Remove="Platforms\**" />
<None Remove="Platforms\**" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Npgsql" Version="6.0.7" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Modele\Model_CI.csproj" />
</ItemGroup>
</Project>

@ -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<Banque> LoadBanque()
{
List<Banque> ListeBanques = new List<Banque>();
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<Compte> LoadCompte(Inscrit i)
{
List<Compte> ListeCompte = new List<Compte>();
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<Inscrit> ListeInscrits = new List<Inscrit>(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
}
}
}

@ -0,0 +1,7 @@
namespace Data
{
// All the code in this file is only included on Android.
public class PlatformClass1
{
}
}

@ -0,0 +1,7 @@
namespace Data
{
// All the code in this file is only included on Mac Catalyst.
public class PlatformClass1
{
}
}

@ -0,0 +1,9 @@
using System;
namespace Data
{
// All the code in this file is only included on Tizen.
public class PlatformClass1
{
}
}

@ -0,0 +1,7 @@
namespace Data
{
// All the code in this file is only included on Windows.
public class PlatformClass1
{
}
}

@ -0,0 +1,7 @@
namespace Data
{
// All the code in this file is only included on iOS.
public class PlatformClass1
{
}
}

@ -0,0 +1,14 @@
<?xml version = "1.0" encoding = "UTF-8" ?>
<Application xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:IHM"
x:Class="IHM.App">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Resources/Styles/Colors.xaml" />
<ResourceDictionary Source="Resources/Styles/Styles.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
</Application>

@ -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();
}
}
}

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8" ?>
<Shell
x:Class="IHM.AppShell"
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:IHM"
Shell.FlyoutBehavior="Disabled"
Shell.NavBarIsVisible="False">
<!--<ShellContent
ContentTemplate="{DataTemplate local:Dashboard}"
Route="MainPage" />-->
<TabBar>
<ShellContent Title="Tableau de Bord"
Icon="home_black.png"
ContentTemplate="{DataTemplate local:DashBoard}" />
<ShellContent Title="Opérations"
Icon="dollar_black.png"
ContentTemplate="{DataTemplate local:Operations}" />
<ShellContent Title="Planification"
Icon="planification_black.png"
ContentTemplate="{DataTemplate local:Planification}" />
<ShellContent Title="Paramètres"
Icon="settings_black.png"
ContentTemplate="{DataTemplate local:Settings}" />
</TabBar>
<ShellContent
ContentTemplate="{DataTemplate local:Inscription}"
Route="Inscription" />
<ShellContent
ContentTemplate="{DataTemplate local:ForgetPassword}"
Route="ForgetPassword"/>
<ShellContent
ContentTemplate="{DataTemplate local:ChangePassword}"
Route="ChangePassword"/>
</Shell>

@ -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));
}
}
}

@ -0,0 +1,40 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="IHM.ChangePassword"
Title="ChangePassword">
<VerticalStackLayout>
<Label
Text="Changer votre mot de passe"
VerticalOptions="Center"
HorizontalOptions="Center"
FontSize="20"
Margin="20"/>
<Border StrokeShape="RoundRectangle 40" BackgroundColor="White" Padding="7" Margin="40">
<Entry BackgroundColor="White"
TextColor="Black"
VerticalTextAlignment="Center"
FontSize="15"
Placeholder="Nouveau mot de passe"
x:Name="EntryNewMdp"
IsPassword="True"/>
</Border>
<Border StrokeShape="RoundRectangle 40" BackgroundColor="White" Padding="7" Margin="40,0,40,40">
<Entry BackgroundColor="White"
TextColor="Black"
VerticalTextAlignment="Center"
FontSize="15"
Placeholder="Confirmer mot de passe"
x:Name="EntryNewMdpConfirmation"
IsPassword="True"/>
</Border>
<Button
x:Name="ValidationButton"
Text="valider"
Clicked="ValidationButton_Clicked"
HorizontalOptions="Center" />
</VerticalStackLayout>
</ContentPage>

@ -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);
}
}

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="IHM.DashBoard">
<VerticalStackLayout>
<Label
Text="Dashboard"
VerticalOptions="Center"
HorizontalOptions="Center" />
</VerticalStackLayout>
</ContentPage>

@ -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());
}
}

@ -0,0 +1,50 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="IHM.ForgetPassword"
Title="ForgetPassword">
<VerticalStackLayout
Margin="20"
Padding="30">
<Label
Text="Rentrée votre adresse email :"
HorizontalOptions="Center" />
<Border StrokeShape="RoundRectangle 40" BackgroundColor="White" Padding="7" Margin="40">
<Entry BackgroundColor="White"
TextColor="Black"
VerticalTextAlignment="Center"
FontSize="15"
Placeholder="Email"
x:Name="EntryMail"/>
</Border>
<Button
x:Name="ConnexionButton"
Text="valider Email"
Clicked="SearchEmail"
HorizontalOptions="Center" />
<VerticalStackLayout x:Name="ValidateReceptCode" IsVisible="false" Margin="20">
<Label Text="Veuillez rentrer le code à 6 chiffres reçus par mail"
HorizontalOptions="Center"/>
<Border StrokeShape="RoundRectangle 40" BackgroundColor="White" Padding="7" Margin="40">
<Entry BackgroundColor="White"
TextColor="Black"
VerticalTextAlignment="Center"
FontSize="15"
Placeholder="6 Chiffres"
Keyboard="Numeric"
x:Name="EntryCodeRecept"/>
</Border>
<Button
x:Name="ValidationButton"
Text="valider"
Clicked="ValideCode"
HorizontalOptions="Center" />
</VerticalStackLayout>
</VerticalStackLayout>
</ContentPage>

@ -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));
}
}

@ -0,0 +1,96 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6.0-android;net6.0-ios;net6.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net6.0-windows10.0.19041.0</TargetFrameworks>
<!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
<!-- <TargetFrameworks>$(TargetFrameworks);net6.0-tizen</TargetFrameworks> -->
<OutputType>Exe</OutputType>
<RootNamespace>IHM</RootNamespace>
<UseMaui>true</UseMaui>
<SingleProject>true</SingleProject>
<ImplicitUsings>enable</ImplicitUsings>
<!-- Display name -->
<ApplicationTitle>Cons'Eco</ApplicationTitle>
<!-- App Identifier -->
<ApplicationId>com.companyname.ihm</ApplicationId>
<ApplicationIdGuid>33DC848D-F9BE-4608-823D-9556390F7E87</ApplicationIdGuid>
<!-- Versions -->
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
<ApplicationVersion>1</ApplicationVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">14.2</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">14.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'tizen'">6.5</SupportedOSPlatformVersion>
</PropertyGroup>
<ItemGroup>
<!-- App Icon -->
<MauiIcon Include="Resources\AppIcon\logo.svg" ForegroundFile="Resources\AppIcon\logo.svg" Color="#512BD4" BaseSize="100,100" />
<MauiImage Include="Resources\Images\NavBar\dollar_black.png" />
<MauiImage Include="Resources\Images\NavBar\settings_black.png" />
<Resource Include="Resources\Images\NavBar\home_black.png" />
<!-- Splash Screen -->
<MauiSplashScreen Include="Resources\Splash\logo.svg" Color="#3C425A" BaseSize="128,128" />
<!-- Images -->
<MauiImage Include="Resources\Images\*" />
<MauiImage Update="Resources\Images\dotnet_bot.svg" BaseSize="168,208" />
<MauiImage Update="Resources\Images\logo_sans_fond.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</MauiImage>
<!-- Custom Fonts -->
<MauiFont Include="Resources\Fonts\*" />
<!-- Raw Assets (also remove the "Resources\Raw" prefix) -->
<MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" />
</ItemGroup>
<ItemGroup>
<MauiImage Include="Resources\Images\NavBar\planification_black.png" />
</ItemGroup>
<ItemGroup>
<MauiImage Include="Resources\Images\NavBar\home_black.png">
<CopyToOutputDirectory></CopyToOutputDirectory>
</MauiImage>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Data\Data.csproj" />
<ProjectReference Include="..\Modele\Model.csproj" />
</ItemGroup>
<ItemGroup>
<MauiXaml Update="ChangePassword.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="DashBoard.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="ForgetPassword.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Operations.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Planification.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Settings.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Inscription.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
</ItemGroup>
</Project>

@ -0,0 +1,86 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="IHM.Inscription"
Title="Inscription">
<ScrollView>
<VerticalStackLayout
Margin="10"
Padding="30">
<Label
Text="Renter vos identifiants"
VerticalOptions="Center"
HorizontalOptions="Center" />
<Border StrokeShape="RoundRectangle 40" BackgroundColor="White" Padding="7">
<Entry BackgroundColor="White"
TextColor="Black"
VerticalTextAlignment="Center"
FontSize="15"
Placeholder="Nom"
x:Name="EntryNewName"/>
</Border>
<Border StrokeShape="RoundRectangle 40" BackgroundColor="White" Padding="7">
<Entry BackgroundColor="White"
TextColor="Black"
VerticalTextAlignment="Center"
FontSize="15"
Placeholder="Prenom"
x:Name="EntryNewSurname"/>
</Border>
<Border StrokeShape="RoundRectangle 40" BackgroundColor="White" Padding="7">
<Entry BackgroundColor="White"
TextColor="Black"
VerticalTextAlignment="Center"
FontSize="15"
Placeholder="Adresse mail"
x:Name="EntryNewMail"/>
</Border>
<Border StrokeShape="RoundRectangle 40" BackgroundColor="White" Padding="7">
<Entry BackgroundColor="White"
TextColor="Black"
VerticalTextAlignment="Center"
FontSize="15"
Placeholder="Mot de passe"
IsPassword="True"
x:Name="EntryNewPassword"/>
</Border>
<Border StrokeShape="RoundRectangle 40" BackgroundColor="White" Padding="7">
<Entry BackgroundColor="White"
TextColor="Black"
VerticalTextAlignment="Center"
FontSize="15"
Placeholder="Confirmer mot de passe"
IsPassword="True"
x:Name="EntryConfirmationPassword"/>
</Border>
<Button
x:Name="InscriptionButton"
Text="Créer son compte"
Clicked="InscriptionOnClicked"
HorizontalOptions="Center" />
<VerticalStackLayout x:Name="ValidateReceptCode" IsVisible="false" Margin="20">
<Label Text="Veuillez rentrer le code à 6 chiffres reçus par mail"
HorizontalOptions="Center"/>
<Border StrokeShape="RoundRectangle 40" BackgroundColor="White" Padding="7" Margin="40">
<Entry BackgroundColor="White"
TextColor="Black"
VerticalTextAlignment="Center"
FontSize="15"
Placeholder="6 Chiffres"
Keyboard="Numeric"
x:Name="EntryCodeRecept"/>
</Border>
<Button
x:Name="ValidationButton"
Text="valider"
Clicked="ValideCode"
HorizontalOptions="Center" />
</VerticalStackLayout>
</VerticalStackLayout>
</ScrollView>
</ContentPage>

@ -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);
}
}

@ -0,0 +1,81 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="IHM.MainPage">
<ScrollView>
<VerticalStackLayout
Spacing="25"
Padding="30,0"
VerticalOptions="Start">
<Label
Margin="0,20,-80,0"
Text="Welcome To Cons'Eco"
FontSize="30"/>
<Image Source="Resources/Images/logo_sans_fond.png"
HorizontalOptions="Center"
Scale="0.5"/>
<Border StrokeShape="RoundRectangle 40" BackgroundColor="White" Padding="7">
<Entry BackgroundColor="White"
TextColor="Black"
VerticalTextAlignment="Center"
FontSize="15"
Placeholder="Addresse mail"
x:Name="EntryMail"/>
</Border>
<Border StrokeShape="RoundRectangle 40" BackgroundColor="White" Padding="7">
<Entry BackgroundColor="White"
TextColor="Black"
VerticalTextAlignment="Center"
FontSize="15"
Placeholder="Mot de passe"
IsPassword="True"
x:Name="EntryPassworld"/>
</Border>
<Button
x:Name="ConnexionButton"
Text="Se connecter"
Clicked="ConnectionOnClicked"
HorizontalOptions="Center" />
<Label
Text="Mot de passe oublier "
TextColor="Blue"
Margin="5,0,0,0"
TextDecorations="Underline"
HorizontalOptions="Center">
<Label.GestureRecognizers>
<TapGestureRecognizer Command="{Binding TapCommand}"
CommandParameter="ForgetPassword"/>
</Label.GestureRecognizers>
</Label>
<HorizontalStackLayout HorizontalOptions="Center">
<Label
Text="Pas de compte ?"
/>
<Label
Text="S'inscrire"
TextColor="Blue"
Margin="5,0,0,0"
TextDecorations="Underline">
<Label.GestureRecognizers>
<TapGestureRecognizer Command="{Binding TapCommand}"
CommandParameter="Inscription"/>
</Label.GestureRecognizers>
</Label>
</HorizontalStackLayout>
</VerticalStackLayout>
</ScrollView>
</ContentPage>

@ -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<string>(async (page) => await Shell.Current.GoToAsync(page));
}
}

@ -0,0 +1,19 @@
namespace IHM
{
public static class MauiProgram
{
public static MauiApp CreateMauiApp()
{
var builder = MauiApp.CreateBuilder();
builder
.UseMauiApp<App>()
.ConfigureFonts(fonts =>
{
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
});
return builder.Build();
}
}
}

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="IHM.Operations">
<VerticalStackLayout>
<Label
Text="Operations"
VerticalOptions="Center"
HorizontalOptions="Center" />
</VerticalStackLayout>
</ContentPage>

@ -0,0 +1,9 @@
namespace IHM;
public partial class Operations : ContentPage
{
public Operations()
{
InitializeComponent();
}
}

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="IHM.Planification">
<VerticalStackLayout>
<Label
Text="Planification"
VerticalOptions="Center"
HorizontalOptions="Center" />
</VerticalStackLayout>
</ContentPage>

@ -0,0 +1,9 @@
namespace IHM;
public partial class Planification : ContentPage
{
public Planification()
{
InitializeComponent();
}
}

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application android:allowBackup="true" android:icon="@mipmap/logo" android:roundIcon="@mipmap/logo_round" android:supportsRtl="true"></application>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
</manifest>

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

@ -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();
}
}

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#512BD4</color>
<color name="colorPrimaryDark">#2B0B98</color>
<color name="colorAccent">#2B0B98</color>
</resources>

@ -0,0 +1,10 @@
using Foundation;
namespace IHM
{
[Register("AppDelegate")]
public class AppDelegate : MauiUIApplicationDelegate
{
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
}
}

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>UIDeviceFamily</key>
<array>
<integer>1</integer>
<integer>2</integer>
</array>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>arm64</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>XSAppIconAssets</key>
<string>Assets.xcassets/appicon.appiconset</string>
</dict>
</plist>

@ -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));
}
}
}

@ -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);
}
}
}

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest package="maui-application-id-placeholder" version="0.0.0" api-version="7" xmlns="http://tizen.org/ns/packages">
<profile name="common" />
<ui-application appid="maui-application-id-placeholder" exec="IHM.dll" multiple="false" nodisplay="false" taskmanage="true" type="dotnet" launch_mode="single">
<label>maui-application-title-placeholder</label>
<icon>maui-appicon-placeholder</icon>
<metadata key="http://tizen.org/metadata/prefer_dotnet_aot" value="true" />
</ui-application>
<shortcut-list />
<privileges>
<privilege>http://tizen.org/privilege/internet</privilege>
</privileges>
<dependencies />
<provides-appdefined-privileges />
</manifest>

@ -0,0 +1,8 @@
<maui:MauiWinUIApplication
x:Class="IHM.WinUI.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:maui="using:Microsoft.Maui"
xmlns:local="using:IHM.WinUI">
</maui:MauiWinUIApplication>

@ -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
{
/// <summary>
/// Provides application-specific behavior to supplement the default Application class.
/// </summary>
public partial class App : MauiWinUIApplication
{
/// <summary>
/// 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().
/// </summary>
public App()
{
this.InitializeComponent();
}
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
}
}

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<Package
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
IgnorableNamespaces="uap rescap">
<Identity Name="maui-package-name-placeholder" Publisher="CN=User Name" Version="0.0.0.0" />
<Properties>
<DisplayName>$placeholder$</DisplayName>
<PublisherDisplayName>User Name</PublisherDisplayName>
<Logo>$placeholder$.png</Logo>
</Properties>
<Dependencies>
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.17763.0" MaxVersionTested="10.0.19041.0" />
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.17763.0" MaxVersionTested="10.0.19041.0" />
</Dependencies>
<Resources>
<Resource Language="x-generate" />
</Resources>
<Applications>
<Application Id="App" Executable="$targetnametoken$.exe" EntryPoint="$targetentrypoint$">
<uap:VisualElements
DisplayName="$placeholder$"
Description="$placeholder$"
Square150x150Logo="$placeholder$.png"
Square44x44Logo="$placeholder$.png"
BackgroundColor="transparent">
<uap:DefaultTile Square71x71Logo="$placeholder$.png" Wide310x150Logo="$placeholder$.png" Square310x310Logo="$placeholder$.png" />
<uap:SplashScreen Image="$placeholder$.png" />
</uap:VisualElements>
</Application>
</Applications>
<Capabilities>
<rescap:Capability Name="runFullTrust" />
</Capabilities>
</Package>

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity version="1.0.0.0" name="IHM.WinUI.app"/>
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<!-- The combination of below two tags have the following effect:
1) Per-Monitor for >= Windows 10 Anniversary Update
2) System < Windows 10 Anniversary Update
-->
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/PM</dpiAware>
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2, PerMonitor</dpiAwareness>
</windowsSettings>
</application>
</assembly>

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

Loading…
Cancel
Save