Search in sources :

Example 21 with GoToOperation

use of operation.GoToOperation in project Money-Manager by krHasan.

the class DashboardController method mnuHowTo.

@FXML
private void mnuHowTo(ActionEvent event) {
    Stage DashboardStage = (Stage) btnSignOut.getScene().getWindow();
    (new GoToOperation()).goToHelp(DashboardStage);
}
Also used : Stage(javafx.stage.Stage) GoToOperation(operation.GoToOperation) FXML(javafx.fxml.FXML)

Example 22 with GoToOperation

use of operation.GoToOperation in project Money-Manager by krHasan.

the class DashboardController method btnCashCalculate.

@FXML
private void btnCashCalculate(ActionEvent event) {
    Stage DashboardStage = (Stage) btnCashCalculate.getScene().getWindow();
    (new GoToOperation()).goToCashCalculate(DashboardStage);
}
Also used : Stage(javafx.stage.Stage) GoToOperation(operation.GoToOperation) FXML(javafx.fxml.FXML)

Example 23 with GoToOperation

use of operation.GoToOperation in project Money-Manager by krHasan.

the class DashboardController method mnuUndo.

@FXML
private void mnuUndo(ActionEvent event) {
    Stage DashboardStage = (Stage) btnSignOut.getScene().getWindow();
    Alert alert = new Alert(AlertType.CONFIRMATION);
    alert.setTitle("Action Failed");
    alert.setHeaderText("Undo Function Works Only From \"Make A Transaction\" and \"History\" Window");
    alert.setContentText("Press \"OK\" to go to \"Make A Transaction\" window");
    alert.setX(DashboardStage.getX() + 60);
    alert.setY(DashboardStage.getY() + 170);
    Optional<ButtonType> result = alert.showAndWait();
    if (result.get() == ButtonType.OK) {
        // name of which Tab should open
        (new TabAccess()).setTabName("tabGetMoney");
        (new GoToOperation()).goToMakeATransaction(DashboardStage);
    }
}
Also used : Stage(javafx.stage.Stage) GoToOperation(operation.GoToOperation) Alert(javafx.scene.control.Alert) TabAccess(tab.TabAccess) ButtonType(javafx.scene.control.ButtonType) FXML(javafx.fxml.FXML)

Example 24 with GoToOperation

use of operation.GoToOperation in project Money-Manager by krHasan.

the class MakeATransactionController method exbtnAdvancedSave.

@FXML
private void exbtnAdvancedSave(ActionEvent event) {
    if (total == 0) {
        exlblAdvWarningMsg.setText("Empty or Zero is not approved.");
    } else {
        TextField[] AdvancedExtxt = { extxtAdvSector1, extxtAdvSector2, extxtAdvSector3, extxtAdvSector4, extxtAdvSector5, extxtAdvSector6, extxtAdvSector7 };
        Label[] AdvancedExlbl = { exlblAdvSector1, exlblAdvSector2, exlblAdvSector3, exlblAdvSector4, exlblAdvSector5, exlblAdvSector6, exlblAdvSector7 };
        int index = 0;
        for (TextField textField : AdvancedExtxt) {
            if ((!textField.getText().isEmpty()) && (!textField.getText().equals("0"))) {
                exAdvSaveFunction(textField.getText(), AdvancedExlbl[index].getText());
            }
            ++index;
        }
        exInitialize();
        extxtAdvancedDescription.clear();
        Alert confirmationMsg = new Alert(AlertType.INFORMATION);
        confirmationMsg.setTitle("Successful Transaction");
        confirmationMsg.setHeaderText(null);
        confirmationMsg.setContentText("Successful");
        Stage MakeATransactionStage = (Stage) exbtnSave.getScene().getWindow();
        confirmationMsg.setX(MakeATransactionStage.getX() + 200);
        confirmationMsg.setY(MakeATransactionStage.getY() + 29);
        Timeline idlestage = new Timeline(new KeyFrame(Duration.seconds(2), new EventHandler<ActionEvent>() {

            @Override
            public void handle(ActionEvent event) {
                confirmationMsg.hide();
            }
        }));
        idlestage.setCycleCount(1);
        idlestage.play();
        confirmationMsg.showAndWait();
        (new GoToOperation()).goToDashboard(MakeATransactionStage);
    }
}
Also used : Timeline(javafx.animation.Timeline) ActionEvent(javafx.event.ActionEvent) Label(javafx.scene.control.Label) TextField(javafx.scene.control.TextField) 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 25 with GoToOperation

use of operation.GoToOperation in project Money-Manager by krHasan.

the class MakeATransactionController method mnuDashboard.

// ////////////////////////////////////////// Menu Function ////////////////////////////////////////////
// ----------------------------------------------------------------------------------------------------//
@FXML
private void mnuDashboard(ActionEvent event) {
    Stage MakeATransactionStage = (Stage) btnSignOut.getScene().getWindow();
    (new GoToOperation()).goToDashboard(MakeATransactionStage);
}
Also used : Stage(javafx.stage.Stage) GoToOperation(operation.GoToOperation) 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