@@ -34,6 +34,8 @@ public class SettingController extends VBox {
3434
3535 @ FXML private CheckBox fixAndroidIdLanguage ;
3636
37+ @ FXML private CheckBox useNewAndroid ;
38+
3739 @ FXML private CheckBox useDefault ;
3840
3941 @ FXML private TextField defaultValue ;
@@ -61,11 +63,6 @@ public void init() {
6163
6264 closeButton .setImage ("/images/close_normal.png" , ButtonState .Normal );
6365
64- // ignoreChinese.setOnAction(event -> {
65- // PropertiesManager.setProperty(Constant.IGNORE_CHINESE, ignoreChinese.isSelected() ? Constant.TRUE : Constant.FALSE);
66- // });
67- // ignoreChinese.setSelected(new Boolean(PropertiesManager.getProperty(Constant.IGNORE_CHINESE)));
68-
6966 ignoreAndroidEnglish .setOnAction (event -> {
7067 PropertiesManager .setProperty (Constant .IGNORE_ENGLISH_SUFFIX , ignoreAndroidEnglish .isSelected () ? Constant .TRUE : Constant .FALSE );
7168 });
@@ -76,27 +73,15 @@ public void init() {
7673 });
7774 fixAndroidIdLanguage .setSelected (new Boolean (PropertiesManager .getProperty (Constant .FIX_ID_LANGUAGE )));
7875
76+ useNewAndroid .setOnAction (event -> {
77+ PropertiesManager .setProperty (Constant .USE_NEW_ANDROID , useNewAndroid .isSelected () ? Constant .TRUE : Constant .FALSE );
78+ });
79+ useNewAndroid .setSelected (new Boolean (PropertiesManager .getProperty (Constant .USE_NEW_ANDROID )));
80+
7981 useDefault .setOnAction (event -> {
8082 PropertiesManager .setProperty (Constant .USE_DEFAULT_VALUE , useDefault .isSelected () ? Constant .TRUE : Constant .FALSE );
81- // defaultValue.setDisable(!useDefault.isSelected());
8283 });
8384 useDefault .setSelected (new Boolean (PropertiesManager .getProperty (Constant .USE_DEFAULT_VALUE )));
84-
85- // defaultValue.setDisable(!useDefault.isSelected());
86- // defaultValue.setText(PropertiesManager.getProperty(Constant.DEFAULT_VALUE));
87- // defaultValue.focusedProperty().addListener(new ChangeListener<Boolean>() {
88- // @Override
89- // public void changed(ObservableValue<? extends Boolean> observable, Boolean oldValue, Boolean newValue) {
90- // if (!newValue) {
91- // String text = defaultValue.getText();
92- // if (text.trim().length() < 1) {
93- // text = "##我是没有翻译的##";
94- // }
95- // PropertiesManager.setProperty(Constant.DEFAULT_VALUE, text);
96- // }
97- // }
98- // });
99-
10085 }
10186
10287 @ FXML
0 commit comments