From c3ef69b2bb2de6a44133a5859e5bc8000096e582 Mon Sep 17 00:00:00 2001
From: Administrator <1525436766@qq.com>
Date: 星期一, 26 九月 2022 10:32:39 +0800
Subject: [PATCH] 修改打包配置,优化打包过程

---
 src/main/main_window.java |   57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 54 insertions(+), 3 deletions(-)

diff --git a/src/main/main_window.java b/src/main/main_window.java
index 67062f7..a469d49 100644
--- a/src/main/main_window.java
+++ b/src/main/main_window.java
@@ -81,7 +81,8 @@
 	public static int LANG_TYPE_CN = 0;
 	public static int LANG_TYPE_EN = 1;
 	
-	public String mTitle = "MSP&SAM&SWM&Curr_V1.523_220424G";
+	//public String mTitle = "MSP&SAM&SWM&Curr_V1.523_220424G";
+	public String mTitle = "汇集模块调试工具_V1.523_ZJ";
 	
 	public static int LANG_TYPE	= LANG_TYPE_CN;
 	public static final boolean APP_FBS9600_MON_EN = true;
@@ -94,7 +95,9 @@
 	public static final boolean APP_NTM_LORA_EN = true;
 	public static final boolean APP_BYBB_EN = false;
 	
-	public int CommDevType = CommDevType_MON;
+	public int CommDevType = CommDevType_ZDHJ;		//默认显示tab选项卡
+	
+	public boolean isDebugMode = true;				//是否为调试模式true:调试模式     false:打包模式[会隐藏左侧选项卡]
 	
 	public boolean MonVol_Is_Adj = false;
 	public boolean MonRes_Is_Test = false;
@@ -262,8 +265,13 @@
 		}
 		panel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS));
 		
+		JPanel panel_80 = new JPanel();
+		panel_80.setLayout(new GridLayout(0, 1));
+		
 		tab_comm_type = new JTabbedPane(JTabbedPane.TOP);
-		panel.add(tab_comm_type);
+		panel_80.add(tab_comm_type);
+		
+		panel.add(panel_80);
 		
 		JPanel panel_8 = new JPanel();
 		tab_comm_type.addTab("RS485\u901A\u4FE1", null, panel_8, null);
@@ -402,6 +410,8 @@
 		btn_connet.addActionListener(new ActionListener() {
 			public void actionPerformed(ActionEvent arg0) {
 				int comm_type = tab_comm_type.getSelectedIndex();
+				
+				//System.out.println(comm_type);
 				String spname_or_ipaddr;
 				int bitrate_or_ipport = Integer.parseInt((String)cb_comm_bitrate.getSelectedItem());
 			    
@@ -693,6 +703,47 @@
 			main_TabbedPane.setEnabled(false);
 		}
 		/**************************************************************************/
+		
+		//打包模式判断选项--隐藏左侧选卡卡
+		if(CommDevType >= CommDevType_MON && CommDevType <= CommDevType_BYBB) {
+			//选中默认选项卡
+			main_TabbedPane.setSelectedIndex(CommDevType);
+			if(!isDebugMode) {				
+				main_TabbedPane.setVisible(false);
+				switch(CommDevType) {
+					case CommDevType_MON:{			 		
+						frmSerialport.getContentPane().add(panel_mon_base, BorderLayout.CENTER);
+					}break;
+					case CommDevType_CURR:{
+						frmSerialport.getContentPane().add(panel_Curr_Module, BorderLayout.CENTER);
+					}break;
+					case CommDevType_GROUPVOL:{
+						frmSerialport.getContentPane().add(panel_groupVol_Module, BorderLayout.CENTER);
+					}break;
+					case CommDevType_FCF651VOL:{
+						frmSerialport.getContentPane().add(panel_fcf651Vol_Module, BorderLayout.CENTER);
+					}break;
+					case CommDevType_ZDHJ:{
+						//panel_3.setVisible(false);
+						tab_comm_type.remove(panel_3);
+						
+						frmSerialport.getContentPane().add(panel_ZDHJ_base, BorderLayout.CENTER);
+					}break;
+					case CommDevType_FBS9100:{
+						frmSerialport.getContentPane().add(panel_FBS9100_base, BorderLayout.CENTER);
+					}break;
+					case CommDevType_NTM:{
+						frmSerialport.getContentPane().add(panel_NTM_base, BorderLayout.CENTER);
+					}break;
+					case CommDevType_LoraTest:{
+						frmSerialport.getContentPane().add(panel_LoraTest_base, BorderLayout.CENTER);
+					}break;
+					case CommDevType_BYBB:{
+						frmSerialport.getContentPane().add(panel_bybb_base, BorderLayout.CENTER);
+					}break;
+				}
+			}
+		}
 		/**************************************************************************/
 		mMainFormTimer = new Timer(200, new ActionListener() {
 			@Override

--
Gitblit v1.9.1