root / GES_PAC / View / CreateCalibrationView.xaml @ 42456640
Historique | Voir | Annoter | Télécharger (7,371 ko)
1 | 5d673ce0 | Lucas Bihannic | <?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 | 12ddf7ef | lbihannic | xmlns:controls="clr-namespace:GES_PAC.Controls" |
7 | 5d673ce0 | Lucas Bihannic | x:Class="GES_PAC.View.CreateCalibrationView" |
8 | x:DataType="vm:CreateCalibrationViewModel"> |
||
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="Mesure de calibration" |
||
18 | FontSize="20" |
||
19 | FontAttributes="Bold" |
||
20 | HorizontalOptions="Center" /> |
||
21 | <VerticalStackLayout Spacing="15" WidthRequest="300"> |
||
22 | |||
23 | <!-- Type de calibration -->
|
||
24 | <VerticalStackLayout>
|
||
25 | |||
26 | <Label Text="Type de calibration" FontSize="14" TextColor="Gray" FontAttributes="Bold"/> |
||
27 | |||
28 | <Picker Title="Sélectionnez un type de calibration" |
||
29 | ItemsSource="{Binding TypeCalibrations}" |
||
30 | ItemDisplayBinding="{Binding Name}" |
||
31 | SelectedItem="{Binding SelectedType}" /> |
||
32 | |||
33 | |||
34 | <Label Text="Sélectionnez un type de calibration" |
||
35 | FontSize="12" |
||
36 | TextColor="Red" |
||
37 | IsVisible="{Binding TypeError}"/> |
||
38 | </VerticalStackLayout>
|
||
39 | |||
40 | 09d4a0de | lbihannic | <!-- CH4 -->
|
41 | <VerticalStackLayout>
|
||
42 | <Label Text="CH4 (ppm)" FontSize="14" TextColor="Gray" FontAttributes="Bold"/> |
||
43 | 957b1f34 | lbihannic | <Grid ColumnDefinitions="*,Auto" ColumnSpacing="5"> |
44 | <controls:DoubleEntry Text="{Binding ConcCH4, Mode=OneWayToSource, TargetNullValue=''}" /> |
||
45 | <Label Grid.Column="1" |
||
46 | Text="{Binding LastCH4, StringFormat='[{0} ppm]'}" |
||
47 | FontSize="16" |
||
48 | TextColor="{Binding LastCH4Color}" |
||
49 | VerticalOptions="Center" |
||
50 | HorizontalOptions="End" |
||
51 | IsVisible="{Binding HasLastMeasure}" /> |
||
52 | </Grid>
|
||
53 | 09d4a0de | lbihannic | <Label Text="Entrez une valeur" |
54 | FontSize="12" |
||
55 | TextColor="Red" |
||
56 | IsVisible="{Binding ConcCH4Error}"/> |
||
57 | </VerticalStackLayout>
|
||
58 | |||
59 | 5d673ce0 | Lucas Bihannic | <!-- O2 -->
|
60 | <VerticalStackLayout>
|
||
61 | <Label Text="O2 (% vol.)" FontSize="14" TextColor="Gray" FontAttributes="Bold"/> |
||
62 | 957b1f34 | lbihannic | <Grid ColumnDefinitions="*,Auto" ColumnSpacing="5"> |
63 | <controls:DoubleEntry Text="{Binding ConcO2, Mode=OneWayToSource, TargetNullValue=''}" /> |
||
64 | <Label Grid.Column="1" |
||
65 | Text="{Binding LastO2, StringFormat='[{0} %]'}" |
||
66 | FontSize="16" |
||
67 | TextColor="{Binding LastO2Color}" |
||
68 | VerticalOptions="Center" |
||
69 | HorizontalOptions="End" |
||
70 | IsVisible="{Binding HasLastMeasure}" /> |
||
71 | </Grid>
|
||
72 | 5d673ce0 | Lucas Bihannic | <Label Text="Entrez une valeur" |
73 | FontSize="12" |
||
74 | TextColor="Red" |
||
75 | IsVisible="{Binding ConcO2Error}"/> |
||
76 | </VerticalStackLayout>
|
||
77 | |||
78 | <!-- CO2 -->
|
||
79 | <VerticalStackLayout>
|
||
80 | <Label Text="CO2 (% vol.)" FontSize="14" TextColor="Gray" FontAttributes="Bold"/> |
||
81 | 957b1f34 | lbihannic | <Grid ColumnDefinitions="*,Auto" ColumnSpacing="5"> |
82 | <controls:DoubleEntry Text="{Binding ConcCO2, Mode=OneWayToSource, TargetNullValue=''}" /> |
||
83 | <Label Grid.Column="1" |
||
84 | Text="{Binding LastCO2, StringFormat='[{0} %]'}" |
||
85 | FontSize="16" |
||
86 | TextColor="{Binding LastCO2Color}" |
||
87 | VerticalOptions="Center" |
||
88 | HorizontalOptions="End" |
||
89 | IsVisible="{Binding HasLastMeasure}" /> |
||
90 | </Grid>
|
||
91 | 5d673ce0 | Lucas Bihannic | <Label Text="Entrez une valeur" |
92 | FontSize="12" |
||
93 | TextColor="Red" |
||
94 | IsVisible="{Binding ConcCO2Error}"/> |
||
95 | </VerticalStackLayout>
|
||
96 | |||
97 | 09d4a0de | lbihannic | <!-- Ref Bouteille -->
|
98 | <VerticalStackLayout IsVisible="{Binding IsRefBouteilleVisible}"> |
||
99 | <Label Text="Référence bouteille" FontSize="14" TextColor="Gray" FontAttributes="Bold"/> |
||
100 | <Entry Text="{Binding RefBouteille}" |
||
101 | FontSize="16" |
||
102 | TextColor="Black" |
||
103 | Placeholder="0001-0002"/> |
||
104 | <Label Text="Min. 5 caractères" |
||
105 | 5d673ce0 | Lucas Bihannic | FontSize="12" |
106 | TextColor="Red" |
||
107 | 09d4a0de | lbihannic | IsVisible="{Binding RefBouteilleError}"/> |
108 | 5d673ce0 | Lucas Bihannic | </VerticalStackLayout>
|
109 | |||
110 | </VerticalStackLayout>
|
||
111 | </VerticalStackLayout>
|
||
112 | </ScrollView>
|
||
113 | <StackLayout
|
||
114 | Margin="10" |
||
115 | HorizontalOptions="CenterAndExpand" |
||
116 | Orientation="Horizontal" |
||
117 | VerticalOptions="FillAndExpand"> |
||
118 | |||
119 | <Button
|
||
120 | 09d4a0de | lbihannic | Text="Enregistrer les mesures" |
121 | 5d673ce0 | Lucas Bihannic | Command="{Binding CreateCalibrationCommand}" |
122 | Style="{StaticResource btnNormal}" |
||
123 | IsEnabled="{Binding IsFormValid}" |
||
124 | VerticalOptions="End"/> |
||
125 | </StackLayout>
|
||
126 | </StackLayout>
|
||
127 | <Grid Grid.RowSpan="1" IsVisible="{Binding IsBusy}"> |
||
128 | <Border StrokeThickness="0" |
||
129 | Background="Black" |
||
130 | Opacity="0.5" |
||
131 | Padding="20" |
||
132 | WidthRequest="160" |
||
133 | HeightRequest="160" |
||
134 | HorizontalOptions="Center" |
||
135 | VerticalOptions="Center" |
||
136 | StrokeShape="RoundRectangle 20"> |
||
137 | |||
138 | <VerticalStackLayout HorizontalOptions="Center" VerticalOptions="Center"> |
||
139 | <ActivityIndicator IsRunning="True" Color="White" /> |
||
140 | <Label Text="Chargement..." |
||
141 | FontSize="14" |
||
142 | TextColor="white" |
||
143 | HorizontalOptions="Center"/> |
||
144 | </VerticalStackLayout>
|
||
145 | </Border>
|
||
146 | </Grid>
|
||
147 | </Grid>
|
||
148 | |||
149 | </ContentPage> |