root / GES_PAC / View / CreateMeasureView.xaml @ 12ddf7ef
Historique | Voir | Annoter | Télécharger (7,602 ko)
1 | fff89fc5 | lbihannic | <?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 | fff89fc5 | lbihannic | 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 | 12ddf7ef | lbihannic | <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 | 612877b5 | lbihannic | |
46 | <Label Text="{Binding LastTime}" |
||
47 | FontSize="14" |
||
48 | FontAttributes="Bold" |
||
49 | HorizontalOptions="Center" |
||
50 | IsVisible="{Binding HasLastMeasure}"/> |
||
51 | |||
52 | fff89fc5 | lbihannic | <VerticalStackLayout Spacing="15" WidthRequest="300"> |
53 | |||
54 | <!-- CH4 -->
|
||
55 | <VerticalStackLayout>
|
||
56 | <Label Text="CH4 (ppm)" FontSize="14" TextColor="Gray" FontAttributes="Bold"/> |
||
57 | 1019554c | lbihannic | <Grid ColumnDefinitions="*,Auto" ColumnSpacing="5"> |
58 | 12ddf7ef | lbihannic | <controls:DoubleEntry Grid.Column="0" Text="{Binding ConcCH4, Mode=OneWayToSource, TargetNullValue=''}"/> |
59 | 1019554c | lbihannic | <Label Grid.Column="1" |
60 | Text="{Binding LastCH4, StringFormat='[{0} ppm]'}" |
||
61 | FontSize="16" |
||
62 | 612877b5 | lbihannic | TextColor="{Binding LastCH4Color}" |
63 | 1019554c | lbihannic | VerticalOptions="Center" |
64 | HorizontalOptions="End" |
||
65 | IsVisible="{Binding HasLastMeasure}" /> |
||
66 | </Grid>
|
||
67 | |||
68 | fff89fc5 | lbihannic | <Label Text="Entrez une valeur" |
69 | 1019554c | lbihannic | FontSize="12" |
70 | TextColor="Red" |
||
71 | IsVisible="{Binding ConcCH4Error}"/> |
||
72 | fff89fc5 | lbihannic | </VerticalStackLayout>
|
73 | |||
74 | 1019554c | lbihannic | |
75 | fff89fc5 | lbihannic | <!-- O2 -->
|
76 | <VerticalStackLayout>
|
||
77 | 1019554c | lbihannic | <Label Text="O2 (%)" FontSize="14" TextColor="Gray" FontAttributes="Bold"/> |
78 | <Grid ColumnDefinitions="*,Auto" ColumnSpacing="5"> |
||
79 | 12ddf7ef | lbihannic | <controls:DoubleEntry Grid.Column="0" Text="{Binding ConcO2, Mode=OneWayToSource, TargetNullValue=''}"/> |
80 | 1019554c | lbihannic | <Label Grid.Column="1" |
81 | Text="{Binding LastO2, StringFormat='[{0} %]'}" |
||
82 | FontSize="16" |
||
83 | 612877b5 | lbihannic | TextColor="{Binding LastO2Color}" |
84 | 1019554c | lbihannic | VerticalOptions="Center" |
85 | HorizontalOptions="End" |
||
86 | IsVisible="{Binding HasLastMeasure}" /> |
||
87 | </Grid>
|
||
88 | |||
89 | fff89fc5 | lbihannic | <Label Text="Entrez une valeur" |
90 | 1019554c | lbihannic | FontSize="12" |
91 | TextColor="Red" |
||
92 | IsVisible="{Binding ConcO2Error}"/> |
||
93 | fff89fc5 | lbihannic | </VerticalStackLayout>
|
94 | |||
95 | 1019554c | lbihannic | |
96 | fff89fc5 | lbihannic | <!-- CO2 -->
|
97 | <VerticalStackLayout>
|
||
98 | 1019554c | lbihannic | <Label Text="CO2 (%)" FontSize="14" TextColor="Gray" FontAttributes="Bold"/> |
99 | <Grid ColumnDefinitions="*,Auto" ColumnSpacing="5"> |
||
100 | 12ddf7ef | lbihannic | <controls:DoubleEntry Grid.Column="0" Text="{Binding ConcCO2, Mode=OneWayToSource, TargetNullValue=''}"/> |
101 | 1019554c | lbihannic | <Label Grid.Column="1" |
102 | Text="{Binding LastCO2, StringFormat='[{0} %]'}" |
||
103 | FontSize="16" |
||
104 | 612877b5 | lbihannic | TextColor="{Binding LastCO2Color}" |
105 | 1019554c | lbihannic | VerticalOptions="Center" |
106 | HorizontalOptions="End" |
||
107 | IsVisible="{Binding HasLastMeasure}" /> |
||
108 | </Grid>
|
||
109 | |||
110 | fff89fc5 | lbihannic | <Label Text="Entrez une valeur" |
111 | 1019554c | lbihannic | FontSize="12" |
112 | TextColor="Red" |
||
113 | IsVisible="{Binding ConcCO2Error}"/> |
||
114 | fff89fc5 | lbihannic | </VerticalStackLayout>
|
115 | 1019554c | lbihannic | |
116 | 12ddf7ef | lbihannic | <!-- 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 | 1019554c | lbihannic | |
123 | fff89fc5 | lbihannic | </VerticalStackLayout>
|
124 | </VerticalStackLayout>
|
||
125 | </ScrollView>
|
||
126 | <StackLayout
|
||
127 | Margin="10" |
||
128 | 612877b5 | lbihannic | HorizontalOptions="Center" |
129 | fff89fc5 | lbihannic | Orientation="Horizontal" |
130 | VerticalOptions="FillAndExpand"> |
||
131 | |||
132 | <Button
|
||
133 | 612877b5 | lbihannic | Text="Enregistrer" |
134 | fff89fc5 | lbihannic | 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> |