logger.severe("SSL Failure", ex);
ProgressUtils.errorMessage("SSLFailed");
System.exit(1);
}
final BasicController basicControl = BasicController.getInstance();
// nicht registriert oder eingeloggt
if ("".equals(config.getProperty("user.email")) || "".equals(config.getProperty("user.password"))) {
showWelcomeDialog(config, basicControl, "", "");
} else {
try {
final ProgressUtils.Monitor monitor = ProgressUtils.createProgress(lang.getString("ProgressLoggingIn"));
basicControl.login(new LoginRequest(config.getProperty("user.email"), config.getProperty("user.password")));
monitor.finish();
} catch (NetworkException ex) {
logger.warning("Connection Failure", ex);
ProgressUtils.errorMessage(lang.getString("ConnectionFailed"), ex.getMessage());
showWelcomeDialog(config, basicControl, config.getProperty("user.email"), config.getProperty("user.password"));
} catch (LoginFailedException ex) {
ProgressUtils.errorMessage(String.format(lang.getString("LoginFailed"), ex.getMessage()));
logger.info("Login Failure", ex);
showWelcomeDialog(config, basicControl, config.getProperty("user.email"), config.getProperty("user.password"));
}
}
// nun eingeloggt; starte Hauptfenster
if (basicControl.isLoggedIn()) {
try {
final ProgressUtils.Monitor progress = ProgressUtils.createProgress(lang.getString("ProgressLogicDatabase"));
final Logic logic = Logic.getInstance(config, basicControl.getLoggedInEmployee());
NetworkControl.getInstance().setLoginData(basicControl.getLoginData(), logic.getDBControl());
NetworkControl.getInstance().start();
ClientConfiguration.getInstance().setProperty("db.dirty", "true");
ClientConfiguration.getInstance().writeConfiguration();
progress.finish();
SwingUtilities.invokeLater(new Runnable() {