Statistiques
| Branche: | Révision:

root / GES_PAC / View / CreateBehaviourView.xaml @ 12ddf7ef

Historique | Voir | Annoter | Télécharger (4,058 ko)

1 9fd69a0e 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
             x:Class="GES_PAC.View.CreateBehaviourView"
7
             x:DataType="vm:CreateBehaviourViewModel">
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
                        <!-- Type de comportement -->
23
                        <VerticalStackLayout>
24
25
                            <Label Text="Type de comportement" FontSize="14" TextColor="Gray" FontAttributes="Bold"/>
26
27
                            <Picker Title="Sélectionnez un type de comportement"
28
                                ItemsSource="{Binding TypeComp}"
29
                                SelectedItem="{Binding SelectedType}" />
30
31
32
                            <Label Text="Sélectionnez un type de comportement"
33
                                FontSize="12"
34
                                TextColor="Red"
35
                                IsVisible="{Binding TypeError}"/>
36
                        </VerticalStackLayout>
37
38
                        <!-- Commentaire -->
39
                        <VerticalStackLayout>
40
                            <Label Text="Commentaire" FontSize="14" TextColor="Gray" FontAttributes="Bold"/>
41
                            <Entry Text="{Binding Description, Mode=TwoWay, TargetNullValue=''}" 
42
                                   FontSize="16" 
43
                                   TextColor="Black" 
44
                                   Placeholder="(facultatif)"/>
45
                        </VerticalStackLayout>
46
47 12ddf7ef lbihannic
                        <!-- Sortie de l'animal -->
48 9fd69a0e lbihannic
                        <HorizontalStackLayout HorizontalOptions="Center" VerticalOptions="Center">
49
                            <CheckBox IsChecked="{Binding IsAnimalOut}" HorizontalOptions="Center" />
50
                            <Label Text="Sortie de l'animal" FontSize="14" TextColor="Gray" HorizontalOptions="Center" VerticalOptions="Center" />
51
                        </HorizontalStackLayout>
52
53
                    </VerticalStackLayout>
54
                </VerticalStackLayout>
55
            </ScrollView>
56
            <StackLayout
57
                Margin="10"
58
                HorizontalOptions="CenterAndExpand"
59
                Orientation="Horizontal"
60
                VerticalOptions="FillAndExpand">
61
62
                <Button 
63
                    Text="Enregistrer"
64
                    Command="{Binding CreateBehaviourCommand}"
65
                    Style="{StaticResource btnNormal}"
66
                    IsEnabled="{Binding IsFormValid}"
67
                    VerticalOptions="End"/>
68
            </StackLayout>
69
        </StackLayout>
70
        <Grid Grid.RowSpan="1" IsVisible="{Binding IsBusy}">
71
            <Border StrokeThickness="0"
72
                            Background="Black"
73
                            Opacity="0.5"
74
                            Padding="20"
75
                            WidthRequest="160"
76
                            HeightRequest="160"
77
                            HorizontalOptions="Center"
78
                            VerticalOptions="Center"
79
                            StrokeShape="RoundRectangle 20">
80
81
                <VerticalStackLayout HorizontalOptions="Center" VerticalOptions="Center">
82
                    <ActivityIndicator IsRunning="True" Color="White" />
83
                    <Label Text="Chargement..."
84
                            FontSize="14"
85
                            TextColor="white"
86
                            HorizontalOptions="Center"/>
87
                </VerticalStackLayout>
88
            </Border>
89
        </Grid>
90
    </Grid>
91
92
</ContentPage>