add account page detail

This commit is contained in:
2022-02-28 17:32:40 +08:00
parent 283acf7d35
commit 589c7514f2
17 changed files with 307 additions and 56 deletions

View File

@ -1,6 +1,8 @@
using Billing.Models;
using Billing.Languages;
using Billing.Models;
using Billing.UI;
using System;
using System.Collections.Generic;
using Xamarin.Forms;
namespace Billing.Views
@ -69,16 +71,6 @@ namespace Billing.Views
InitializeComponent();
}
private void Balance_Unfocused(object sender, FocusEventArgs e)
{
if (sender is OptionEntry entry && decimal.TryParse(entry.Text, out decimal d))
{
var converter = (MoneyConverter)Resources["moneyConverter"];
entry.Text = converter.Convert(d, null, null, null)?.ToString();
//Balance = d;
}
}
private async void OnCheckAccount()
{
if (Tap.IsBusy)
@ -108,9 +100,22 @@ namespace Billing.Views
}
private void OnSelectCategory()
private async void OnSelectCategory()
{
if (Tap.IsBusy)
{
return;
}
using (Tap.Start())
{
await Navigation.PushAsync(new ItemSelectPage(new List<SelectItem<AccountCategory>>
{
new() { Icon = "sackdollar", Value = AccountCategory.Cash, Name = Resource.Cash },
new() { Icon = "creditcard", Value = AccountCategory.CreditCard, Name = Resource.CreditCard },
new() { Icon = "", Value = AccountCategory.DebitCard, Name = Resource.DebitCard },
new() { Icon = "", Value = AccountCategory.ElecAccount, Name = Resource.ElecAccount }
}));
}
}
}