root / GES_PAC / View / CreateMeasureView.xaml @ 1019554c
Historique | Voir | Annoter | Télécharger (7,631 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.CreateMeasureView" |
7 |
x:DataType="vm:CreateMeasureViewModel"> |
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="{Binding Titre}" |
17 |
FontSize="20" |
18 |
FontAttributes="Bold" |
19 |
HorizontalOptions="Center" /> |
20 |
<VerticalStackLayout Spacing="15" WidthRequest="300"> |
21 |
|
22 |
<!-- CH4 -->
|
23 |
<VerticalStackLayout>
|
24 |
<Label Text="CH4 (ppm)" FontSize="14" TextColor="Gray" FontAttributes="Bold"/> |
25 |
<Grid ColumnDefinitions="*,Auto" ColumnSpacing="5"> |
26 |
<Entry Grid.Column="0" |
27 |
Text="{Binding ConcCH4, Mode=TwoWay, TargetNullValue=''}" |
28 |
FontSize="16" |
29 |
TextColor="Black" |
30 |
Placeholder="0,0" |
31 |
Keyboard="Numeric"> |
32 |
<Entry.Triggers>
|
33 |
<DataTrigger TargetType="Entry" Binding="{Binding HasLastMeasure}" Value="False"> |
34 |
<Setter Property="Grid.ColumnSpan" Value="2" /> |
35 |
</DataTrigger>
|
36 |
</Entry.Triggers>
|
37 |
</Entry>
|
38 |
<Label Grid.Column="1" |
39 |
Text="{Binding LastCH4, StringFormat='[{0} ppm]'}" |
40 |
FontSize="16" |
41 |
TextColor="Gray" |
42 |
VerticalOptions="Center" |
43 |
HorizontalOptions="End" |
44 |
IsVisible="{Binding HasLastMeasure}" /> |
45 |
</Grid>
|
46 |
|
47 |
<Label Text="Entrez une valeur" |
48 |
FontSize="12" |
49 |
TextColor="Red" |
50 |
IsVisible="{Binding ConcCH4Error}"/> |
51 |
</VerticalStackLayout>
|
52 |
|
53 |
|
54 |
<!-- O2 -->
|
55 |
<VerticalStackLayout>
|
56 |
<Label Text="O2 (%)" FontSize="14" TextColor="Gray" FontAttributes="Bold"/> |
57 |
<Grid ColumnDefinitions="*,Auto" ColumnSpacing="5"> |
58 |
<Entry Grid.Column="0" |
59 |
Text="{Binding ConcO2, Mode=TwoWay, TargetNullValue=''}" |
60 |
FontSize="16" |
61 |
TextColor="Black" |
62 |
Placeholder="0,0" |
63 |
Keyboard="Numeric"> |
64 |
<Entry.Triggers>
|
65 |
<DataTrigger TargetType="Entry" Binding="{Binding HasLastMeasure}" Value="False"> |
66 |
<Setter Property="Grid.ColumnSpan" Value="2" /> |
67 |
</DataTrigger>
|
68 |
</Entry.Triggers>
|
69 |
</Entry>
|
70 |
<Label Grid.Column="1" |
71 |
Text="{Binding LastO2, StringFormat='[{0} %]'}" |
72 |
FontSize="16" |
73 |
TextColor="Gray" |
74 |
VerticalOptions="Center" |
75 |
HorizontalOptions="End" |
76 |
IsVisible="{Binding HasLastMeasure}" /> |
77 |
</Grid>
|
78 |
|
79 |
<Label Text="Entrez une valeur" |
80 |
FontSize="12" |
81 |
TextColor="Red" |
82 |
IsVisible="{Binding ConcO2Error}"/> |
83 |
</VerticalStackLayout>
|
84 |
|
85 |
|
86 |
<!-- CO2 -->
|
87 |
<VerticalStackLayout>
|
88 |
<Label Text="CO2 (%)" FontSize="14" TextColor="Gray" FontAttributes="Bold"/> |
89 |
<Grid ColumnDefinitions="*,Auto" ColumnSpacing="5"> |
90 |
<Entry Grid.Column="0" |
91 |
Text="{Binding ConcCO2, Mode=TwoWay, TargetNullValue=''}" |
92 |
FontSize="16" |
93 |
TextColor="Black" |
94 |
Placeholder="0,0" |
95 |
Keyboard="Numeric"> |
96 |
<Entry.Triggers>
|
97 |
<DataTrigger TargetType="Entry" Binding="{Binding HasLastMeasure}" Value="False"> |
98 |
<Setter Property="Grid.ColumnSpan" Value="2" /> |
99 |
</DataTrigger>
|
100 |
</Entry.Triggers>
|
101 |
</Entry>
|
102 |
<Label Grid.Column="1" |
103 |
Text="{Binding LastCO2, StringFormat='[{0} %]'}" |
104 |
FontSize="16" |
105 |
TextColor="Gray" |
106 |
VerticalOptions="Center" |
107 |
HorizontalOptions="End" |
108 |
IsVisible="{Binding HasLastMeasure}" /> |
109 |
</Grid>
|
110 |
|
111 |
<Label Text="Entrez une valeur" |
112 |
FontSize="12" |
113 |
TextColor="Red" |
114 |
IsVisible="{Binding ConcCO2Error}"/> |
115 |
</VerticalStackLayout>
|
116 |
|
117 |
|
118 |
</VerticalStackLayout>
|
119 |
</VerticalStackLayout>
|
120 |
</ScrollView>
|
121 |
<StackLayout
|
122 |
Margin="10" |
123 |
HorizontalOptions="CenterAndExpand" |
124 |
Orientation="Horizontal" |
125 |
VerticalOptions="FillAndExpand"> |
126 |
|
127 |
<Button
|
128 |
Text="Enregistrer les mesures" |
129 |
Command="{Binding CreateMeasureCommand}" |
130 |
Style="{StaticResource btnNormal}" |
131 |
IsEnabled="{Binding IsFormValid}" |
132 |
VerticalOptions="End"/> |
133 |
</StackLayout>
|
134 |
</StackLayout>
|
135 |
<Grid Grid.RowSpan="1" IsVisible="{Binding IsBusy}"> |
136 |
<Border StrokeThickness="0" |
137 |
Background="Black" |
138 |
Opacity="0.5" |
139 |
Padding="20" |
140 |
WidthRequest="160" |
141 |
HeightRequest="160" |
142 |
HorizontalOptions="Center" |
143 |
VerticalOptions="Center" |
144 |
StrokeShape="RoundRectangle 20"> |
145 |
|
146 |
<VerticalStackLayout HorizontalOptions="Center" VerticalOptions="Center"> |
147 |
<ActivityIndicator IsRunning="True" Color="White" /> |
148 |
<Label Text="Chargement..." |
149 |
FontSize="14" |
150 |
TextColor="white" |
151 |
HorizontalOptions="Center"/> |
152 |
</VerticalStackLayout>
|
153 |
</Border>
|
154 |
</Grid>
|
155 |
</Grid>
|
156 |
|
157 |
</ContentPage>
|