initial
This commit is contained in:
13
Billing.Shared/Views/AccountPage.xaml
Normal file
13
Billing.Shared/Views/AccountPage.xaml
Normal file
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ui:BillingPage xmlns="http://xamarin.com/schemas/2014/forms"
|
||||
xmlns:r="clr-namespace:Billing.Languages"
|
||||
xmlns:ui="clr-namespace:Billing.UI"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
x:Class="Billing.Views.AccountPage"
|
||||
Title="{r:Text Accounts}">
|
||||
<StackLayout>
|
||||
<Label Text="Welcome to Account Page!"
|
||||
VerticalOptions="CenterAndExpand"
|
||||
HorizontalOptions="CenterAndExpand" />
|
||||
</StackLayout>
|
||||
</ui:BillingPage>
|
11
Billing.Shared/Views/AccountPage.xaml.cs
Normal file
11
Billing.Shared/Views/AccountPage.xaml.cs
Normal file
@ -0,0 +1,11 @@
|
||||
using Billing.UI;
|
||||
|
||||
namespace Billing.Views;
|
||||
|
||||
public partial class AccountPage : BillingPage
|
||||
{
|
||||
public AccountPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
14
Billing.Shared/Views/AddBillPage.xaml
Normal file
14
Billing.Shared/Views/AddBillPage.xaml
Normal file
@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ui:BillingPage xmlns="http://xamarin.com/schemas/2014/forms"
|
||||
xmlns:ui="clr-namespace:Billing.UI"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
x:Class="Billing.Views.AddBillPage"
|
||||
x:DataType="v:AddBillPage"
|
||||
Title="Add Billing">
|
||||
|
||||
<StackLayout>
|
||||
<Label Text="Add a billing here..."
|
||||
VerticalOptions="CenterAndExpand"
|
||||
HorizontalOptions="CenterAndExpand" />
|
||||
</StackLayout>
|
||||
</ui:BillingPage>
|
11
Billing.Shared/Views/AddBillPage.xaml.cs
Normal file
11
Billing.Shared/Views/AddBillPage.xaml.cs
Normal file
@ -0,0 +1,11 @@
|
||||
using Billing.UI;
|
||||
|
||||
namespace Billing.Views;
|
||||
|
||||
public partial class AddBillPage : BillingPage
|
||||
{
|
||||
public AddBillPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
56
Billing.Shared/Views/BillPage.xaml
Normal file
56
Billing.Shared/Views/BillPage.xaml
Normal file
@ -0,0 +1,56 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ui:BillingPage xmlns="http://xamarin.com/schemas/2014/forms"
|
||||
xmlns:r="clr-namespace:Billing.Languages"
|
||||
xmlns:ui="clr-namespace:Billing.UI"
|
||||
xmlns:v="clr-namespace:Billing.Views"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
x:Class="Billing.Views.BillPage"
|
||||
x:DataType="v:BillPage"
|
||||
x:Name="billPage"
|
||||
BindingContext="{x:Reference billPage}"
|
||||
Title="{r:Text Bills}">
|
||||
|
||||
<ContentPage.Resources>
|
||||
<ui:TitleDateConverter x:Key="titleDateConverter"/>
|
||||
</ContentPage.Resources>
|
||||
|
||||
<Shell.TitleView>
|
||||
<Grid ColumnSpacing="16" ColumnDefinitions="20,*,20">
|
||||
<ui:TintImage Source="calendar.png" WidthRequest="20" HeightRequest="20" VerticalOptions="Center"/>
|
||||
<ui:LongPressButton Grid.Column="1" Text="{Binding SelectedDate, Converter={StaticResource titleDateConverter}}"
|
||||
TextColor="{DynamicResource PrimaryColor}"
|
||||
HorizontalOptions="{OnPlatform iOS=Center, Android=Start}"
|
||||
FontFamily="{DynamicResource RobotoCondensedFontBold}"
|
||||
FontAttributes="Bold" FontSize="20" VerticalOptions="Center"
|
||||
LongPressed="OnTitleDateLongPressed"/>
|
||||
</Grid>
|
||||
</Shell.TitleView>
|
||||
|
||||
<Grid RowDefinitions="Auto,*">
|
||||
<ui:BillingDate x:Name="billingDate" SelectedDate="{Binding SelectedDate}" DateSelected="OnDateSelected"/>
|
||||
<ScrollView Grid.Row="1">
|
||||
<Grid Padding="8" ColumnSpacing="8" ColumnDefinitions="Auto, *, Auto"
|
||||
BackgroundColor="{DynamicResource PromptBackgroundColor}"
|
||||
VerticalOptions="Start">
|
||||
<ui:TintImage Source="bars.png" WidthRequest="23" HeightRequest="23"/>
|
||||
<Label Grid.Column="1" Text="{r:Text NoRecords}" TextColor="{DynamicResource TextColor}"
|
||||
VerticalOptions="Center"/>
|
||||
<StackLayout Grid.Column="2" Orientation="Horizontal" Spacing="6">
|
||||
<StackLayout.GestureRecognizers>
|
||||
<TapGestureRecognizer Command="{Binding AddBilling}"/>
|
||||
</StackLayout.GestureRecognizers>
|
||||
<Label Text="{r:Text Memo}" TextColor="{DynamicResource PrimaryColor}"
|
||||
VerticalOptions="Center"/>
|
||||
<!--<Label Style="{DynamicResource IconLightStyle}"
|
||||
Text="{x:Static local:Definition.IconRight}"
|
||||
TextColor="{DynamicResource TabBarUnselectedColor}"/>-->
|
||||
<ui:TintImage Source="right.png" WidthRequest="24" HeightRequest="24"/>
|
||||
</StackLayout>
|
||||
</Grid>
|
||||
</ScrollView>
|
||||
<!--<ui:CircleButton Grid.Row="1" VerticalOptions="End" HorizontalOptions="End"
|
||||
Margin="20" Padding="0"
|
||||
BackgroundColor="{DynamicResource PrimaryColor}"
|
||||
ImageSource="plus.png" HeightRequest="24" WidthRequest="24"/>-->
|
||||
</Grid>
|
||||
</ui:BillingPage>
|
44
Billing.Shared/Views/BillPage.xaml.cs
Normal file
44
Billing.Shared/Views/BillPage.xaml.cs
Normal file
@ -0,0 +1,44 @@
|
||||
using Billing.UI;
|
||||
using System;
|
||||
using Xamarin.Forms;
|
||||
|
||||
namespace Billing.Views;
|
||||
|
||||
public partial class BillPage : BillingPage
|
||||
{
|
||||
private static readonly BindableProperty SelectedDateProperty = BindableProperty.Create(nameof(SelectedDate), typeof(DateTime), typeof(BillPage));
|
||||
|
||||
public DateTime SelectedDate
|
||||
{
|
||||
get => (DateTime)GetValue(SelectedDateProperty);
|
||||
set => SetValue(SelectedDateProperty, value);
|
||||
}
|
||||
|
||||
public Command AddBilling { get; }
|
||||
|
||||
public BillPage()
|
||||
{
|
||||
AddBilling = new Command(OnAddBilling);
|
||||
|
||||
InitializeComponent();
|
||||
|
||||
billingDate.SetDateTime(DateTime.Now);
|
||||
}
|
||||
|
||||
private void OnDateSelected(object sender, DateEventArgs e)
|
||||
{
|
||||
SelectedDate = e.Date;
|
||||
|
||||
// TODO: while selecting date
|
||||
}
|
||||
|
||||
private void OnTitleDateLongPressed(object sender, EventArgs e)
|
||||
{
|
||||
billingDate.SetDateTime(DateTime.Now);
|
||||
}
|
||||
|
||||
private async void OnAddBilling()
|
||||
{
|
||||
await Navigation.PushAsync(new AddBillPage());
|
||||
}
|
||||
}
|
13
Billing.Shared/Views/SettingPage.xaml
Normal file
13
Billing.Shared/Views/SettingPage.xaml
Normal file
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ui:BillingPage xmlns="http://xamarin.com/schemas/2014/forms"
|
||||
xmlns:r="clr-namespace:Billing.Languages"
|
||||
xmlns:ui="clr-namespace:Billing.UI"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
x:Class="Billing.Views.SettingPage"
|
||||
Title="{r:Text Settings}">
|
||||
<StackLayout>
|
||||
<Label Text="Welcome to Settings Page!"
|
||||
VerticalOptions="CenterAndExpand"
|
||||
HorizontalOptions="CenterAndExpand" />
|
||||
</StackLayout>
|
||||
</ui:BillingPage>
|
11
Billing.Shared/Views/SettingPage.xaml.cs
Normal file
11
Billing.Shared/Views/SettingPage.xaml.cs
Normal file
@ -0,0 +1,11 @@
|
||||
using Billing.UI;
|
||||
|
||||
namespace Billing.Views;
|
||||
|
||||
public partial class SettingPage : BillingPage
|
||||
{
|
||||
public SettingPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user