| | |
| | | btn_connet.setEnabled(true); |
| | | btn_connet.addActionListener(new ActionListener() { |
| | | public void actionPerformed(ActionEvent arg0) { |
| | | int comm_type = tab_comm_type.getSelectedIndex(); |
| | | //int comm_type = tab_comm_type.getSelectedIndex(); |
| | | int comm_type = 0; |
| | | //System.out.println(comm_type+"===="); |
| | | String spname_or_ipaddr; |
| | | int bitrate_or_ipport = Integer.parseInt((String)cb_comm_bitrate.getSelectedItem()); |
| | | |
| | |
| | | spname_or_ipaddr = tf_ip_addr.getText().trim(); |
| | | bitrate_or_ipport = Integer.parseInt(tf_ip_port.getText().trim()); |
| | | } |
| | | |
| | | |
| | | int main_DevType = main_TabbedPane.getSelectedIndex(); |
| | | boolean comm_open_res = true; |
| | | int monomer_devType = cb_dev_type.getSelectedIndex(); |
| | |
| | | int dev_addr = Integer.parseInt(tf_target_addr.getText().trim()); |
| | | comm_open_res = panel_ZDHJ_base.openCommPort(comm_type, spname_or_ipaddr, |
| | | bitrate_or_ipport, dev_addr, m_Log); |
| | | System.out.println(comm_open_res); |
| | | } else if(main_window.CommDevType_FBS9100 == main_DevType) { |
| | | int dev_addr = Integer.parseInt(tf_target_addr.getText().trim()); |
| | | comm_open_res = panel_FBS9100_base.openCommPort(comm_type, spname_or_ipaddr, |