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