Search in sources :

Example 26 with GoToOperation

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);
}
Also used : Stage(javafx.stage.Stage) GoToOperation(operation.GoToOperation) TabAccess(tab.TabAccess) FXML(javafx.fxml.FXML)

Example 27 with GoToOperation

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);
}
Also used : Stage(javafx.stage.Stage) GoToOperation(operation.GoToOperation) FXML(javafx.fxml.FXML)

Example 28 with GoToOperation

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();
        }
    }
}
Also used : Timeline(javafx.animation.Timeline) ActionEvent(javafx.event.ActionEvent) Stage(javafx.stage.Stage) GoToOperation(operation.GoToOperation) KeyFrame(javafx.animation.KeyFrame) EventHandler(javafx.event.EventHandler) Alert(javafx.scene.control.Alert) FXML(javafx.fxml.FXML)

Example 29 with GoToOperation

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);
    }
}
Also used : Timeline(javafx.animation.Timeline) ActionEvent(javafx.event.ActionEvent) Stage(javafx.stage.Stage) KeyFrame(javafx.animation.KeyFrame) EventHandler(javafx.event.EventHandler) GoToOperation(operation.GoToOperation) Alert(javafx.scene.control.Alert) FXML(javafx.fxml.FXML)

Example 30 with GoToOperation

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);
}
Also used : Stage(javafx.stage.Stage) GoToOperation(operation.GoToOperation) TabAccess(tab.TabAccess) FXML(javafx.fxml.FXML)

Aggregations

FXML (javafx.fxml.FXML)152 Stage (javafx.stage.Stage)152 GoToOperation (operation.GoToOperation)152 TabAccess (tab.TabAccess)95 Alert (javafx.scene.control.Alert)11 KeyFrame (javafx.animation.KeyFrame)6 Timeline (javafx.animation.Timeline)6 ActionEvent (javafx.event.ActionEvent)6 EventHandler (javafx.event.EventHandler)5 ButtonType (javafx.scene.control.ButtonType)5 HashMap (java.util.HashMap)1 Label (javafx.scene.control.Label)1 TextField (javafx.scene.control.TextField)1 ComboboxList (operation.ComboboxList)1 DateFormatManager (system.DateFormatManager)1 DeleteUserCredentials (system.DeleteUserCredentials)1 Bkash (tab.Bkash)1 GetMoney (tab.GetMoney)1 Rocket (tab.Rocket)1