From 2144172c7b961d4112850692ed77b46f1ae5d373 Mon Sep 17 00:00:00 2001
From: 张世豪 <979909237@qq.com>
Date: 星期五, 05 十二月 2025 19:34:53 +0800
Subject: [PATCH] 20251205

---
 src/zhuye/Shouye.java |   43 ++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 40 insertions(+), 3 deletions(-)

diff --git a/src/zhuye/Shouye.java b/src/zhuye/Shouye.java
index b626aee..10f9ca0 100644
--- a/src/zhuye/Shouye.java
+++ b/src/zhuye/Shouye.java
@@ -4,6 +4,7 @@
 import javax.swing.Timer;
 
 import baseStation.BaseStation;
+import set.Setsys;
 import baseStation.BaseStationDialog;
 
 import java.awt.*;
@@ -156,7 +157,8 @@
         add(controlPanel, BorderLayout.SOUTH);
         
         // 鍒濆鍖栧湴鍥炬覆鏌撳櫒
-        mapRenderer = new MapRenderer(visualizationPanel);
+    mapRenderer = new MapRenderer(visualizationPanel);
+    applyIdleTrailDurationFromSettings();
         
         // 鍒濆鍖栧璇濇寮曠敤涓簄ull锛屽欢杩熷垱寤�
         legendDialog = null;
@@ -171,6 +173,28 @@
         initializeDefaultAreaSelection();
         refreshMapForSelectedArea();
     }
+
+    private void applyIdleTrailDurationFromSettings() {
+        if (mapRenderer == null) {
+            return;
+        }
+        int durationSeconds = MapRenderer.DEFAULT_IDLE_TRAIL_DURATION_SECONDS;
+        String configuredValue = Setsys.getPropertyValue("idleTrailDurationSeconds");
+        if (configuredValue != null) {
+            String trimmed = configuredValue.trim();
+            if (!trimmed.isEmpty()) {
+                try {
+                    int parsed = Integer.parseInt(trimmed);
+                    if (parsed >= 5 && parsed <= 600) {
+                        durationSeconds = parsed;
+                    }
+                } catch (NumberFormatException ignored) {
+                    durationSeconds = MapRenderer.DEFAULT_IDLE_TRAIL_DURATION_SECONDS;
+                }
+            }
+        }
+        mapRenderer.setIdleTrailDurationSeconds(durationSeconds);
+    }
     
     private void createHeaderPanel() {
         headerPanel = new JPanel(new BorderLayout());
@@ -624,8 +648,12 @@
             }
         }
 
-        Device device = new Device();
-        device.initFromProperties();
+        Device device = Device.getGecaoji();
+        if (device == null) {
+            device = new Device();
+            device.initFromProperties();
+            Device.setGecaoji(device);
+        }
 
         if (baseStationDialog == null) {
             baseStationDialog = new BaseStationDialog(dialogParent, THEME_COLOR, device, baseStation);
@@ -783,6 +811,15 @@
         rightPanel.setOpaque(false);
 
         fixQualityIndicator = new FixQualityIndicator();
+        fixQualityIndicator.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
+        fixQualityIndicator.addMouseListener(new MouseAdapter() {
+            @Override
+            public void mouseClicked(MouseEvent e) {
+                if (SwingUtilities.isLeftMouseButton(e) && mapRenderer != null) {
+                    mapRenderer.showMowerInfo();
+                }
+            }
+        });
         mowingProgressLabel = new JLabel("--%");
         mowingProgressLabel.setFont(new Font("寰蒋闆呴粦", Font.BOLD, 12));
         mowingProgressLabel.setForeground(THEME_COLOR);

--
Gitblit v1.10.0