Statistiques
| Branche: | Révision:

root / GES_PAC / View / CreateCalibrationView.xaml @ ba296a27

Historique | Voir | Annoter | Télécharger (6,199 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
             x:Class="GES_PAC.View.CreateCalibrationView"
7
             x:DataType="vm:CreateCalibrationViewModel">
8

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

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

    
16
                    <Label Text="Mesure de calibration"
17
                       FontSize="20"
18
                       FontAttributes="Bold"
19
                       HorizontalOptions="Center" />
20
                    <VerticalStackLayout Spacing="15" WidthRequest="300">
21

    
22
                        <!-- Type de calibration -->
23
                        <VerticalStackLayout>
24

    
25
                            <Label Text="Type de calibration" FontSize="14" TextColor="Gray" FontAttributes="Bold"/>
26

    
27
                            <Picker Title="Sélectionnez un type de calibration"
28
                                ItemsSource="{Binding TypeCalibrations}"
29
                                ItemDisplayBinding="{Binding Name}"
30
                                SelectedItem="{Binding SelectedType}" />
31

    
32

    
33
                            <Label Text="Sélectionnez un type de calibration"
34
                                FontSize="12"
35
                                TextColor="Red"
36
                                IsVisible="{Binding TypeError}"/>
37
                        </VerticalStackLayout>
38

    
39
                        <!-- CH4 -->
40
                        <VerticalStackLayout>
41
                            <Label Text="CH4 (ppm)" FontSize="14" TextColor="Gray" FontAttributes="Bold"/>
42
                            <Entry Text="{Binding ConcCH4, Mode=TwoWay, TargetNullValue=''}" 
43
                                   FontSize="16" 
44
                                   TextColor="Black" 
45
                                   Placeholder="0,0" 
46
                                   Keyboard="Numeric"/>
47
                            <Label Text="Entrez une valeur"
48
                                FontSize="12"
49
                                TextColor="Red"
50
                                IsVisible="{Binding ConcCH4Error}"/>
51
                        </VerticalStackLayout>
52

    
53
                        <!-- O2 -->
54
                        <VerticalStackLayout>
55
                            <Label Text="O2 (% vol.)" FontSize="14" TextColor="Gray" FontAttributes="Bold"/>
56
                            <Entry Text="{Binding ConcO2 , Mode=TwoWay, TargetNullValue=''}" 
57
                                   FontSize="16" 
58
                                   TextColor="Black" 
59
                                   Placeholder="0,0" 
60
                                   Keyboard="Numeric"/>
61
                            <Label Text="Entrez une valeur"
62
                                FontSize="12"
63
                                TextColor="Red"
64
                                IsVisible="{Binding ConcO2Error}"/>
65
                        </VerticalStackLayout>
66

    
67
                        <!-- CO2 -->
68
                        <VerticalStackLayout>
69
                            <Label Text="CO2 (% vol.)" FontSize="14" TextColor="Gray" FontAttributes="Bold"/>
70
                            <Entry Text="{Binding ConcCO2, Mode=TwoWay, TargetNullValue=''}" 
71
                                   FontSize="16" 
72
                                   TextColor="Black" 
73
                                   Placeholder="0,0" 
74
                                   Keyboard="Numeric"/>
75
                            <Label Text="Entrez une valeur"
76
                                FontSize="12"
77
                                TextColor="Red"
78
                                IsVisible="{Binding ConcCO2Error}"/>
79
                        </VerticalStackLayout>
80

    
81
                        <!-- Ref Bouteille -->
82
                        <VerticalStackLayout IsVisible="{Binding IsRefBouteilleVisible}">
83
                            <Label Text="Référence bouteille" FontSize="14" TextColor="Gray" FontAttributes="Bold"/>
84
                            <Entry Text="{Binding RefBouteille}" 
85
                               FontSize="16" 
86
                               TextColor="Black" 
87
                               Placeholder="0001-0002"/>
88
                            <Label Text="Min. 5 caractères"
89
                                FontSize="12"
90
                                TextColor="Red"
91
                                IsVisible="{Binding RefBouteilleError}"/>
92
                        </VerticalStackLayout>
93

    
94
                    </VerticalStackLayout>
95
                </VerticalStackLayout>
96
            </ScrollView>
97
            <StackLayout
98
                Margin="10"
99
                HorizontalOptions="CenterAndExpand"
100
                Orientation="Horizontal"
101
                VerticalOptions="FillAndExpand">
102

    
103
                <Button 
104
                    Text="Enregistrer les mesures"
105
                    Command="{Binding CreateCalibrationCommand}"
106
                    Style="{StaticResource btnNormal}"
107
                    IsEnabled="{Binding IsFormValid}"
108
                    VerticalOptions="End"/>
109
            </StackLayout>
110
        </StackLayout>
111
        <Grid Grid.RowSpan="1" IsVisible="{Binding IsBusy}">
112
            <Border StrokeThickness="0"
113
                            Background="Black"
114
                            Opacity="0.5"
115
                            Padding="20"
116
                            WidthRequest="160"
117
                            HeightRequest="160"
118
                            HorizontalOptions="Center"
119
                            VerticalOptions="Center"
120
                            StrokeShape="RoundRectangle 20">
121

    
122
                <VerticalStackLayout HorizontalOptions="Center" VerticalOptions="Center">
123
                    <ActivityIndicator IsRunning="True" Color="White" />
124
                    <Label Text="Chargement..."
125
                            FontSize="14"
126
                            TextColor="white"
127
                            HorizontalOptions="Center"/>
128
                </VerticalStackLayout>
129
            </Border>
130
        </Grid>
131
    </Grid>
132

    
133
</ContentPage>