From 45aa7ce5bddcea8fd40061f39cd67fb450e949a3 Mon Sep 17 00:00:00 2001 From: Clement LESME Date: Wed, 3 May 2023 15:24:29 +0200 Subject: [PATCH] =?UTF-8?q?version=20corronpu=20des=20views=20et=20des=20m?= =?UTF-8?q?odel,=20a=20r=C3=A9cup=C3=A9r=C3=A9=20ce=20qui=20marche?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CanYouBuildIt/test/Model/Build.cs | 41 ++++++++++ CanYouBuildIt/test/Model/Composant.cs | 39 ++++++++++ CanYouBuildIt/test/Model/IUtilisateur.cs | 12 +++ CanYouBuildIt/test/Model/Manager.cs | 34 ++++++++ CanYouBuildIt/test/Model/Utilisateur.cs | 22 ++++++ CanYouBuildIt/test/Views/Acceuil.xaml | 99 ++++++++++++++++++++++++ CanYouBuildIt/test/Views/Acceuil.xaml.cs | 27 +++++++ CanYouBuildIt/test/Views/Credits.xaml | 36 +++++++++ CanYouBuildIt/test/Views/Credits.xaml.cs | 9 +++ CanYouBuildIt/test/Views/Favoris.xaml | 60 ++++++++++++++ CanYouBuildIt/test/Views/Favoris.xaml.cs | 14 ++++ 11 files changed, 393 insertions(+) create mode 100644 CanYouBuildIt/test/Model/Build.cs create mode 100644 CanYouBuildIt/test/Model/Composant.cs create mode 100644 CanYouBuildIt/test/Model/IUtilisateur.cs create mode 100644 CanYouBuildIt/test/Model/Manager.cs create mode 100644 CanYouBuildIt/test/Model/Utilisateur.cs create mode 100644 CanYouBuildIt/test/Views/Acceuil.xaml create mode 100644 CanYouBuildIt/test/Views/Acceuil.xaml.cs create mode 100644 CanYouBuildIt/test/Views/Credits.xaml create mode 100644 CanYouBuildIt/test/Views/Credits.xaml.cs create mode 100644 CanYouBuildIt/test/Views/Favoris.xaml create mode 100644 CanYouBuildIt/test/Views/Favoris.xaml.cs diff --git a/CanYouBuildIt/test/Model/Build.cs b/CanYouBuildIt/test/Model/Build.cs new file mode 100644 index 0000000..9d6ea34 --- /dev/null +++ b/CanYouBuildIt/test/Model/Build.cs @@ -0,0 +1,41 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.Intrinsics.X86; +using System.Text; +using System.Threading.Tasks; + +namespace CanYouBuildIt.Model +{ + public class Build + { + public int id { get; private set; } + public float prix { get; private set; } + public List listComp { get; private set; } + + + public Build(int idBuild, float prixBuild, Composant boitier, Composant processeur, Composant ventirad, Composant cartemere, Composant memoirevive, Composant cartegraphique, Composant alimentation, Composant ventilateur, Composant ssd = null, Composant hdd = null) + { + id = idBuild; + prix = prixBuild; + listComp.Add(boitier); + listComp.Add(processeur); + listComp.Add(ventirad); + listComp.Add(cartemere); + listComp.Add(memoirevive); + listComp.Add(cartegraphique); + listComp.Add(alimentation); + listComp.Add(ventilateur); + if(ssd != null) + { + listComp.Add(ssd); + } + if(hdd != null) + { + listComp.Add(hdd); + } + + } + + } +} diff --git a/CanYouBuildIt/test/Model/Composant.cs b/CanYouBuildIt/test/Model/Composant.cs new file mode 100644 index 0000000..7b09272 --- /dev/null +++ b/CanYouBuildIt/test/Model/Composant.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CanYouBuildIt.Model +{ + public enum TypeComposant + { + Boitier, + Processeur, + Ventirad, + CarteMere, + MemoireVive, + CarteGraphique, + Alimentation, + Ventilateur, + SSD, + HDD + } + + public class Composant + { + public string id { get; private set; } + public TypeComposant type { get; private set; } + public float prix { get; private set; } + public string lien { get; private set; } + + + public Composant( string idComp, TypeComposant typeComp, float prixCompo, string lienComp) + { + id = idComp; + type = typeComp; + prix = prixCompo; + lien = lienComp; + } + } +} diff --git a/CanYouBuildIt/test/Model/IUtilisateur.cs b/CanYouBuildIt/test/Model/IUtilisateur.cs new file mode 100644 index 0000000..e057cbe --- /dev/null +++ b/CanYouBuildIt/test/Model/IUtilisateur.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CanYouBuildIt.Model +{ + internal class IUtilisateur + { + } +} diff --git a/CanYouBuildIt/test/Model/Manager.cs b/CanYouBuildIt/test/Model/Manager.cs new file mode 100644 index 0000000..ce4caef --- /dev/null +++ b/CanYouBuildIt/test/Model/Manager.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Security.Cryptography; +using System.Text; +using System.Threading.Tasks; + +namespace CanYouBuildIt.Model +{ + public class Manager + { + public List listUtil { get; private set; } + + public Manager() + { + listUtil = new List(); + } + + public void chargeDonne() + { + Utilisateur gege =new Utilisateur("gerad","gege"); + Utilisateur gigi = new Utilisateur("Guy", "1234"); + listUtil.Add(gege); + listUtil.Add(gigi); + Console.WriteLine("SJBEVKBV listBuild; + + + public Utilisateur(string name, string pasword, List listBuild = null) + { + username = name; + password = pasword; + } + } +} diff --git a/CanYouBuildIt/test/Views/Acceuil.xaml b/CanYouBuildIt/test/Views/Acceuil.xaml new file mode 100644 index 0000000..6f9e569 --- /dev/null +++ b/CanYouBuildIt/test/Views/Acceuil.xaml @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +