/// <summary> /// Load data from database fro the first time. /// </summary> private void LoadData() { Globals.ChronoLoadData.Start(); try { try { CurrentReference = null; PopulateData(); } catch (Exception ex) { Globals.ChronoLoadData.Stop(); DisplayManager.ShowError(SysTranslations.ApplicationMustExit[Language.FR] + Globals.NL2 + SysTranslations.ContactSupport[Language.FR]); ex.Manage(); Environment.Exit(-1); } try { BookmarkItems.Load(UpdateBookmarks); HistoryItems.Load(UpdateHistory); if (Settings.OpenLastViewAtStartup) { SetView(Settings.CurrentView, true); } else { SetView(ViewMode.ChapterVerses, true); Settings.CurrentSearchTypeTab = 0; } } catch (Exception ex) { Globals.ChronoLoadData.Stop(); ex.Manage(); } } finally { Globals.ChronoLoadData.Stop(); Settings.BenchmarkLoadData = Globals.ChronoLoadData.ElapsedMilliseconds; } }