-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathApp.xaml.cs
50 lines (39 loc) · 1.3 KB
/
App.xaml.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
using ExpressBase.Mobile.Services;
using Xamarin.Forms;
using ExpressBase.Mobile.Data;
using System.Threading.Tasks;
using ExpressBase.Mobile.Models;
using ExpressBase.Mobile.Services.Navigation;
namespace ExpressBase.Mobile
{
public partial class App : Application
{
private static IDataBase dataDb;
public static IDataBase DataDB => dataDb ??= DependencyService.Get<IDataBase>();
public static MasterDetailPage RootMaster { set; get; }
public static SettingsServices Settings { set; get; }
public static INavigationService Navigation { set; get; }
public static double ScreenX;
static App()
{
Settings = SettingsServices.Current;
Navigation = NavigationService.Current;
}
public App(EbNFData payload = null)
{
InitializeComponent();
InitializeNavigation(payload);
}
private Task InitializeNavigation(EbNFData payload)
{
return Navigation.InitializeAppAsync(payload);
}
protected override async void OnStart()
{
if (Settings.Vendor.AllowNotifications && Settings.CurrentUser != null)
{
await NotificationService.Instance.UpdateNHRegistration();
}
}
}
}