diff --git a/src/main/java/org/rococy/roomit/controller/SettingWindowController.java b/src/main/java/org/rococy/roomit/controller/SettingWindowController.java index e0227cd..4a85a41 100644 --- a/src/main/java/org/rococy/roomit/controller/SettingWindowController.java +++ b/src/main/java/org/rococy/roomit/controller/SettingWindowController.java @@ -204,7 +204,7 @@ public class SettingWindowController { // 是否开机自启 selfStartingGroup.selectedToggleProperty() .addListener((observable, oldValue, newValue) -> { - basicConfiguration.setSelfStarting(Boolean.parseBoolean((String) newValue.getUserData())); + basicConfiguration.setAutoStart(Boolean.parseBoolean((String) newValue.getUserData())); AutoStartFile.toggleExists(); }); // 是否透明 @@ -231,7 +231,7 @@ public class SettingWindowController { private void initBasicConfiguration() { // 是否开机自启 - if (basicConfiguration.getSelfStarting()) { + if (basicConfiguration.getAutoStart()) { selfStartingBtn.setSelected(true); } else { notSelfStartingBtn.setSelected(true); diff --git a/src/main/java/org/rococy/roomit/domain/BasicConfiguration.java b/src/main/java/org/rococy/roomit/domain/BasicConfiguration.java index f5b2960..092c837 100644 --- a/src/main/java/org/rococy/roomit/domain/BasicConfiguration.java +++ b/src/main/java/org/rococy/roomit/domain/BasicConfiguration.java @@ -6,13 +6,13 @@ package org.rococy.roomit.domain; */ public class BasicConfiguration { - private Boolean selfStarting; + private Boolean autoStart; - public Boolean getSelfStarting() { - return selfStarting; + public Boolean getAutoStart() { + return autoStart; } - public void setSelfStarting(Boolean selfStarting) { - this.selfStarting = selfStarting; + public void setAutoStart(Boolean autoStart) { + this.autoStart = autoStart; } } diff --git a/src/main/java/org/rococy/roomit/util/AutoStartFile.java b/src/main/java/org/rococy/roomit/util/AutoStartFile.java index db28342..8f12e18 100644 --- a/src/main/java/org/rococy/roomit/util/AutoStartFile.java +++ b/src/main/java/org/rococy/roomit/util/AutoStartFile.java @@ -22,7 +22,7 @@ public class AutoStartFile { private static final BasicConfiguration BASIC_CONFIGURATION = ConfigurationManager.getBasicConfiguration(); public static void toggleExists() { - if (BASIC_CONFIGURATION.getSelfStarting()) { + if (BASIC_CONFIGURATION.getAutoStart()) { generate(); } else { delete();