Statistiques
| Branche: | Révision:

root / GES_PAC / View / ChambersView.xaml @ 1019554c

Historique | Voir | Annoter | Télécharger (10,044 ko)

1
<?xml version="1.0" encoding="utf-8" ?>
2
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
3
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
4
             xmlns:vm="clr-namespace:GES_PAC.ViewModel"
5
             xmlns:tools="clr-namespace:GES_PAC.View.Tools"
6

    
7
             x:Class="GES_PAC.View.ChambersView"
8
             x:DataType="vm:ChambersViewModel">
9

    
10
    <Grid>
11
        <StackLayout BackgroundColor="White" Spacing="50">
12
            <tools:ConnectionIndicatorView />
13
            <ScrollView>
14

    
15
                <VerticalStackLayout Grid.Row="1" Spacing="5">
16

    
17
                    <Label Text="Série n°1"
18
                       FontSize="16"
19
                       FontAttributes="Bold"
20
                       HorizontalOptions="Center" />
21

    
22
                    <VerticalStackLayout HorizontalOptions="Center" VerticalOptions="Center" Spacing="10">
23

    
24
                        <!-- Remorque -->
25
                        <Border Stroke="Black" StrokeThickness="2" BackgroundColor="Transparent" HorizontalOptions="Center" StrokeShape="RoundRectangle 10">
26

    
27
                            <Grid
28
                                BackgroundColor="LightGray"
29
                                Padding="5"
30
                                RowSpacing="0"
31
                                ColumnSpacing="5"
32
                                WidthRequest="250"
33
                                HeightRequest="500">
34

    
35
                                <Grid.ColumnDefinitions>
36
                                    <ColumnDefinition Width="Auto"/>
37
                                    <ColumnDefinition Width="80"/>
38
                                    <ColumnDefinition Width="Auto"/>
39
                                </Grid.ColumnDefinitions>
40

    
41
                                <Grid.RowDefinitions>
42
                                    <RowDefinition Height="*" />
43
                                    <RowDefinition Height="*" />
44
                                    <RowDefinition Height="*" />
45
                                    <RowDefinition Height="*" />
46
                                    <RowDefinition Height="*" />
47
                                    <RowDefinition Height="*" />
48
                                </Grid.RowDefinitions>
49

    
50
                                <!-- Boutons Gauche -->
51
                                <Grid Grid.Row="5" Grid.Column="0">
52
                                    <Button Text="1" Style="{StaticResource ChambreButtonStyle}" Command="{Binding OnClickChamberCommand}" CommandParameter="1" BackgroundColor="{Binding ChamberColors[0]}" />
53
                                    <Label Text="{Binding ChamberNumbers[0]}" FontSize="10" Margin="3" HorizontalOptions="Start" VerticalOptions="Start" />
54
                                </Grid>
55
                                <Grid Grid.Row="4" Grid.Column="0">
56
                                    <Button Text="3" Style="{StaticResource ChambreButtonStyle}" Command="{Binding OnClickChamberCommand}" CommandParameter="3" BackgroundColor="{Binding ChamberColors[2]}" />
57
                                    <Label Text="{Binding ChamberNumbers[2]}" FontSize="10" Margin="3" HorizontalOptions="Start" VerticalOptions="Start" />
58
                                </Grid>
59
                                <Grid Grid.Row="3" Grid.Column="0">
60
                                    <Button Text="5" Style="{StaticResource ChambreButtonStyle}" Command="{Binding OnClickChamberCommand}" CommandParameter="5" BackgroundColor="{Binding ChamberColors[4]}" />
61
                                    <Label Text="{Binding ChamberNumbers[4]}" FontSize="10" Margin="3" HorizontalOptions="Start" VerticalOptions="Start" />
62
                                </Grid>
63
                                <Grid Grid.Row="2" Grid.Column="0">
64
                                    
65
                                    <Button Text="7" Style="{StaticResource ChambreButtonStyle}" Command="{Binding OnClickChamberCommand}" CommandParameter="7" BackgroundColor="{Binding ChamberColors[6]}" />
66
                                    <Label Text="{Binding ChamberNumbers[6]}" FontSize="10" Margin="3" HorizontalOptions="Start" VerticalOptions="Start" />
67
                                </Grid>
68
                                <Grid Grid.Row="1" Grid.Column="0">
69
                                    <Button Text="9" Style="{StaticResource ChambreButtonStyle}" Command="{Binding OnClickChamberCommand}" CommandParameter="9" BackgroundColor="{Binding ChamberColors[8]}" />
70
                                    <Label Text="{Binding ChamberNumbers[8]}" FontSize="10" Margin="3" HorizontalOptions="Start" VerticalOptions="Start" />
71
                                </Grid>
72
                                <Grid Grid.Row="0" Grid.Column="0">
73
                                    <Button Text="11" Style="{StaticResource ChambreButtonStyle}" Command="{Binding OnClickChamberCommand}" CommandParameter="11" BackgroundColor="{Binding ChamberColors[10]}" />
74
                                    <Label Text="{Binding ChamberNumbers[10]}" FontSize="10" Margin="3" HorizontalOptions="Start" VerticalOptions="Start" />
