public CommonComponent(ICommonServices services, ICommonCompomentsFactory componentFactory) { Current = this; this.Services = services; this.componentFactory = componentFactory; InitializerProcess.Run(componentFactory); }
// Code to execute on Unhandled Exceptions private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e) { if (e.ExceptionObject.GetType().ToString() == "System.Data.SqlServerCe.SqlCeException") { InitializerProcess.Reset(); } if (Debugger.IsAttached) { // An unhandled exception has occurred; break into the debugger Debugger.Break(); } }
public async void InitializePageState(object parameter) { if (!App.GetAppInfo().IsEnabled()) { await new MessageDialog("Your trial period has expired. You cannot use the app until you buy the full version.").ShowAsync(); App.Current.Exit(); } InitializerProcess.SendStatisctics(); Logging.Upload(); if (!App.TB.DatabaseExists || AppFields.ForceUpdate) { var downloadResult = await DownloadDBDialog.Show(); await DownloadDone(downloadResult, true); } if (InitializerProcess.FirstRun) { await ShowLocationConsentBox(); } FavoritesPart.SetContent(); stateManager.ScheduleTaskEveryMinute(updateContent); //if (App.SourceTileId != null) //{ // NavigateToTile(App.SourceTileId.Value); //} var checkUpdateResult = await UpdateMonitor.CheckUpdate(); if (checkUpdateResult == UpdateMonitor.Result.Found) { IndicateUpdateAvailable(); } //await Task.Delay(1000); //Frame.Navigate(typeof(TestPage)); }