예제 #1
0
파일: App.xaml.cs 프로젝트: skartknet/setia
 protected override void OnResume()
 {
     if (InternalDataService.DatabaseInitialized)
     {
         Task.Run(async() =>
         {
             await SyncingService.SyncDataAsync();
         });
     }
 }
예제 #2
0
파일: App.xaml.cs 프로젝트: skartknet/setia
        protected override void OnStart()
        {
            AppCenter.Start("android=86311dca-ab38-41be-bf0d-77b43d392cd4;",
                            typeof(Analytics), typeof(Crashes));

            DependencyContainer.Register();
            MappingConfiguration.Init();

            using (var scope = DependencyContainer.Container.BeginLifetimeScope())
            {
                SyncingService      = scope.Resolve <ISyncingDataService>();
                InternalDataService = scope.Resolve <IInternalDataService>();
            }

            Task.Run(async() =>
            {
                await InternalDataService.Initialise();
                await SyncingService.SyncDataAsync();

                MainPage = new MainPage();
            });
        }