/// <summary> /// 単一アプリケーション オブジェクトを初期化します。これは、実行される作成したコードの ///最初の行であるため、main() または WinMain() と論理的に等価です。 /// </summary> public App() { Microsoft.ApplicationInsights.WindowsAppInitializer.InitializeAsync(); this.InitializeComponent(); this.Suspending += OnSuspending; if (_localSettings.Values.ContainsKey(Constants.ThemeDefault)) { var themeType = (ThemeTypes)_localSettings.Values[Constants.ThemeDefault]; switch (themeType) { case ThemeTypes.Light: RequestedTheme = ApplicationTheme.Light; break; case ThemeTypes.Dark: RequestedTheme = ApplicationTheme.Dark; break; case ThemeTypes.YOSPOS: RequestedTheme = ApplicationTheme.Dark; break; } } SelectedTheme = RequestedTheme; try { DataSource ds = new DataSource(); SaclopediaDataSource sds = new SaclopediaDataSource(); BookmarkDataSource bds = new BookmarkDataSource(); ds.InitDatabase(); ds.CreateDatabase(); bds.InitDatabase(); bds.CreateDatabase(); sds.InitDatabase(); sds.CreateDatabase(); } catch { } Container = AutoFacConfiguration.Configure(); }