You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
54 lines
2.7 KiB
54 lines
2.7 KiB
using CanYouBuildIt.DataContractPersistance;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Diagnostics;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace CanYouBuildIt.Model
|
|
{
|
|
public class Stub : IPersistanceManager
|
|
{
|
|
public Stub() { }
|
|
public DataToPersist chargeDonnee()
|
|
{
|
|
List<Utilisateur> lu = new List<Utilisateur>();
|
|
List<Composant> lc = new List<Composant>();
|
|
|
|
//-- test de chargement de User --//
|
|
Utilisateur u1 = new Utilisateur("Clément", "1234");
|
|
Utilisateur u2 = new Utilisateur("Vivien", "vivien");
|
|
Utilisateur u3 = new Utilisateur("Kevin", "0000");
|
|
lu.Add(u1);
|
|
lu.Add(u2);
|
|
lu.Add(u3);
|
|
|
|
|
|
//-- Test pour 1 build entier --//
|
|
lc.Add(new Composant("Zalman Z10 Plus", TypeComposant.Boitier,(float)119.95, "https://www.ldlc.com/fiche/PB00502897.html"));
|
|
lc.Add(new Composant("Ryzen 5 5800X",TypeComposant.Processeur,(float)218.98, "https://www.amazon.fr/AMD-Ryzen-7-5800X-RyzenTM/dp/B0815XFSGK/"));
|
|
lc.Add(new Composant("Cooler Master MasterLiquid ML240L V2 ARGB Black Edition ",TypeComposant.Ventirad,(float)89.95, "https://www.ldlc.com/fiche/PB00454454.html"));
|
|
lc.Add(new Composant("Gigabyte B550M AORUS ELITE ",TypeComposant.CarteMere,(float)129.95, "https://www.ldlc.com/fiche/PB00357556.html"));
|
|
lc.Add(new Composant("be quiet! Pure Power 11 600W 80PLUS Gold", TypeComposant.Alimentation,(float)93.95, "https://www.ldlc.com/fiche/PB00261005.html"));
|
|
lc.Add(new Composant("ASUS RTX 3060", TypeComposant.CarteGraphique, (float)453.99, "https://www.amazon.fr/ASUS-DUAL-NVIDIA-GeForce-GDDR6/dp/B096658ZWP"));
|
|
lc.Add(new Composant("Kingston Kit mémoire FURY Beast 16 Go (2 x 8 Go) 3200 MHz DDR4 CL16", TypeComposant.RAM, (float)49.99, "https://www.amazon.fr/Kingston-3200MHz-M%C3%A9moire-KF432C16BBK2-16/dp/B097K2WBL3/"));
|
|
lc.Add(new Composant("Crucial BX500 1 To",TypeComposant.SSD,(float)74.95, "https://www.ldlc.com/fiche/PB00281733.html"));
|
|
lc.Add(new Composant("Seagate BarraCuda 2 To (ST2000DM005) ", TypeComposant.HDD,(float)62.95, "https://www.ldlc.com/fiche/PB00254339.html"));
|
|
|
|
|
|
DataToPersist data = new DataToPersist();
|
|
|
|
data.lu.AddRange(lu);
|
|
data.lc.AddRange(lc);
|
|
|
|
data.lb.Add(new Build("pc1.png",lc[0], lc[1], lc[2], lc[3], lc[6], lc[5], lc[4], null, lc[7], lc[8]));
|
|
|
|
return data;
|
|
}
|
|
|
|
public void sauvegardeDonnee(DataToPersist data)
|
|
{ }
|
|
}
|
|
}
|