From 69b40096cb0ae965f2a3e92672b880edfe7d04d2 Mon Sep 17 00:00:00 2001
From: 826220679@qq.com <826220679@qq.com>
Date: 星期六, 27 十二月 2025 21:14:09 +0800
Subject: [PATCH] 优化了登录页面
---
src/set/Setsys.java | 47 +++++++++++++++++++++++++++++++++++++++--------
1 files changed, 39 insertions(+), 8 deletions(-)
diff --git a/src/set/Setsys.java b/src/set/Setsys.java
index 153ef58..ebdccbc 100644
--- a/src/set/Setsys.java
+++ b/src/set/Setsys.java
@@ -14,6 +14,8 @@
private String appVersion;
private int idleTrailDurationSeconds = DEFAULT_IDLE_TRAIL_DURATION_SECONDS;
private boolean boundaryLengthVisible = false; // 榛樿鍏抽棴鏄剧ず杈圭晫璺濈
+ private boolean measurementModeEnabled = false; // 榛樿鍏抽棴娴嬮噺妯″紡
+ private boolean manualBoundaryDrawingMode = false; // 榛樿鍏抽棴鎵嬪姩缁樺埗杈圭晫妯″紡
private static final String PROPERTIES_FILE = "set.properties";
@@ -95,6 +97,22 @@
public void setBoundaryLengthVisible(boolean visible) {
this.boundaryLengthVisible = visible;
}
+
+ public boolean isMeasurementModeEnabled() {
+ return measurementModeEnabled;
+ }
+
+ public void setMeasurementModeEnabled(boolean enabled) {
+ this.measurementModeEnabled = enabled;
+ }
+
+ public boolean isManualBoundaryDrawingMode() {
+ return manualBoundaryDrawingMode;
+ }
+
+ public void setManualBoundaryDrawingMode(boolean enabled) {
+ this.manualBoundaryDrawingMode = enabled;
+ }
/**
* 鍒濆鍖栨柟娉� - 浠巔roperties鏂囦欢璇诲彇鏁版嵁
@@ -115,6 +133,10 @@
this.idleTrailDurationSeconds = sanitizeIdleTrailDuration(props.getProperty("idleTrailDurationSeconds"));
String boundaryLengthVisibleStr = props.getProperty("boundaryLengthVisible");
this.boundaryLengthVisible = "true".equalsIgnoreCase(boundaryLengthVisibleStr);
+ String measurementModeEnabledStr = props.getProperty("measurementModeEnabled");
+ this.measurementModeEnabled = "true".equalsIgnoreCase(measurementModeEnabledStr);
+ String manualBoundaryDrawingModeStr = props.getProperty("manualBoundaryDrawingMode");
+ this.manualBoundaryDrawingMode = "true".equalsIgnoreCase(manualBoundaryDrawingModeStr);
} catch (FileNotFoundException e) {
// 鏂囦欢涓嶅瓨鍦ㄦ椂锛岃缃墍鏈夊睘鎬т负null
@@ -159,6 +181,12 @@
case "boundaryLengthVisible":
this.boundaryLengthVisible = "true".equalsIgnoreCase(value);
break;
+ case "measurementModeEnabled":
+ this.measurementModeEnabled = "true".equalsIgnoreCase(value);
+ break;
+ case "manualBoundaryDrawingMode":
+ this.manualBoundaryDrawingMode = "true".equalsIgnoreCase(value);
+ break;
case "mapScale":
// mapScale涓嶉渶瑕佸湪鍐呭瓨涓瓨鍌紝鐩存帴鏇存柊鍒版枃浠�
break;
@@ -228,20 +256,23 @@
this.appVersion = null;
this.idleTrailDurationSeconds = DEFAULT_IDLE_TRAIL_DURATION_SECONDS;
this.boundaryLengthVisible = false; // 榛樿鍏抽棴
+ this.measurementModeEnabled = false; // 榛樿鍏抽棴娴嬮噺妯″紡
+ this.manualBoundaryDrawingMode = false; // 榛樿鍏抽棴鎵嬪姩缁樺埗杈圭晫妯″紡
}
/**
* 鏄剧ず褰撳墠鎵�鏈夊睘鎬у��
*/
public void displayProperties() {
- System.out.println("褰撳墠灞炴�у��:");
- System.out.println("mowerId: " + (mowerId != null ? mowerId : "鏈缃�"));
- System.out.println("cuttingWidth: " + (cuttingWidth != null ? cuttingWidth : "鏈缃�"));
- System.out.println("simCardNumber: " + (simCardNumber != null ? simCardNumber : "鏈缃�"));
- System.out.println("handheldMarkerId: " + (handheldMarkerId != null ? handheldMarkerId : "鏈缃�"));
- System.out.println("firmwareVersion: " + (firmwareVersion != null ? firmwareVersion : "鏈缃�"));
- System.out.println("appVersion: " + (appVersion != null ? appVersion : "鏈缃�"));
- System.out.println("idleTrailDurationSeconds: " + idleTrailDurationSeconds);
+ // 鏄剧ず灞炴�у姛鑳藉凡绂佺敤
+ }
+
+ /**
+ * 鑾峰彇鍓茶崏鏈虹紪鍙�
+ * @return 鍓茶崏鏈虹紪鍙�
+ */
+ public static String getMowerIdValue() {
+ return getPropertyValue("mowerId");
}
// 鏍规嵁set.properties涓殑閿悕鑾峰彇瀵瑰簲鐨勫�硷紝娌℃湁鎴栦负-1鏃惰繑鍥瀗ull
--
Gitblit v1.10.0