Skip to content
Permalink
55ffe53e1c
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
45 lines (39 sloc) 1.32 KB
using System;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
namespace HarPadRee
{
public partial class App : Application
{
string dbPath => FileAccessHelper.GetLocalFilePath("Cars.db3");
public static AccountsRepository AccRepo { get; private set; }
public static CarRepository CarRepo { get; private set; }
public static MillageRepository MillageRepo { get; private set; }
public static ServicesRepository ServicesRepo { get; private set; }
public App()
{
InitializeComponent();
AccRepo = new AccountsRepository(dbPath);
CarRepo = new CarRepository(dbPath);
MillageRepo = new MillageRepository(dbPath);
ServicesRepo = new ServicesRepository(dbPath);
MainPage = new MainPage();
}
protected override void OnStart()
{
if (Application.Current.Properties.ContainsKey("LoggedIn"))
{
if (App.Current.Properties["LoggedIn"].Equals(true))
{
App.Current.MainPage = new NavigationPage(new CarsPage((int)App.Current.Properties["AccID"]));
}
}
}
protected override void OnSleep()
{
}
protected override void OnResume()
{
}
}
}