Search in sources :

Example 1 with StorePreferencesController

use of de.carne.certmgr.jfx.storepreferences.StorePreferencesController in project certmgr by hdecarne.

the class StoreController method onCmdStorePreferences.

@SuppressWarnings("unused")
@FXML
void onCmdStorePreferences(ActionEvent evt) {
    try {
        StorePreferencesController storePreferences = StorePreferencesDialog.load(this).init(this.storeProperty.get(), this.userPreferences.expertMode.getBoolean(false));
        storePreferences.showAndWait();
    } catch (IOException e) {
        Alerts.unexpected(e).showAndWait();
    }
}
Also used : StorePreferencesController(de.carne.certmgr.jfx.storepreferences.StorePreferencesController) IOException(java.io.IOException) FXML(javafx.fxml.FXML)

Example 2 with StorePreferencesController

use of de.carne.certmgr.jfx.storepreferences.StorePreferencesController in project certmgr by hdecarne.

the class StoreController method onCmdNewStore.

@SuppressWarnings("unused")
@FXML
void onCmdNewStore(ActionEvent evt) {
    try {
        StorePreferencesController createStore = StorePreferencesDialog.load(this).init(this.userPreferences.expertMode.getBoolean(false));
        Optional<UserCertStore> createStoreResult = createStore.showAndWait();
        if (createStoreResult.isPresent()) {
            UserCertStore store = createStoreResult.get();
            this.storeProperty.set(store);
            updateStoreEntryView();
            this.ctlStoreStatusLabel.setText(StoreI18N.formatSTR_TEXT_STORE_STATUS(store.storeHome()));
        }
    } catch (IOException e) {
        Alerts.unexpected(e).showAndWait();
    }
}
Also used : StorePreferencesController(de.carne.certmgr.jfx.storepreferences.StorePreferencesController) IOException(java.io.IOException) UserCertStore(de.carne.certmgr.certs.UserCertStore) FXML(javafx.fxml.FXML)

Aggregations

StorePreferencesController (de.carne.certmgr.jfx.storepreferences.StorePreferencesController)2 IOException (java.io.IOException)2 FXML (javafx.fxml.FXML)2 UserCertStore (de.carne.certmgr.certs.UserCertStore)1