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.
56 lines
1.5 KiB
56 lines
1.5 KiB
using CanYouBuildIt.Model;
|
|
using System.Diagnostics;
|
|
|
|
namespace CanYouBuildIt.Views;
|
|
|
|
public partial class Ordinateur : ContentPage
|
|
{
|
|
public Manager manager => (App.Current as App).manager;
|
|
//public Dictionary<TypeComposant, Composant> dico = new Dictionary<TypeComposant, Composant>();
|
|
|
|
public Ordinateur(int IdPc)
|
|
{
|
|
InitializeComponent();
|
|
//dico = manager.listBuild[IdPc].dComp;
|
|
Debug.WriteLine("srebvg<srdebvwwdrvg");
|
|
Debug.WriteLine(manager.listBuild[IdPc].dComp[TypeComposant.Boitier].id);
|
|
fillGrid(IdPc);
|
|
|
|
}
|
|
|
|
//dépile la fenêtre pour retourner à la précédente
|
|
public async void BackHome(object sender, EventArgs e)
|
|
{
|
|
|
|
await Navigation.PopAsync();
|
|
}
|
|
|
|
public void fillGrid(int Pc)
|
|
{
|
|
/*
|
|
//Défini la case de la grille ou sera l'image
|
|
Grid.SetRow(,);
|
|
Grid.SetColumn(,);
|
|
//Met l'image dans la grille
|
|
pcG.Children.Add();
|
|
*/
|
|
//doit récuperer dico du bon pc via indice manager
|
|
//CPU 00, boitier 01, Ram 02
|
|
//gpu 10, , Ventirad 12
|
|
//carteMère 20, , Ventilo 22
|
|
//ssd 30, alim 31 , hdd 32
|
|
|
|
Label cpu = new Label()
|
|
{
|
|
//Text = dico[TypeComposant.Processeur].id,
|
|
TextColor = Color.FromArgb("#000000")
|
|
};
|
|
//Défini la case de la grille ou sera l'image
|
|
Grid.SetRow(cpu, 0);
|
|
Grid.SetColumn(cpu, 0);
|
|
//Met l'image dans la grille
|
|
pcG.Children.Add(cpu);
|
|
|
|
|
|
}
|
|
} |