parent
e89abf6fbf
commit
1305bfe4ca
@ -1,29 +0,0 @@
|
|||||||
<Frame>
|
|
||||||
<VerticalStackLayout>
|
|
||||||
<Image Source="{Binding manager.listBuild[0].image}"
|
|
||||||
Grid.Row="0" Grid.Column="0"
|
|
||||||
HeightRequest="200"/>
|
|
||||||
<Label Text="{Binding manager.listBuild[0].prix}"/>
|
|
||||||
</VerticalStackLayout>
|
|
||||||
</Frame>
|
|
||||||
|
|
||||||
<Image Source="pc3.png"
|
|
||||||
Grid.Row="0" Grid.Column="2"
|
|
||||||
HeightRequest="200"
|
|
||||||
/>
|
|
||||||
<Image Source="pc3.png"
|
|
||||||
Grid.Row="0" Grid.Column="4"
|
|
||||||
HeightRequest="200"
|
|
||||||
/>
|
|
||||||
<Image Source="pc2.png"
|
|
||||||
Grid.Row="1" Grid.Column="1"
|
|
||||||
HeightRequest="200"
|
|
||||||
/>
|
|
||||||
<Image Source="pc4.png"
|
|
||||||
Grid.Row="1" Grid.Column="3"
|
|
||||||
HeightRequest="200"
|
|
||||||
/>
|
|
||||||
<Image Source="pc2.png"
|
|
||||||
Grid.Row="1" Grid.Column="5"
|
|
||||||
HeightRequest="200"
|
|
||||||
/>
|
|
@ -0,0 +1,148 @@
|
|||||||
|
<?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="CanYouBuildIt.Views.Ordinateur"
|
||||||
|
Title="Ordinateur"
|
||||||
|
BackgroundColor="#26B4BE">
|
||||||
|
<VerticalStackLayout>
|
||||||
|
|
||||||
|
<ImageButton Source="logoapp.png"
|
||||||
|
Clicked="BackHome"
|
||||||
|
MaximumHeightRequest="150"/>
|
||||||
|
|
||||||
|
<Grid x:Name="pcG">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition />
|
||||||
|
<RowDefinition />
|
||||||
|
<RowDefinition />
|
||||||
|
<RowDefinition />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition />
|
||||||
|
<ColumnDefinition />
|
||||||
|
<ColumnDefinition />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<Frame BackgroundColor="#16A4AE"
|
||||||
|
CornerRadius="10"
|
||||||
|
Grid.Row="0" Grid.Column="0"
|
||||||
|
HeightRequest="250"
|
||||||
|
Margin="2,5,2,5">
|
||||||
|
<Label Text="CPU"
|
||||||
|
HorizontalOptions="Start"
|
||||||
|
VerticalOptions="Start">
|
||||||
|
</Label>
|
||||||
|
|
||||||
|
</Frame>
|
||||||
|
|
||||||
|
<Frame BackgroundColor="#16A4AE"
|
||||||
|
CornerRadius="10"
|
||||||
|
Grid.Row="0" Grid.Column="1"
|
||||||
|
HeightRequest="250"
|
||||||
|
Margin="2,5,2,5">
|
||||||
|
<Label Text="Boitier"
|
||||||
|
HorizontalOptions="Start"
|
||||||
|
VerticalOptions="Start">
|
||||||
|
</Label>
|
||||||
|
|
||||||
|
</Frame>
|
||||||
|
|
||||||
|
<Frame BackgroundColor="#16A4AE"
|
||||||
|
CornerRadius="10"
|
||||||
|
Grid.Row="0" Grid.Column="2"
|
||||||
|
HeightRequest="250"
|
||||||
|
Margin="2,5,2,5">
|
||||||
|
<Label Text="RAM"
|
||||||
|
HorizontalOptions="Start"
|
||||||
|
VerticalOptions="Start">
|
||||||
|
</Label>
|
||||||
|
|
||||||
|
</Frame>
|
||||||
|
|
||||||
|
<Frame BackgroundColor="#16A4AE"
|
||||||
|
CornerRadius="10"
|
||||||
|
Grid.Row="1" Grid.Column="0"
|
||||||
|
HeightRequest="250"
|
||||||
|
Margin="2,5,2,5">
|
||||||
|
<Label Text="GPU"
|
||||||
|
HorizontalOptions="Start"
|
||||||
|
VerticalOptions="Start">
|
||||||
|
</Label>
|
||||||
|
|
||||||
|
</Frame>
|
||||||
|
|
||||||
|
<Frame BackgroundColor="#16A4AE"
|
||||||
|
CornerRadius="10"
|
||||||
|
Grid.Row="1" Grid.Column="2"
|
||||||
|
HeightRequest="250"
|
||||||
|
Margin="2,5,2,5">
|
||||||
|
<Label Text="Ventirad"
|
||||||
|
HorizontalOptions="Start"
|
||||||
|
VerticalOptions="Start">
|
||||||
|
</Label>
|
||||||
|
|
||||||
|
</Frame>
|
||||||
|
|
||||||
|
<Frame BackgroundColor="#16A4AE"
|
||||||
|
CornerRadius="10"
|
||||||
|
Grid.Row="2" Grid.Column="0"
|
||||||
|
HeightRequest="250"
|
||||||
|
Margin="2,5,2,5">
|
||||||
|
<Label Text="CarteMère"
|
||||||
|
HorizontalOptions="Start"
|
||||||
|
VerticalOptions="Start">
|
||||||
|
</Label>
|
||||||
|
|
||||||
|
</Frame>
|
||||||
|
|
||||||
|
<Frame BackgroundColor="#16A4AE"
|
||||||
|
CornerRadius="10"
|
||||||
|
Grid.Row="2" Grid.Column="2"
|
||||||
|
HeightRequest="250"
|
||||||
|
Margin="2,5,2,5">
|
||||||
|
<Label Text="Ventilo"
|
||||||
|
HorizontalOptions="Start"
|
||||||
|
VerticalOptions="Start">
|
||||||
|
</Label>
|
||||||
|
|
||||||
|
</Frame>
|
||||||
|
|
||||||
|
<Frame BackgroundColor="#16A4AE"
|
||||||
|
CornerRadius="10"
|
||||||
|
Grid.Row="3" Grid.Column="0"
|
||||||
|
HeightRequest="250"
|
||||||
|
Margin="2,5,2,5">
|
||||||
|
<Label Text="SSD"
|
||||||
|
HorizontalOptions="Start"
|
||||||
|
VerticalOptions="Start">
|
||||||
|
</Label>
|
||||||
|
|
||||||
|
</Frame>
|
||||||
|
|
||||||
|
<Frame BackgroundColor="#16A4AE"
|
||||||
|
CornerRadius="10"
|
||||||
|
Grid.Row="3" Grid.Column="1"
|
||||||
|
HeightRequest="250"
|
||||||
|
Margin="2,5,2,5">
|
||||||
|
<Label Text="Alimentation"
|
||||||
|
HorizontalOptions="Start"
|
||||||
|
VerticalOptions="Start">
|
||||||
|
</Label>
|
||||||
|
|
||||||
|
</Frame>
|
||||||
|
|
||||||
|
<Frame BackgroundColor="#16A4AE"
|
||||||
|
CornerRadius="10"
|
||||||
|
Grid.Row="3" Grid.Column="2"
|
||||||
|
HeightRequest="250"
|
||||||
|
Margin="2,5,2,5">
|
||||||
|
<Label Text="HDD"
|
||||||
|
HorizontalOptions="Start"
|
||||||
|
VerticalOptions="Start">
|
||||||
|
</Label>
|
||||||
|
|
||||||
|
</Frame>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
</VerticalStackLayout>
|
||||||
|
</ContentPage>
|
@ -0,0 +1,56 @@
|
|||||||
|
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);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in new issue