client

Clone or download

Added somewhat autoreconnect stuff

Modified Files

--- 'a/src/main/java/com/stream_pi/client/io/Config.java'
+++ b/src/main/java/com/stream_pi/client/io/Config.java
@@ -231,6 +231,11 @@ public class Config
return -1;
}
+ public int getDefaultAutoReconnectTimeInterval()
+ {
+ return 300;
+ }
+
public String getSavedServerHostNameOrIP()
{
@@ -242,6 +247,11 @@ public class Config
return XMLConfigHelper.getIntProperty(getCommsServerElement(), "port", getDefaultSavedServerPort(), false, true, document, configFile);
}
+ public int getAutoReconnectTimeInterval()
+ {
+ return XMLConfigHelper.getIntProperty(getCommsServerElement(), "auto-reconnect-interval", getDefaultSavedServerPort(), false, true, document, configFile);
+ }
+
public void setServerHostNameOrIP(String hostNameOrIP)
{
@@ -352,5 +362,4 @@ public class Config
{
getOthersElement().getElementsByTagName("full-screen-mode").item(0).setTextContent(value+"");
}
-
}
--- 'a/src/main/java/com/stream_pi/client/window/settings/SettingsBase.java'
+++ b/src/main/java/com/stream_pi/client/window/settings/SettingsBase.java
@@ -69,6 +69,8 @@ public class SettingsBase extends VBox {
private TextField iconsPathTextField;
private TextField profilesPathTextField;
+ private TextField autoReconnectTimeTextField;
+
private final Button checkForUpdatesButton;
private HostServices hostServices;
@@ -156,6 +158,10 @@ public class SettingsBase extends VBox {
checkForUpdatesButton = new Button("Check for updates");
checkForUpdatesButton.setOnAction(event->checkForUpdates());
+
+
+ autoReconnectTimeTextField = new TextField();
+
VBox vBox = new VBox(
new HBoxInputBox("Device Name", nickNameTextField, prefWidth),
new HBoxInputBox("Host Name/IP", serverHostNameOrIPTextField, prefWidth),