| | |
| | | static boolean start_jiexi=false; |
| | | static String tagid="0"; |
| | | JComboBox<String> box=null; |
| | | static String xieyi_type="1";//协议类型选择 |
| | | static String xieyi_type="2";//协议类型选择 |
| | | |
| | | public Index1() {//构造方法 |
| | | Toolkit toolkit = getToolkit();// 获得窗体工具包 |
| | |
| | | } |
| | | |
| | | public static void ara_show(String message) { |
| | | are.append(GetNowTime.sss()+":"+message+"\n"); |
| | | are.append(GetNowTime.sss()+","+message+"\n"); |
| | | are.setCaretPosition(are.getText().length()); |
| | | } |
| | | |
| | |
| | | public JComboBox<String> getBox() { |
| | | if(box==null) { |
| | | box=new JComboBox<String>(); |
| | | String[] neixing= {"原始数据","解析后数据","HEX显示","ASCLL显示"}; |
| | | String[] neixing= {"原始数据","解析后数据","HEX显示","ASCLL显示","定制格式"}; |
| | | ComboBoxModel<String > coModel=new DefaultComboBoxModel<>(neixing);//下拉列表模型 |
| | | box.setModel(coModel); |
| | | box.setBackground(Color.white); |
| | | box.setSelectedIndex(2); |
| | | box.setSelectedIndex(1); |
| | | box.addActionListener(new ActionListener() { |
| | | public void actionPerformed(ActionEvent e) { |
| | | if(box.getSelectedIndex()==0) { |
| | |
| | | xieyi_type="3"; |
| | | }else if(box.getSelectedIndex()==3) { |
| | | xieyi_type="4"; |
| | | }else if(box.getSelectedIndex()==4) { |
| | | xieyi_type="5"; |
| | | } |
| | | |
| | | } |