use of operation.GoToOperation in project Money-Manager by krHasan.
the class MakeATransactionController method mnuCreateSector.
@FXML
private void mnuCreateSector(ActionEvent event) {
(new TabAccess()).setTabName("tabSector");
Stage MakeATransactionStage = (Stage) btnSignOut.getScene().getWindow();
(new GoToOperation()).goToSettings(MakeATransactionStage);
}
use of operation.GoToOperation in project Money-Manager by krHasan.
the class NewUserRegistrationController method btnCancel.
@FXML
private void btnCancel(ActionEvent event) {
Stage NewUserRegistrationStage = (Stage) btnCancel.getScene().getWindow();
(new GoToOperation()).goToSignIn(NewUserRegistrationStage);
}
use of operation.GoToOperation in project Money-Manager by krHasan.
the class NewUserRegistrationController method btnRegistration.
@FXML
private void btnRegistration(ActionEvent event) {
if (txtName.getText().isEmpty() || countWords(txtName.getText()) == 0) {
lblMsg1.setText("Write your name");
txtName.clear();
} else if (txtUsername.getText().isEmpty()) {
lblMsg1.setText("Set a Username");
} else if (passPassword.getText().isEmpty()) {
lblMsg1.setText("Set a Password");
} else if (!passPassword.getText().equals(passReTypePassword.getText())) {
lblMsg1.setText("Re-type Password Correctly");
} else if (txtAnswer.getText().isEmpty()) {
lblMsg1.setText("Set a Security Question Answer");
} else {
boolean feedback = setUsername(txtUsername.getText());
setUserFullName(txtName.getText());
setPassword(passPassword.getText());
setSecurityQuestion(cmboSecurityQuestion.getValue());
setSecurityQuestionAnswer(txtAnswer.getText());
Stage NewUserRegistrationStage = (Stage) btnRegistration.getScene().getWindow();
(new GoToOperation()).goToSignIn(NewUserRegistrationStage);
if (feedback) {
Alert confirmationMsg = new Alert(AlertType.INFORMATION);
confirmationMsg.setTitle("Created User Successfully");
confirmationMsg.setHeaderText(null);
confirmationMsg.setContentText("Account Created Successfully");
confirmationMsg.setX(NewUserRegistrationStage.getX() + 200);
confirmationMsg.setY(NewUserRegistrationStage.getY() + 170);
Timeline idlestage = new Timeline(new KeyFrame(Duration.seconds(3), new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent event) {
confirmationMsg.hide();
}
}));
idlestage.setCycleCount(1);
idlestage.play();
confirmationMsg.showAndWait();
} else {
Alert confirmationMsg = new Alert(AlertType.ERROR);
confirmationMsg.setTitle("Sign Up Failed");
confirmationMsg.setHeaderText("Sign Up Failed");
confirmationMsg.setContentText("There have some problem.");
confirmationMsg.setX(NewUserRegistrationStage.getX() + 200);
confirmationMsg.setY(NewUserRegistrationStage.getY() + 170);
Timeline idlestage = new Timeline(new KeyFrame(Duration.seconds(3), new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent event) {
confirmationMsg.hide();
}
}));
idlestage.setCycleCount(1);
idlestage.play();
confirmationMsg.showAndWait();
}
}
}
use of operation.GoToOperation in project Money-Manager by krHasan.
the class RegistrationIssueController method btnSave.
@FXML
private void btnSave(ActionEvent event) {
if (passPassword.getText().isEmpty()) {
lblMsgInformation.setText("Password can't empty");
} else if (!passReTypePassword.getText().equals(passPassword.getText())) {
lblMsgInformation.setText("Re-type Your Password Correctly");
} else if (txtAnswer.getText().isEmpty() || countWords(txtAnswer.getText()) == 0) {
lblMsgInformation.setText("Answer the Security Question.");
} else {
setPassword(passPassword.getText());
setSecurityQuestion(cmboSecurityQuestion.getValue());
setSecurityQuestionAnswer(txtAnswer.getText());
Alert confirmationMsg = new Alert(AlertType.INFORMATION);
confirmationMsg.setTitle("Operation Successful");
confirmationMsg.setHeaderText(null);
confirmationMsg.setContentText("Information Updated Successfully");
Stage RegistrationIssueStage = (Stage) btnSave.getScene().getWindow();
confirmationMsg.setX(RegistrationIssueStage.getX() + 200);
confirmationMsg.setY(RegistrationIssueStage.getY() + 170);
Timeline idlestage = new Timeline(new KeyFrame(Duration.seconds(3), new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent event) {
confirmationMsg.hide();
}
}));
idlestage.setCycleCount(1);
idlestage.play();
confirmationMsg.showAndWait();
(new GoToOperation()).goToSignIn(RegistrationIssueStage);
}
}
use of operation.GoToOperation in project Money-Manager by krHasan.
the class MakeATransactionController method mnuBankSettings.
@FXML
private void mnuBankSettings(ActionEvent event) {
(new TabAccess()).setTabName("tabBank");
Stage MakeATransactionStage = (Stage) btnSignOut.getScene().getWindow();
(new GoToOperation()).goToSettings(MakeATransactionStage);
}
Aggregations