diff --git a/src/main/java/com/example/vpr_javafx/HelloController.java b/src/main/java/com/example/vpr_javafx/HelloController.java index 20ec7bb..f4e89cc 100644 --- a/src/main/java/com/example/vpr_javafx/HelloController.java +++ b/src/main/java/com/example/vpr_javafx/HelloController.java @@ -94,6 +94,14 @@ public class HelloController { public TextField tfName; @FXML public TextField tfChild; + @FXML + public TextField tfStreet; + @FXML + public TextField tfHouseNumber; + @FXML + public TextField tfPostalCode; + @FXML + public TextField tfCity; @FXML private PasswordField pfPassword; @@ -279,6 +287,12 @@ public class HelloController { + "8: Konservierungsstoff"); } + /** + * ToRegistration() ruft die Registration-View auf, sobald man auf den Registrierungs-Button klickt + * @param event + * @throws IOException + * @author Kevin Maier + */ @FXML protected void ToRegistration(ActionEvent event) throws IOException { @@ -289,6 +303,12 @@ public class HelloController { stage.show(); } + /** + * OnRegistrationButton() lässt einen neuen Nutzer anlegen + * @param event + * @throws IOException + * @author Kevin Maier + */ @FXML protected void OnRegistrationButton(ActionEvent event) throws IOException { @@ -302,7 +322,7 @@ public class HelloController { else if (validData.validateData(tfPhone, pfPassword, this)) { try (FileWriter writer = new FileWriter("user.txt")){ - writer.write(tfName.getText() + ";" + tfPhone.getText() + ";" + tfChild.getText() + ";" + pfPassword.getText()); + writer.write(tfName.getText() + ";" + tfStreet.getText() + " " + tfHouseNumber.getText() + "," + tfPostalCode + " " + tfCity.getText() + ";" + tfPhone.getText() + ";" + tfChild.getText() + ";" + pfPassword.getText()); writer.flush(); } catch (IOException e) diff --git a/src/main/resources/com/example/vpr_javafx/Registration-view.fxml b/src/main/resources/com/example/vpr_javafx/Registration-view.fxml index 7a41d50..537e19a 100644 --- a/src/main/resources/com/example/vpr_javafx/Registration-view.fxml +++ b/src/main/resources/com/example/vpr_javafx/Registration-view.fxml @@ -1,14 +1,16 @@ + - + - - + + + @@ -17,18 +19,28 @@ + + -