added JFXInfoAlert if connect manually failed

closes #39
This commit is contained in:
Jannik 2019-06-13 21:52:26 +02:00
parent 5fff4023f9
commit 7f4182bfad
Signed by: Seil0
GPG Key ID: E8459F3723C52C24
1 changed files with 13 additions and 2 deletions

View File

@ -100,7 +100,7 @@ class RootController : Controller() {
println("[auto] server found")
con = foundServer
con.ping()
println("auto Connection to Server successful")
println("[auto] Connection to Server successful")
switchStartupToMain()
showAll()
} else {
@ -108,7 +108,7 @@ class RootController : Controller() {
}
} catch (e: Exception) {
println(e)
println("auto Connection to Server NOT successful")
println("[auto] Connection to Server NOT successful")
}
if (SettingsController.serverAddressIsSet()) {
println("[file] try connect with settings file")
@ -140,6 +140,17 @@ class RootController : Controller() {
} catch (e: Exception) {
println(e)
println("Connection to Server NOT successful")
Platform.runLater {
JFXInfoAlert(
"Verbinden fehlgeschlagen",
"Mögliche Ursachen:" +
"\n- der angegebene Server ist offline" +
"\n- die benötigten Ports sind nicht offen",
"-fx-button-type: RAISED; -fx-background-color: #2b7bbb; -fx-text-fill: #000000;"
).showAndWait()
}
}
}
}