format BindableProperty & fix a tiny issue about rank page refreshing
This commit is contained in:
@ -10,10 +10,10 @@ namespace Billing.Views
|
||||
{
|
||||
public partial class AccountPage : BillingPage
|
||||
{
|
||||
private static readonly BindableProperty BalanceProperty = BindableProperty.Create(nameof(Balance), typeof(decimal), typeof(AccountPage));
|
||||
private static readonly BindableProperty AssetProperty = BindableProperty.Create(nameof(Asset), typeof(decimal), typeof(AccountPage));
|
||||
private static readonly BindableProperty LiabilityProperty = BindableProperty.Create(nameof(Liability), typeof(decimal), typeof(AccountPage));
|
||||
private static readonly BindableProperty AccountsProperty = BindableProperty.Create(nameof(Accounts), typeof(List<AccountGrouping>), typeof(AccountPage));
|
||||
private static readonly BindableProperty BalanceProperty = Helper.Create<decimal, AccountPage>(nameof(Balance));
|
||||
private static readonly BindableProperty AssetProperty = Helper.Create<decimal, AccountPage>(nameof(Asset));
|
||||
private static readonly BindableProperty LiabilityProperty = Helper.Create<decimal, AccountPage>(nameof(Liability));
|
||||
private static readonly BindableProperty AccountsProperty = Helper.Create<List<AccountGrouping>, AccountPage>(nameof(Accounts));
|
||||
|
||||
public decimal Balance => (decimal)GetValue(BalanceProperty);
|
||||
public decimal Asset => (decimal)GetValue(AssetProperty);
|
||||
@ -129,6 +129,8 @@ namespace Billing.Views
|
||||
}
|
||||
RefreshBalance();
|
||||
groupLayout.Refresh(accounts);
|
||||
|
||||
RankPage.Instance?.SetNeedRefresh();
|
||||
|
||||
_ = Task.Run(App.WriteAccounts);
|
||||
}
|
||||
@ -147,6 +149,8 @@ namespace Billing.Views
|
||||
RefreshBalance(!add);
|
||||
groupLayout.Refresh(accounts);
|
||||
|
||||
RankPage.Instance?.SetNeedRefresh();
|
||||
|
||||
Task.Run(App.WriteAccounts);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user