Example #1
0
 @Override
 public void updateContents() {
     GeneralSettings st = JsonConfig.create(GeneralSettings.class);
     downloadFolder.setText(org.appwork.storage.config.JsonConfig.create(GeneralSettings.class).getDefaultDownloadFolder());
     autoCRC.setSelected(st.isHashCheckEnabled());
     simpleContainer.setSelected(st.isAutoOpenContainerAfterDownload());
     this.remove.setValue(config.getCleanupAfterDownloadAction());
     this.ifFileExists.setValue(config.getIfFileExistsAction());
 }
Example #2
0
 @Override
 public void save() {
     GeneralSettings st = JsonConfig.create(GeneralSettings.class);
     st.setDefaultDownloadFolder(downloadFolder.getText());
     st.setHashCheckEnabled(autoCRC.isSelected());
     st.setAutoOpenContainerAfterDownload(simpleContainer.isSelected());
     config.setCleanupAfterDownloadAction(remove.getValue());
     config.setIfFileExistsAction(this.ifFileExists.getValue());
 }