From c498385fb7e372d13e2ee76d7b54ae2381728082 Mon Sep 17 00:00:00 2001
From: 张世豪 <979909237@qq.com>
Date: 星期三, 17 十二月 2025 19:35:57 +0800
Subject: [PATCH] 新增了测量模式

---
 src/set/Setsys.java |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/src/set/Setsys.java b/src/set/Setsys.java
index 153ef58..a3d9262 100644
--- a/src/set/Setsys.java
+++ b/src/set/Setsys.java
@@ -14,6 +14,7 @@
     private String appVersion;
     private int idleTrailDurationSeconds = DEFAULT_IDLE_TRAIL_DURATION_SECONDS;
     private boolean boundaryLengthVisible = false;  // 榛樿鍏抽棴鏄剧ず杈圭晫璺濈
+    private boolean measurementModeEnabled = false;  // 榛樿鍏抽棴娴嬮噺妯″紡
     
     private static final String PROPERTIES_FILE = "set.properties";
 
@@ -95,6 +96,14 @@
     public void setBoundaryLengthVisible(boolean visible) {
         this.boundaryLengthVisible = visible;
     }
+    
+    public boolean isMeasurementModeEnabled() {
+        return measurementModeEnabled;
+    }
+    
+    public void setMeasurementModeEnabled(boolean enabled) {
+        this.measurementModeEnabled = enabled;
+    }
 
     /**
      * 鍒濆鍖栨柟娉� - 浠巔roperties鏂囦欢璇诲彇鏁版嵁
@@ -115,6 +124,8 @@
             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);
                         
         } catch (FileNotFoundException e) {           
             // 鏂囦欢涓嶅瓨鍦ㄦ椂锛岃缃墍鏈夊睘鎬т负null
@@ -159,6 +170,9 @@
             case "boundaryLengthVisible":
                 this.boundaryLengthVisible = "true".equalsIgnoreCase(value);
                 break;
+            case "measurementModeEnabled":
+                this.measurementModeEnabled = "true".equalsIgnoreCase(value);
+                break;
             case "mapScale":
                 // mapScale涓嶉渶瑕佸湪鍐呭瓨涓瓨鍌紝鐩存帴鏇存柊鍒版枃浠�
                 break;
@@ -228,6 +242,7 @@
         this.appVersion = null;
         this.idleTrailDurationSeconds = DEFAULT_IDLE_TRAIL_DURATION_SECONDS;
         this.boundaryLengthVisible = false;  // 榛樿鍏抽棴
+        this.measurementModeEnabled = false;  // 榛樿鍏抽棴娴嬮噺妯″紡
     }
 
     /**

--
Gitblit v1.10.0