Statistiques
| Branche: | Révision:

root / GES_PAC / View / CreateCalibrationView.xaml @ 5d673ce0

Historique | Voir | Annoter | Télécharger (5,462 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
                        <!-- O2 -->
40
                        <VerticalStackLayout>
41
                            <Label Text="O2 (% vol.)" FontSize="14" TextColor="Gray" FontAttributes="Bold"/>
42
                            <Entry Text="{Binding ConcO2 , 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 ConcO2Error}"/>
51
                        </VerticalStackLayout>
52

    
53
                        <!-- CO2 -->
54
                        <VerticalStackLayout>
55
                            <Label Text="CO2 (% vol.)" FontSize="14" TextColor="Gray" FontAttributes="Bold"/>
56
                            <Entry Text="{Binding ConcCO2, 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 ConcCO2Error}"/>
65
                        </VerticalStackLayout>
66

    
67
                        <!-- CH4 -->
68
                        <VerticalStackLayout>
69
                            <Label Text="CH4 (ppm)" FontSize="14" TextColor="Gray" FontAttributes="Bold"/>
70
                            <Entry Text="{Binding ConcCH4, 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 ConcCH4Error}"/>
79
                        </VerticalStackLayout>
80

    
81

    
82
                    </VerticalStackLayout>
83
                </VerticalStackLayout>
84
            </ScrollView>
85
            <StackLayout
86
                Margin="10"
87
                HorizontalOptions="CenterAndExpand"
88
                Orientation="Horizontal"
89
                VerticalOptions="FillAndExpand">
90

    
91
                <Button 
92
                    Text="Créer une journée"
93
                    Command="{Binding CreateCalibrationCommand}"
94
                    Style="{StaticResource btnNormal}"
95
                    IsEnabled="{Binding IsFormValid}"
96
                    VerticalOptions="End"/>
97
            </StackLayout>
98
        </StackLayout>
99
        <Grid Grid.RowSpan="1" IsVisible="{Binding IsBusy}">
100
            <Border StrokeThickness="0"
101
                            Background="Black"
102
                            Opacity="0.5"
103
                            Padding="20"
104
                            WidthRequest="160"
105
                            HeightRequest="160"
106
                            HorizontalOptions="Center"
107
                            VerticalOptions="Center"
108
                            StrokeShape="RoundRectangle 20">
109

    
110
                <VerticalStackLayout HorizontalOptions="Center" VerticalOptions="Center">
111
                    <ActivityIndicator IsRunning="True" Color="White" />
112
                    <Label Text="Chargement..."
113
                            FontSize="14"
114
                            TextColor="white"
115
                            HorizontalOptions="Center"/>
116
                </VerticalStackLayout>
117
            </Border>
118
        </Grid>
119
    </Grid>
120

    
121
</ContentPage>