format BindableProperty & fix a tiny issue about rank page refreshing

This commit is contained in:
2022-03-11 13:17:00 +08:00
parent 71c1a7f0f1
commit f5f16d43f4
25 changed files with 256 additions and 108 deletions

View File

@ -155,6 +155,8 @@ namespace Billing.Views
App.Bills.Remove(bill.Bill);
billsLayout.Refresh(bills);
RefreshBalance(bills);
RankPage.Instance?.SetNeedRefresh();
_ = Task.Run(App.WriteBills);
}
@ -191,17 +193,19 @@ namespace Billing.Views
}
RefreshBalance(Bills);
RankPage.Instance?.SetNeedRefresh();
Task.Run(App.WriteBills);
}
}
public class UIBill : BindableObject
{
public static readonly BindableProperty IconProperty = BindableProperty.Create(nameof(Icon), typeof(string), typeof(UIBill));
public static readonly BindableProperty NameProperty = BindableProperty.Create(nameof(Name), typeof(string), typeof(UIBill));
public static readonly BindableProperty DateCreationProperty = BindableProperty.Create(nameof(DateCreation), typeof(DateTime), typeof(UIBill));
public static readonly BindableProperty AmountProperty = BindableProperty.Create(nameof(Amount), typeof(decimal), typeof(UIBill));
public static readonly BindableProperty WalletProperty = BindableProperty.Create(nameof(Wallet), typeof(string), typeof(UIBill));
public static readonly BindableProperty IconProperty = Helper.Create<string, UIBill>(nameof(Icon));
public static readonly BindableProperty NameProperty = Helper.Create<string, UIBill>(nameof(Name));
public static readonly BindableProperty DateCreationProperty = Helper.Create<DateTime, UIBill>(nameof(DateCreation));
public static readonly BindableProperty AmountProperty = Helper.Create<decimal, UIBill>(nameof(Amount));
public static readonly BindableProperty WalletProperty = Helper.Create<string, UIBill>(nameof(Wallet));
public string Icon
{