-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathEquipmentPage.xaml
More file actions
86 lines (78 loc) · 5.08 KB
/
Copy pathEquipmentPage.xaml
File metadata and controls
86 lines (78 loc) · 5.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:sys="clr-namespace:System;assembly=netstandard"
x:Class="UndacApp.Views.EquipmentPage"
Title="AddEquipments">
<ScrollView>
<VerticalStackLayout Spacing="30" Padding="30,20" VerticalOptions="Center">
<!-- Title -->
<Label Text="Add Equipments" FontSize="26" FontAttributes="Bold" HorizontalOptions="CenterAndExpand"/>
<Frame CornerRadius="10" Padding="20">
<VerticalStackLayout Spacing="5">
<Label Text="Select equipment type:" FontSize="20" FontAttributes="Bold"/>
<Picker x:Name="EquipmentTypePicker" BackgroundColor="White" TextColor="Black" TitleColor="Black">
<Picker.ItemsSource>
<x:Array Type="{x:Type x:String}">
<x:String>Vehicles</x:String>
<x:String>Communication</x:String>
<x:String>Shelter and Bedding</x:String>
<x:String>Power Generation</x:String>
</x:Array>
</Picker.ItemsSource>
</Picker>
<Label Text="Select Location:" FontSize="20" FontAttributes="Bold"/>
<Picker x:Name="BuildingTypePicker" ItemDisplayBinding="{Binding Name}" BackgroundColor="White" TextColor="Black" TitleColor="Black"/>
<Label Text="Equipment Name and Quantity:" FontSize="20" FontAttributes="Bold"/>
<Entry Placeholder="Equipment Name:" x:Name="EquipmentName" />
<Entry Placeholder="Quantity" x:Name="NumberRequiredEntry" Keyboard="Numeric"/>
<Label Text="Assign Operation" FontSize="20" FontAttributes="Bold"/>
<Picker x:Name="OperationListPicker" ItemDisplayBinding="{Binding Name}" BackgroundColor="White" TextColor="Black" TitleColor="Black"/>
<Grid ColumnDefinitions="*,*,*" ColumnSpacing="3">
<Button Text="Add Record" Grid.Column="0" Clicked="OnAddRecordClicked" BackgroundColor="#4CAF50" CornerRadius="8" />
<Button Text="Update Record" Grid.Column="1" Clicked="OnUpdateClicked" BackgroundColor="blue" CornerRadius="8" />
<Button Text="Remove Record" Grid.Column="2" Clicked="OnRemoveClicked" BackgroundColor="MediumVioletRed" CornerRadius="8" />
</Grid>
</VerticalStackLayout>
</Frame>
<Label Text="Equipment List" FontSize="26" FontAttributes="Bold" HorizontalOptions="CenterAndExpand"/>
<StackLayout Orientation="Horizontal">
<Entry x:Name="searchEntry" Placeholder="Search" HorizontalOptions="FillAndExpand" TextChanged="OnEntryTextChanged" />
<Picker x:Name="filterPicker" TextColor="White">
<Picker.Title>Filter Equipment Status</Picker.Title>
<Picker.ItemsSource>
<x:Array Type="{x:Type x:String}">
<x:String>Name</x:String>
<x:String>Type</x:String>
<x:String>Location</x:String>
</x:Array>
</Picker.ItemsSource>
<Picker.SelectedItem>Name</Picker.SelectedItem>
</Picker>
</StackLayout>
<Button Text="Filter" Clicked="Button_Clicked" CornerRadius="8" />
<ListView x:Name="ltv_equipments" Background="white" ItemSelected="ltv_equipments_ItemSelected">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<Grid Padding="10">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Label Grid.Row="0" Text="{Binding CurrentOperation}" TextColor="Black" FontAttributes="Bold"/>
<Label Grid.Row="1" Text="{Binding Type}" TextColor="Black"/>
<Label Grid.Row="2" Text="{Binding Name}" TextColor="Black"/>
<Label Grid.Row="3" Text="{Binding Location}" TextColor="Black"/>
<Label Grid.Row="4" Text="{Binding Quantity}" TextColor="Black"/>
</Grid>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</VerticalStackLayout>
</ScrollView>
</ContentPage>