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