private void Application_Startup(object sender, StartupEventArgs e) { Config.Config.InitDatabase(); var mainWnd = new MainWindow(); mainWnd.Show(); if (!Config.Config.Accounts.Any()) { var testAccount = new Account(); var accWnd = new AccountProperties(); var result = accWnd.ShowDialog(); if (!result.HasValue || result.Value == false) { // bail out ShowMessage("No accounts created, exiting."); Shutdown(); } } }