-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathManage.xaml
78 lines (72 loc) · 4.3 KB
/
Manage.xaml
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
<?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:local="clr-namespace:FinanceApp"
x:Class="FinanceApp.Manage"
Title=""
BackgroundColor="#55AAFFFF">
<ContentPage.BindingContext>
<local:DatabaseLogic/>
</ContentPage.BindingContext>
<Grid Padding="10">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<!-- Input fields and pickers -->
<Entry x:Name="Company" Placeholder="Company Name" TextTransform="Uppercase" PlaceholderColor="#fffffff0" TextColor="#ffffff" Grid.Row="0" Grid.Column="0" HeightRequest="50" HorizontalOptions="FillAndExpand"/>
<Picker x:Name="BusinessType" Grid.Row="1" Grid.Column="0" HeightRequest="50" HorizontalOptions="FillAndExpand">
<Picker.ItemsSource>
<x:Array Type="{x:Type x:String}">
<x:String>Income</x:String>
<x:String>Expense</x:String>
</x:Array>
</Picker.ItemsSource>
</Picker>
<Entry x:Name="Due" Placeholder="Due Price" Keyboard="Numeric" PlaceholderColor="#fffffff0" Grid.Row="2" Grid.Column="0" HeightRequest="50" HorizontalOptions="FillAndExpand"/>
<Picker x:Name="Currency" Grid.Row="3" Grid.Column="0" HeightRequest="50" HorizontalOptions="FillAndExpand">
<Picker.ItemsSource>
<x:Array Type="{x:Type x:String}">
<x:String>PLN</x:String>
<x:String>EUR</x:String>
</x:Array>
</Picker.ItemsSource>
</Picker>
<HorizontalStackLayout Grid.Row="4" Grid.Column="0" Spacing="10" HorizontalOptions="FillAndExpand">
<Button Text="Add" TextColor="#ffffff" BorderWidth="2" BorderColor="#ffffff" BackgroundColor="#00000000" x:Name="BtnFetch" WidthRequest="65" HeightRequest="40" Clicked="BtnFetch_Clicked"/>
<Button Text="Delete" TextColor="#ffffff" BorderWidth="2" BorderColor="#ffffff" BackgroundColor="#00000000" x:Name="BtnDelete" WidthRequest="85" HeightRequest="40" Clicked="BtnDelete_Clicked"/>
<Button Text="Update" TextColor="#ffffff" BorderWidth="2" BorderColor="#ffffff" BackgroundColor="#00000000" x:Name="BtnUpdate" WidthRequest="85" HeightRequest="40" Clicked="BtnUpdate_Clicked"/>
</HorizontalStackLayout>
<StackLayout Grid.Row="5" Grid.Column="0" Orientation="Horizontal" Spacing="10">
<RadioButton x:Name="PLNtoEUR" CheckedChanged="PLNtoEUR_CheckedChanged" Content="EUR" GroupName="CurrencyEx_XAML"/>
<RadioButton x:Name="EURtoPLN" CheckedChanged="PLNtoEUR_CheckedChanged" Content="PLN" GroupName="CurrencyEx_XAML"/>
</StackLayout>
<ListView x:Name="Lv" ItemsSource="{Binding FinanceData}" Grid.Row="0" Grid.Column="1" Grid.RowSpan="6" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<Frame Background="#000000ff">
<HorizontalStackLayout Spacing="8">
<VerticalStackLayout>
<Label Text="{Binding company}" FontSize="25"/>
<Label Text="{Binding due}" FontSize="25"/>
<Label Text="{Binding businessType}" FontSize="25"/>
<Label Text="{Binding currency}" FontSize="25"/>
<Label Text="{Binding date}" FontSize="25"/>
</VerticalStackLayout>
</HorizontalStackLayout>
</Frame>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</Grid>
</ContentPage>