new Regisiteren View

This commit is contained in:
Reshad Meher 2023-01-27 15:17:17 +01:00
parent 981169d578
commit 3c0edbc431
8 changed files with 93 additions and 0 deletions

3
.idea/.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
# Default ignored files
/shelf/
/workspace.xml

7
.idea/encodings.xml Normal file
View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding">
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" />
</component>
</project>

12
.idea/misc.xml Normal file
View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="MavenProjectsManager">
<option name="originalFiles">
<list>
<option value="$PROJECT_DIR$/pom.xml" />
</list>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_19" default="true" project-jdk-name="openjdk-19" project-jdk-type="JavaSDK" />
</project>

6
.idea/vcs.xml Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>

BIN
database.db Normal file

Binary file not shown.

View File

@ -0,0 +1,65 @@
/** Reshad Meher*/
package com.bib.essensbestellungsverwaltung;
import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.scene.control.Alert;
import javafx.scene.control.PasswordField;
import javafx.scene.control.TextField;
import javafx.stage.Stage;
import java.io.IOException;
import java.util.HashMap;
public class SingUpController {
@FXML
private TextField tfEmail;
@FXML
private TextField tfBestätigungEmail;
@FXML
private PasswordField pfPasswort;
@FXML
private PasswordField pfBestätigungPassowrt;
private HashMap<String, String> benutzermap = new HashMap<>();
@FXML
private void onKontoErstellenBtClick(){
String email = tfEmail.getText();
String bestätigungEmail = tfBestätigungEmail.getText();
String passwort = pfPasswort.getText();
String bestätigungPasswort = pfBestätigungPassowrt.getText();
if(!(email.isEmpty() || bestätigungEmail.isEmpty() || passwort.isEmpty() && bestätigungEmail.isEmpty() || bestätigungPasswort.isEmpty())){
Alert alert;
if(bestätigungEmail.equals(email) && bestätigungPasswort.equals(passwort)){
alert = new Alert(Alert.AlertType.CONFIRMATION,"okay");
alert.showAndWait();
benutzermap.put(email,passwort);
System.out.println(benutzermap);
}else {
alert = new Alert(Alert.AlertType.ERROR,"Die Eingabe passt nicht.");
alert.showAndWait();
}
tfEmail.setText("");
tfBestätigungEmail.setText("");
pfPasswort.setText("");
pfBestätigungPassowrt.setText("");
}
else {
Alert alert = new Alert(Alert.AlertType.ERROR,"Eingabefield sind leer");
alert.showAndWait();
}
}
@FXML
private void onAnmeldenBtClick() throws IOException {
FXMLLoader fxmlLoader = new FXMLLoader(HelloApplication.class.getResource("login-view.fxml"));
Scene scene = new Scene(fxmlLoader.load(), 950,480);
HelloApplication.primary.setScene(scene);
}
public HashMap<String, String> getBenutzermap() {
return benutzermap;
}
}