| | |
| | | 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; |
| | |
| | | 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; |
| | |
| | | } |
| | | 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); |
| | |
| | | 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()); |
| | | |
| | |
| | | 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 |