new Regisiteren View
This commit is contained in:
parent
981169d578
commit
3c0edbc431
3
.idea/.gitignore
generated
vendored
Normal file
3
.idea/.gitignore
generated
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
# Default ignored files
|
||||||
|
/shelf/
|
||||||
|
/workspace.xml
|
7
.idea/encodings.xml
generated
Normal file
7
.idea/encodings.xml
generated
Normal 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
generated
Normal file
12
.idea/misc.xml
generated
Normal 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
generated
Normal file
6
.idea/vcs.xml
generated
Normal 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
BIN
database.db
Normal file
Binary file not shown.
@ -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;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user