75
                                </Grid>
76

    
77
                                <!-- Boutons Droite -->
78
                                <Grid Grid.Row="5" Grid.Column="2">
79
                                    <Button Text="2" Style="{StaticResource ChambreButtonStyle}" Command="{Binding OnClickChamberCommand}" CommandParameter="2" BackgroundColor="{Binding ChamberColors[1]}" />
80
                                    <Label Text="{Binding ChamberNumbers[1]}" FontSize="10" Margin="3" HorizontalOptions="Start" VerticalOptions="Start" />
81
                                </Grid>
82
                                <Grid Grid.Row="4" Grid.Column="2">
83
                                    <Button Text="4" Style="{StaticResource ChambreButtonStyle}" Command="{Binding OnClickChamberCommand}" CommandParameter="4" BackgroundColor="{Binding ChamberColors[3]}" />
84
                                    <Label Text="{Binding ChamberNumbers[3]}" FontSize="10" Margin="3" HorizontalOptions="Start" VerticalOptions="Start" />
85
                                </Grid>
86
                                <Grid Grid.Row="3" Grid.Column="2">
87
                                    <Button Text="6" Style="{StaticResource ChambreButtonStyle}" Command="{Binding OnClickChamberCommand}" CommandParameter="6" BackgroundColor="{Binding ChamberColors[5]}" />
88
                                    <Label Text="{Binding ChamberNumbers[5]}" FontSize="10" Margin="3" HorizontalOptions="Start" VerticalOptions="Start" />
89
                                </Grid>
90
                                <Grid Grid.Row="2" Grid.Column="2">
91
                                    <Button Text="8" Style="{StaticResource ChambreButtonStyle}" Command="{Binding OnClickChamberCommand}" CommandParameter="8" BackgroundColor="{Binding ChamberColors[7]}" />
92
                                    <Label Text="{Binding ChamberNumbers[7]}" FontSize="10" Margin="3" HorizontalOptions="Start" VerticalOptions="Start" />
93
                                </Grid>
94
                                <Grid Grid.Row="1" Grid.Column="2">
95
                                    <Button Text="10" Style="{StaticResource ChambreButtonStyle}" Command="{Binding OnClickChamberCommand}" CommandParameter="10" BackgroundColor="{Binding ChamberColors[9]}" />
96
                                    <Label Text="{Binding ChamberNumbers[9]}" FontSize="10" Margin="3" HorizontalOptions="Start" VerticalOptions="Start" />
97
                                </Grid>
98
                                <Grid Grid.Row="0" Grid.Column="2">
99
                                    <Button Text="12" Style="{StaticResource ChambreButtonStyle}" Command="{Binding OnClickChamberCommand}" CommandParameter="12" BackgroundColor="{Binding ChamberColors[11]}" />
100
                                    <Label Text="{Binding ChamberNumbers[11]}" FontSize="10" Margin="3" HorizontalOptions="Start" VerticalOptions="Start" />
101
                                </Grid>
102

    
103
                                <!-- Couloir central -->
104
                                <BoxView Grid.Column="1" Grid.RowSpan="6" HeightRequest="500" WidthRequest="75" Color="Gray"/>
105
                            </Grid>
106

    
107
                        </Border>
108

    
109
                        <!-- Arrow -->
110
                        <Image Source="arrow"
111
                           HeightRequest="75"
112
                           WidthRequest="75"
113
                           Rotation="-90"
114
                           TranslationY="20"
115
                           HorizontalOptions="Center"
116
                           BackgroundColor="Transparent"/>
117
                    </VerticalStackLayout>
118

    
119

    
120
                </VerticalStackLayout>
121
            </ScrollView>
122
            <StackLayout
123
                Margin="-40"
124
                HorizontalOptions="Center"
125
                Orientation="Horizontal"
126
                VerticalOptions="Fill">
127

    
128
                <Button 
129
                    Text="Terminer les mesures"
130
                    Command="{Binding TerminateSetCommand}"
131
                    Style="{StaticResource btnNormal}"
132
                    IsEnabled="{Binding IsFormValid}"
133
                    VerticalOptions="End"/>
134
            </StackLayout>
135
        </StackLayout>
136
        <Grid Grid.RowSpan="1" IsVisible="{Binding IsBusy}">
137
            <Border StrokeThickness="0"
138
                            Background="Black"
139
                            Opacity="0.5"
140
                            Padding="20"
141
                            WidthRequest="160"
142
                            HeightRequest="160"
143
                            HorizontalOptions="Center"
144
                            VerticalOptions="Center"
145
                            StrokeShape="RoundRectangle 20">
146

    
147
                <VerticalStackLayout HorizontalOptions="Center" VerticalOptions="Center">
148
                    <ActivityIndicator IsRunning="True" Color="White" />
149
                    <Label Text="Chargement..."
150
                            FontSize="14"
151
                            TextColor="white"
152
                            HorizontalOptions="Center"/>
153
                </VerticalStackLayout>
154
            </Border>
155
        </Grid>
156
    </Grid>
157

    
158
</ContentPage>