feature: shortcut

This commit is contained in:
2022-03-17 20:29:27 +08:00
parent 60f7824cb5
commit ef5e91aad1
18 changed files with 118 additions and 36 deletions

View File

@@ -13,6 +13,7 @@ namespace Billing
{
public class App : Application
{
internal const string NewBillAction = "/newbill";
private const string SaveLocationKey = nameof(SaveLocationKey);
public static AppTheme CurrentTheme { get; private set; }
@@ -21,17 +22,27 @@ namespace Billing
public static List<Account> Accounts => accounts ??= new List<Account>();
public static List<Category> Categories => categories ??= new List<Category>();
public static bool SaveLocation => saveLocation;
public static string MainRoute => mainRoute;
private static List<Bill> bills;
private static List<Account> accounts;
private static List<Category> categories;
private static bool saveLocation;
private static string mainRoute;
private string initialUrl;
public App(string url = null)
{
initialUrl = url;
if (url == NewBillAction)
{
mainRoute = "//Bills/Details";
}
else
{
mainRoute = "//Bills";
initialUrl = url;
}
CurrentCulture = new PlatformCulture();
InitResources();