Statistiques
| Branche: | Révision:

root / GES_PAC / View / CreateSetView.xaml @ 957b1f34

Historique | Voir | Annoter | Télécharger (4,972 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
                         xmlns:controls="clr-namespace:GES_PAC.Controls"
7
             x:Class="GES_PAC.View.CreateSetView"
8
             x:DataType="vm:CreateSetViewModel">
9

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

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

    
17
                    <Label Text="Informations de la série"
18
                       FontSize="20"
19
                       FontAttributes="Bold"
20
                       HorizontalOptions="Center" />
21
                    <VerticalStackLayout Spacing="15" WidthRequest="300">
22

    
23
                        <!-- Mise à jeun -->
24
                        <VerticalStackLayout>
25

    
26
                            <Label Text="Heure de mise à jeun" FontSize="14" TextColor="Gray" FontAttributes="Bold"/>
27

    
28
                            <HorizontalStackLayout HorizontalOptions="Center">
29
                                <TimePicker Time="{Binding TimeMAJ, Mode=TwoWay}"
30
                                    Format="HH:mm" FontSize="20"/>
31
                            </HorizontalStackLayout>
32

    
33

    
34
                            <Label Text="Sélectionnez une heure valide"
35
                                FontSize="12"
36
                                TextColor="Red"
37
                                IsVisible="{Binding DateMAJError}"/>
38
                        </VerticalStackLayout>
39

    
40
                        <!-- Température -->
41
                        <VerticalStackLayout>
42
                            <Label Text="Température (°C)" FontSize="14" TextColor="Gray" FontAttributes="Bold"/>
43
                            <controls:DoubleEntry Text="{Binding Temperature, Mode=OneWayToSource}" Placeholder="25,0"/>
44
                            <Label Text="Entrez une valeur"
45
                                FontSize="12"
46
                                TextColor="Red"
47
                                IsVisible="{Binding TemperatureError}"/>
48
                        </VerticalStackLayout>
49

    
50
                        <!-- Humidité -->
51
                        <VerticalStackLayout>
52
                            <Label Text="Humidité (%)" FontSize="14" TextColor="Gray" FontAttributes="Bold"/>
53
                            <controls:DoubleEntry Text="{Binding Humidite, Mode=OneWayToSource}" Placeholder="50,0"/>
54
                            <Label Text="Entrez une valeur"
55
                                FontSize="12"
56
                                TextColor="Red"
57
                                IsVisible="{Binding HumiditeError}"/>
58
                        </VerticalStackLayout>
59
                        
60
                        <!-- Pression -->
61
                        <VerticalStackLayout>
62
                            <Label Text="Pression (hPa)" FontSize="14" TextColor="Gray" FontAttributes="Bold"/>
63
                            <controls:DoubleEntry Text="{Binding Pression, Mode=OneWayToSource}" Placeholder="1,5"/>
64
                            <Label Text="Entrez une valeur"
65
                                FontSize="12"
66
                                TextColor="Red"
67
                                IsVisible="{Binding PressionError}"/>
68
                        </VerticalStackLayout>
69

    
70
                    </VerticalStackLayout>
71
                </VerticalStackLayout>
72
            </ScrollView>
73
            <StackLayout
74
                Margin="10"
75
                HorizontalOptions="CenterAndExpand"
76
                Orientation="Horizontal"
77
                VerticalOptions="FillAndExpand">
78

    
79
                <Button 
80
                    Text="Enregistrer"
81
                    Command="{Binding CreateSetCommand}"
82
                    Style="{StaticResource btnNormal}"
83
                    IsEnabled="{Binding IsFormValid}"
84
                    VerticalOptions="End"/>
85
            </StackLayout>
86
        </StackLayout>
87
        <Grid Grid.RowSpan="1" IsVisible="{Binding IsBusy}">
88
            <Border StrokeThickness="0"
89
                            Background="Black"
90
                            Opacity="0.5"
91
                            Padding="20"
92
                            WidthRequest="160"
93
                            HeightRequest="160"
94
                            HorizontalOptions="Center"
95
                            VerticalOptions="Center"
96
                            StrokeShape="RoundRectangle 20">
97

    
98
                <VerticalStackLayout HorizontalOptions="Center" VerticalOptions="Center">
99
                    <ActivityIndicator IsRunning="True" Color="White" />
100
                    <Label Text="Chargement..."
101
                            FontSize="14"
102
                            TextColor="white"
103
                            HorizontalOptions="Center"/>
104
                </VerticalStackLayout>
105
            </Border>
106
        </Grid>
107
    </Grid>
108

    
109
</ContentPage>