use of operation.GoToRegistration in project Money-Manager by krHasan.
the class SignInController method newUser.
@FXML
private void newUser(MouseEvent event) {
if (checkUserPresence()) {
imgSignIn.setVisible(true);
txtSQAnswer.clear();
Alert alert = new Alert(AlertType.CONFIRMATION);
alert.setTitle("Confirmation");
alert.setHeaderText("Only one user can use this at a time");
alert.setContentText("User exists, Delete this one?");
Stage SignInStage = (Stage) lblNewUser.getScene().getWindow();
alert.setX(SignInStage.getX() + 200);
alert.setY(SignInStage.getY() + 170);
Optional<ButtonType> result = alert.showAndWait();
if (result.get() == ButtonType.OK) {
(new TabAccess()).setreRegistrationLodingStatus("deleteUser");
(new GoToRegistration()).goToReRegistration(SignInStage);
}
} else {
Stage SignInStage = (Stage) lblNewUser.getScene().getWindow();
(new GoToRegistration()).goToRegistration(SignInStage);
}
}
use of operation.GoToRegistration in project Money-Manager by krHasan.
the class SignInController method passwordChangeOk.
@FXML
private void passwordChangeOk(ActionEvent event) {
if (!new SignInModel().securityQuestionAnswerIsOk(txtSQAnswer.getText())) {
lblForgetPassMsg.setText("Answer didn't match");
txtSQAnswer.clear();
} else if (!cmboSecurityQuetion.getValue().equals(getSavedSecurityQuestion())) {
lblForgetPassMsg.setText("Question didn't match");
txtSQAnswer.clear();
} else {
(new TabAccess()).setreRegistrationLodingStatus("forgotPassword");
Stage SignInStage = (Stage) btnOk.getScene().getWindow();
(new GoToRegistration()).goToReRegistration(SignInStage);
}
}
Aggregations