From 8f8eed75beb5bb9b66f2a87de856f2dbf11e6ffe Mon Sep 17 00:00:00 2001
From: 张世豪 <979909237@qq.com>
Date: 星期四, 20 十一月 2025 20:29:36 +0800
Subject: [PATCH] 修改

---
 src/home/CardMachineUI.java |   36 +-----------------------------------
 1 files changed, 1 insertions(+), 35 deletions(-)

diff --git a/src/home/CardMachineUI.java b/src/home/CardMachineUI.java
index 12e7f49..291cd45 100644
--- a/src/home/CardMachineUI.java
+++ b/src/home/CardMachineUI.java
@@ -466,9 +466,6 @@
 	    cardSlotsPanel.removeAll();
 	    slotButtons.clear();
 
-	    int updatedSlots = 0;
-	    int errorSlots = 0;
-
 	    for (int i = 1; i <= TOTAL_SLOTS; i++) {
 	        final int slotId = i;
 	        SlotStatus status = getSlotStatusFromManager(slotId);
@@ -476,10 +473,8 @@
 	        // 娣诲姞璋冭瘯淇℃伅
 	        Fkj slotInfo = slotManager.getSlotInfo(slotId);
 	        if (slotInfo != null) {
-	            updatedSlots++;
 	        } else {
 	            System.err.println("鍗℃Ы " + slotId + " - 鑾峰彇淇℃伅澶辫触");
-	            errorSlots++;
 	        }
 
 	        JButton slotButton = new JButton(String.valueOf(slotId));
@@ -509,7 +504,7 @@
 	    cardSlotsPanel.revalidate();
 	    cardSlotsPanel.repaint();
 	    
-	    System.out.println("鍗℃Ы鏄剧ず鏇存柊瀹屾垚: " + updatedSlots + " 涓垚鍔�, " + errorSlots + " 涓け璐�");
+//	    System.out.println("鍗℃Ы鏄剧ず鏇存柊瀹屾垚: " + updatedSlots + " 涓垚鍔�, " + errorSlots + " 涓け璐�");
 	}
 
 	private Color brighterColor(Color color) {
@@ -572,7 +567,6 @@
 	            if (panel.getComponentCount() >= 2) {
 	                JLabel textLabel = (JLabel) panel.getComponent(1);
 	                if (textLabel.getText().startsWith("涓插彛:")) {
-	                    String statusText = lunxun.isSerialConnected() ? "姝e父" : "鏂紑";
 	                    Color statusColor = lunxun.isSerialConnected() ? 
 	                        new Color(52, 152, 219) : new Color(231, 76, 60);
 	                    
@@ -637,34 +631,6 @@
 	    return "涓插彛瑙f瀽鍣ㄦ湭鍒濆鍖�";
 	}
 	
-	/**
-	 * 鍒涘缓缇庡寲鎸夐挳
-	 */
-	private JButton createStyledButton(String text, Color color) {
-		JButton button = new JButton(text);
-		button.setFont(new Font("Microsoft YaHei", Font.BOLD, 14));
-		button.setBackground(color);
-		button.setForeground(Color.WHITE);
-		button.setFocusPainted(false);
-		button.setBorder(BorderFactory.createEmptyBorder(10, 20, 10, 20));
-		button.setCursor(new Cursor(Cursor.HAND_CURSOR));
-
-		// 榧犳爣鎮仠鏁堟灉
-		button.addMouseListener(new java.awt.event.MouseAdapter() {
-			public void mouseEntered(java.awt.event.MouseEvent evt) {
-				button.setBackground(brighterColor(color));
-			}
-
-			public void mouseExited(java.awt.event.MouseEvent evt) {
-				button.setBackground(color);
-			}
-		});
-
-		return button;
-	}
-
-	
-
 	/**
 	 * 楠岃瘉鍙栧崱瀵嗙爜
 	 */

--
Gitblit v1.9.3