zsh_root
2024-01-02 7b595546af704983dbafcd0d385c8768ddacefc2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
package Frame;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Container;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import javax.swing.Box;
import javax.swing.ComboBoxModel;
import javax.swing.DefaultComboBoxModel;
import javax.swing.ImageIcon;
import javax.swing.JComboBox;
import javax.swing.JFileChooser;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import javax.swing.JTextField;
import javax.swing.event.InternalFrameEvent;
import javax.swing.event.InternalFrameListener;
import BaoWen.DebugStarMessage;
import BaoWen.Udp_Receive;
import ColorAndFont.ChooseFont;
import ColorAndFont.NothJPanel;
import ColorAndFont.UIColor;
import ColorAndFont.buttonTitle;
import Method.GetNowTime;
import PbuliClass.JButtonModel;
import PbuliClass.JCheckBoxModel;
import PbuliClass.ShowMessage;
import PbuliClass.Systems;
import PbuliClass.jinternalFrame;
import tag.Tag_Dell;
import tbDataModel_Dell.Tools;
 
/**²é¿´ÊµÊ±±¨ÎÄ*/
public class TcpIpManage extends jinternalFrame  {
 
    /** 
     * 
     */
    private static final long serialVersionUID = 1L;
 
    static JTextArea textArea=null;
    JButtonModel start=null;//¿ªÊ¼°´Å¥
    JButtonModel save=null;//±£´æ°´Å¥
    JButtonModel clear=null;//Çå¿Õ±¨ÎÄ
    JButtonModel jtb_datafrom=null;//²»ÏÔʾÊý¾ÝÀ´Ô´
    JTextField  port=null;//½ÓÊÕ¶Ë¿Ú
    JTextField  ipAdress=null;//½ÓÊÕµØÖ·
    JTextField  sendFile=null;//·¢ËÍÎı¾¿ò
    JButtonModel sendButton=null;//·¢ËͰ´Å¥
    JButtonModel jbt_urt=null;//ÔÝÍ£urt½ÓÊÕ
    NothJPanel mb1=null;
    NothJPanel mb2=null;
    JScrollPane scrollPane=null;
    JComboBox<String> box=null;
    JComboBox<String> tagbox=null;//±êÇ©¼¯ºÏ
    JComboBox<String> datatype=null;//Êý¾ÝÀàÐÍ
    static String xieyi_type="2";//ЭÒéÀàÐÍÑ¡Ôñ
    String message=null;
    static String datatypeis="±¨ÎÄÊý¾Ý";
    static boolean star=false;
    static String need_guo_lv_tag="Ñ¡Ôñ±êÇ©";
    JCheckBoxModel openbaowen=null;//¿ªÆô»òÕ߹رձ£´æ±¨Îĸ´Ñ¡¿ò
    JCheckBoxModel hexsend=null;//HEX·¢ËÍ¿ò
    JCheckBoxModel hexins=null;//HEX·¢ËÍ¿ò
    static boolean asclljx=false;//20230709yang
    boolean starandstop=false;
    static boolean hexin=false;//ÊÕµ½µÄÊý¾ÝhexÏÔʾ    
    static boolean urt=true;
    static boolean showfrom=true;//ÊÇ·ñÏÔʾÊý¾ÝÀ´Ô´
 
    /**Éè¼Æ×ÖÌåÏÔʾЧ¹û Font mf = new Font(String ×ÖÌ壬int ·ç¸ñ£¬int ×ÖºÅ);
    ×ÖÌ壺TimesRoman, Courier, ArialµÈ
    ·ç¸ñ£ºÈý¸ö³£Á¿ Font.PLAIN, Font.BOLD, Font.ITALIC
    ×ֺţº×ֵĴóС£¨°õÊý£©*/
    public TcpIpManage() {    
        String title="±¨ÎÄÊý¾Ý";
        if(Systems.sys().getLanguage().equals("English")) {
            title="Message data";
        }
        this.setTitle(title);
        Container rq=getContentPane();//»ñÈ¡ÈÝÆ÷
        this.addInternalFrameListener(new InternalFrameListener() {
            public void internalFrameOpened(InternalFrameEvent e) {                
            }
 
            public void internalFrameIconified(InternalFrameEvent e) {
 
            }
 
            public void internalFrameDeiconified(InternalFrameEvent e) {
 
            }
 
            public void internalFrameDeactivated(InternalFrameEvent e) {                
            }
 
            public void internalFrameClosing(InternalFrameEvent e) {
            }
 
            public void internalFrameClosed(InternalFrameEvent e) {    
                star=false;
                textArea=null;
                urt=true;
                need_guo_lv_tag="Ñ¡Ôñ±êÇ©";
                showfrom=false;
                asclljx=false;
            }
 
            public void internalFrameActivated(InternalFrameEvent e) {
 
            }
        });
        rq.setLayout(new BorderLayout());
        rq.setBackground(UIColor.getNorth_color());
        rq.add(getMb1(),BorderLayout.NORTH);
        rq.add(getGd(),BorderLayout.CENTER);
        rq.add(getMb2(),BorderLayout.SOUTH);        
        this.setBounds(175, 0, 1000,500);
        this.setFrameIcon(new ImageIcon("image/icon/TCP.png"));//ÉèÖô°Ìåͼ±ê
 
    }
 
    public static String get_xieyi_type() {
        return xieyi_type;
    }
 
    public static JTextArea get_text_area() {
        if(textArea==null) {
            textArea=new JTextArea(10,10);
            textArea.setForeground(UIColor.getTable_font());
            textArea.setFont(ChooseFont.getFont(13));
        }
        return textArea;
    }
 
    public static boolean getStar() {
        return star;
    }
 
 
 
 
    public NothJPanel getMb1() {
        if(mb1==null) {
            mb1=new NothJPanel();
            Box topicBox = Box.createHorizontalBox();// ´´½¨Ò»¸öˮƽÏäÈÝÆ÷
            topicBox.add(Box.createHorizontalStrut(10));// Ìí¼ÓÒ»¸ö3ÏñËØ¿íµÄˮƽ֧Öù
            topicBox.add(getDatatype());
            topicBox.add(Box.createHorizontalStrut(15));// Ìí¼ÓÒ»¸ö3ÏñËØ¿íµÄˮƽ֧Öù
            topicBox.add(getBox());
            topicBox.add(Box.createHorizontalStrut(20));
            topicBox.add(getTagbox()) ;
            topicBox.add(Box.createHorizontalStrut(20));
            topicBox.add(getStart());//Ìí¼ÓËÑË÷Îı¾¿ò
            topicBox.add(Box.createHorizontalStrut(15));// Ìí¼ÓÒ»¸ö3ÏñËØ¿íµÄˮƽ֧Öù
            topicBox.add(getSave());//Ìí¼ÓËÑË÷°´Å¥
            topicBox.add(Box.createHorizontalStrut(15));
            topicBox.add(getClear());
            mb1.add(topicBox);
 
        }
        return mb1;
    }
 
    public JTextField  get_sendFile() {
        if(sendFile==null) {
            sendFile=new JTextField(20);
        }
        return sendFile;
    }
 
    public NothJPanel getMb2() {
        if(mb2==null) {
            mb2=new NothJPanel();
//            JlableModel portext=new JlableModel("¶Ë¿Ú:");
//            JlableModel ipadresstext=new JlableModel("UDP·¢Ë͵ØÖ·:");
            Box topicBox = Box.createHorizontalBox();// ´´½¨Ò»¸öˮƽÏäÈÝÆ÷
//            topicBox.add(ipadresstext);    
//            topicBox.add(Box.createHorizontalStrut(2));// Ìí¼ÓÒ»¸ö3ÏñËØ¿íµÄˮƽ֧Öù
//            topicBox.add(get_ipadress());
//            topicBox.add(Box.createHorizontalStrut(2));// Ìí¼ÓÒ»¸ö3ÏñËØ¿íµÄˮƽ֧Öù
//            topicBox.add(portext);    
//            topicBox.add(Box.createHorizontalStrut(2));// Ìí¼ÓÒ»¸ö3ÏñËØ¿íµÄˮƽ֧Öù
//            topicBox.add(get_port());
//            topicBox.add(Box.createHorizontalStrut(15));// Ìí¼ÓÒ»¸ö3ÏñËØ¿íµÄˮƽ֧Öù    
//            topicBox.add(get_sendFile());
//            topicBox.add(Box.createHorizontalStrut(15));// Ìí¼ÓÒ»¸ö3ÏñËØ¿íµÄˮƽ֧Öù
//            topicBox.add(get_sendButton());//Ìí¼ÓËÑË÷°´Å¥);
 
            topicBox.add(Box.createHorizontalStrut(15));
            topicBox.add(getOpenbaowen());
            topicBox.add(Box.createHorizontalStrut(15));
            topicBox.add(getHexins());
            topicBox.add(Box.createHorizontalStrut(15));
            topicBox.add(getHexsend());
            topicBox.add(Box.createHorizontalStrut(15));
            topicBox.add(getJbt_urt());
            topicBox.add(Box.createHorizontalStrut(20));
            topicBox.add(get_jtb_datafrom());
            mb2.add(topicBox);
//            mb2.setBackground(Color.gray);//ÐÞ¸ÄÑÕÉ«yang2023.07.08
        }
        return mb2;
    }
 
    /**»ñÈ¡¹ö¶¯Ãæ°å*/
    public JScrollPane getGd() {
        if(scrollPane==null) {
            scrollPane=new JScrollPane(get_text_area());
        }
        return scrollPane;
    }
 
    public JTextField  get_port() {
        if(port==null) {
            port=new JTextField(5);
        }
        return port;
    }
 
    public JTextField  get_ipadress() {
        if(ipAdress==null) {
            ipAdress=new JTextField(10);
        }
        return ipAdress;
    }
 
    public void writeInfo(PrintWriter writer, String text) {
        writer.println(text);
    }
 
    /**»ñÈ¡¿ªÊ¼°´Å¥*/
    public JButtonModel getStart() {
        if(start==null) {
            start=new JButtonModel("¿ª Ê¼");
            start.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
 
                    if( !starandstop) {
                        starandstop=true;
                        star=true;
                        start.setText("  Ôݠͣ  ");
                        start.setBackground(Color.red);
                        if(datatypeis.equals("µ÷ÊÔÊý¾Ý")) {
                            textArea.append(DebugStarMessage.getDebug().toString());
                        }
                        String tagid=need_guo_lv_tag;
                        if(need_guo_lv_tag.equals("Ñ¡Ôñ±êÇ©")) {
                            tagid="ËùÓбêÇ©";
                        }
                        textArea.append("µ±Ç°Ñ¡ÔñÊý¾ÝÀàÐÍ:"+datatypeis+",Ñ¡Ôñ²é¿´µÄ±êǩΪ:"+tagid+",¿ªÊ¼²é¿´...\n");
                    }else {
                        starandstop=false;
                        star=false;
                        start.setText("  ¿ª Ê¼  ");
                        start.setBackground(Color.gray);                                                
                    }
 
 
                }
            });
 
        }
        return start;
    }
 
    public JButtonModel get_jtb_datafrom() {
        if(jtb_datafrom==null) {
            jtb_datafrom=new JButtonModel("²»ÏÔʾÊý¾ÝÀ´Ô´");
            jtb_datafrom.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    if(showfrom) {
                        showfrom=false;
                        jtb_datafrom.setText("  ÏÔʾÊý¾ÝÀ´Ô´  ");
                    }else {
                        showfrom=true;
                        jtb_datafrom.setText("  ²»ÏÔʾÊý¾ÝÀ´Ô´  ");
                    }
                }
            });
        }
        return jtb_datafrom;
    }
 
    /**»ñÈ¡±£´æ°´Å¥*/
    public JButtonModel getSave() {
        if(save==null) {
            save=new JButtonModel(buttonTitle.getSave());            
            save.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    star=false;
                    //ĬÈÏĿ¼
                    String defaultDirectory ="./savefile/";
                    //ĬÈÏÎļþÃû
                    String defaultFilename = GetNowTime.timestamp()+"±¨ÎÄ.txt";
 
                    JFileChooser chooser = new JFileChooser();
 
                    //ÉèÖÃĬÈϱ£´æÂ·¾¶
                    chooser.setCurrentDirectory(new File(defaultDirectory));
 
                    //ÉèÖÃĬÈϱ£´æÎļþÃû
                    chooser.setSelectedFile(new File(defaultFilename));
 
                    int option=chooser.showSaveDialog(getMb1());    //Èç¹ûÈ·¶¨Ôò·µ»Ø0£¬È¡Ïû»ò¹Ø±Õ·µ»Ø1                                
                    File file=new File(chooser.getSelectedFile().getPath());
 
                    //Èç¹ûÑ¡ÔñµÄÊÇÈ·¶¨Ö´ÐÐÈçϱ£´æ²Ù×÷
                    if(option==JFileChooser.APPROVE_OPTION) {//Ñ¡ÔñÈ·ÈÏ£¨yes¡¢ok£©ºó·µ»Ø¸ÃÖµ    
 
                        //»ñȡ·¾¶
                        try {
                            file.createNewFile();                            
                            FileWriter out=new FileWriter(file);//ÎļþÊä³ö×Ö·ûÁ÷
                            out.write(textArea.getText());
                            out.close();
                            ShowMessage.saveSuccess();
                        } catch (IOException e1) {                        
                            e1.printStackTrace();
                        }    
                    }
                }
 
            });
 
        }
        return save;
    }
 
 
    /**·¢ËͰ´Å¥*/
    public JButtonModel get_sendButton() {
        if(sendButton==null){
            sendButton=new JButtonModel("·¢ËÍ");
            sendButton.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    //                    TcpClientOneToMany.send(sendFile.getText().trim());                            
                    String ip=ipAdress.getText().trim();
                    String data=sendFile.getText().trim();
                    String ports=port.getText().trim();
 
 
 
                    if(ip.length()<8 || ports.length()<3 ) {
                        ShowMessage.zidingyi("ÊäÈëµÄµØÖ·»òÕß¶Ë¿ÚÓÐ´í£¡");
                        return;
                    }
 
                    if(asclljx) {
                        data=data.replaceAll(" ","");
                        if(data.length() % 2 !=0) {
                            data=data+"0";
                        }
 
                        byte[] byt=Tools.hexStrToBinaryStr(data);
                        int lenth=byt.length;
                        textArea.append(GetNowTime.now()+"·¢-->:  "+Tools.Bytes2HexString(byt)+"\n");
                        Udp_Receive.udp_serch(byt, lenth, ip, ports);
                        byt=null;
                    }else {        
                        int size=data.getBytes().length;
                        Udp_Receive.udp_serch(data.getBytes(),size, ip, ports);
                        textArea.append(GetNowTime.now()+"·¢-->:  "+data+"\n");
                    }
 
                }
            });
        }
        return sendButton;
 
    }
 
 
 
    public JComboBox<String> getBox() {
        if(box==null) {
            box=new JComboBox<String>();
            String[] neixing= {"TCP Server","TCP Client","UDP"};
            box.setFont(ChooseFont.getFont(12));//ÉèÖÃ×ÖÌå
            ComboBoxModel<String > coModel=new DefaultComboBoxModel<>(neixing);//ÏÂÀ­ÁбíÄ£ÐÍ            
            box.setModel(coModel);
            box.setBackground(Color.white);
            box.setSelectedIndex(2);
            box.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    if(box.getSelectedIndex()==0) {
                        xieyi_type="1";
                    }else if(box.getSelectedIndex()==1) {
                        xieyi_type="2";
                    }else if(box.getSelectedIndex()==2) {
                        xieyi_type="3";
                    }else if(box.getSelectedIndex()==3) {
                        xieyi_type="4";
                    }
 
                }
            });
 
        }
        return box;
    }
 
    public JButtonModel getClear() {
        if(clear==null) {
            clear=new JButtonModel("Çå¿Õ");
            clear.addActionListener(new ActionListener() {
                @Override
                public void actionPerformed(ActionEvent e) {
                    // TODO ×Ô¶¯Éú³ÉµÄ·½·¨´æ¸ù
                    textArea.setText("");                    
                    if(datatypeis.equals("µ÷ÊÔÊý¾Ý")) {
                        textArea.append(DebugStarMessage.getDebug().toString());
                    }
                }
            });
 
        }
        return clear;
    }
 
 
    public JComboBox<String> getTagbox() {
        if(tagbox==null) {    
            tagbox=new JComboBox<String>();
            tagbox.setFont(ChooseFont.getFont(12));//ÉèÖÃ×ÖÌå
            ComboBoxModel<String > coModel=new DefaultComboBoxModel<>(Tag_Dell.get_tag_str());//ÏÂÀ­ÁбíÄ£ÐÍ            
            tagbox.setModel(coModel);
            tagbox.setBackground(Color.white);
            tagbox.setEnabled(true);
            //ÏÂÀ­¿ò¿ÉÒÔÊäÈë
            tagbox.setEditable(true);
            tagbox.addActionListener(new ActionListener() {
                @Override
                public void actionPerformed(ActionEvent e) {
                    // TODO ×Ô¶¯Éú³ÉµÄ·½·¨´æ¸ù
                    need_guo_lv_tag=(String) tagbox.getSelectedItem();
 
                }
            });
        }
        return tagbox;
    }
 
 
    public static String getNeed_guo_lv_tag() {
        return need_guo_lv_tag;
    }
 
 
 
    /**»ñÈ¡Êý¾ÝÀàÐÍ*/
    public JComboBox<String> getDatatype() {
        if(datatype==null) {    
            datatype=new JComboBox<String>();
            datatype.setFont(ChooseFont.getFont(13));//ÉèÖÃ×ÖÌå
            datatype.setForeground(Color.red);
            String[] neir= {
                    "±¨ÎÄÊý¾Ý",
                    "ԭʼÊý¾Ý",
                    "URT¶Ë¿Ú",
                    "UDP¶Ë¿Ú",
                    "UDPת·¢",
                    "TCPת·¢",
                    "HTTPת·¢",
                    "×¢²á±¨ÎÄ",
                    "µ÷ÊÔÊý¾Ý",
                    "HEXÏÔʾ",
                    "Êý¾Ý¿âÊý",
                    "ÆøÌ屨ÎÄ",
                    "GNSS",                                        
                    "55AA0C",
                    "55AA01",
                    "55AA02",
                    "55AA03",
                    "55AA07",
                    "55AA09",
                    "55AA0A",
                    "55AA10",
                    "55AA12",
                    "55AA14",
                    "55AA0E",
                    "TOANC",
            "debug"};
            ComboBoxModel<String > coModel=new DefaultComboBoxModel<>(neir);//ÏÂÀ­ÁбíÄ£ÐÍ            
            datatype.setModel(coModel);
            datatype.setBackground(Color.white);
            datatype.setEnabled(true);
            //ÏÂÀ­¿ò¿ÉÒÔÊäÈë
            datatype.setEditable(true);
            datatype.addActionListener(new ActionListener() {
                @Override
                public void actionPerformed(ActionEvent e) {
                    // TODO ×Ô¶¯Éú³ÉµÄ·½·¨´æ¸ù
                    datatypeis=(String) datatype.getSelectedItem();
                    textArea.setText("");
                    if(openbaowen.isSelected()) {
                        Systems.alert_save_baowen(datatypeis, "1");
                    }
 
                }
            });
        }
        return datatype;
    }
 
    /**ÐèÒªÏÔʾµÄ±¨ÎÄÊý¾ÝÀàÐÍÊÇ*/
    public static String getDatatypeis() {
        return datatypeis;
    }
 
 
    public JCheckBoxModel getOpenbaowen() {
        if(openbaowen==null) {
            //¿ªÆô»òÕ߹رձ£´æ±¨Îĸ´Ñ¡¿ò
            openbaowen=new JCheckBoxModel("×Ô¶¯±£´æ",Systems.sys().getOpensave());
            openbaowen.setBackground(null);
            openbaowen.addActionListener(new ActionListener() {
                @Override
                public void actionPerformed(ActionEvent e) {
                    if(openbaowen.isSelected()) {
                        Systems.alert_save_baowen(datatypeis, "1");
                        Systems.sys().setOpensave("1");
                    }else {
                        Systems.alert_save_baowen(datatypeis, "0");
                        Systems.sys().setOpensave("0");
                    }
 
                }
            });
        }        
        return openbaowen;
    }
 
    public JCheckBoxModel getHexsend() {
        if(hexsend==null) {
            hexsend=new JCheckBoxModel("ASCLL½âÎö","0");
            hexsend.setBackground(null);
            hexsend.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    if(hexsend.isSelected()) {
                        asclljx=true;
                    }else {
                        asclljx=false;
                    }
 
                }
            });
 
        }
        return hexsend;
    }
 
    public JCheckBoxModel getHexins() {
        if(hexins==null) {
            hexins=new JCheckBoxModel("HEXÏÔʾ","0");
            hexins.setBackground(null);
            hexins.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    if(hexins.isSelected()) {
                        hexin=true;
                    }else {
                        hexin=false;
                    }
 
                }
            });
 
        }
        return hexins;
    }
 
    public static boolean isHexin() {
        return hexin;
    }
 
    public JButtonModel getJbt_urt() {
        if(jbt_urt==null) {
            jbt_urt=new JButtonModel("¿ªÆôURT½ÓÊÕ");
            jbt_urt.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    if(urt) {
                        urt=false;
                        jbt_urt.setText("  ÔÝÍ£URT½ÓÊÕ  ");
                    }else {
                        urt=true;
                        jbt_urt.setText("  ¿ªÆôURT½ÓÊÕ  ");
                    }
 
                }
            });
        }
        return jbt_urt;
    }
 
    public static boolean isUrt() {
        return urt;
    }
 
    public static boolean isShowfrom() {
        return showfrom;
    }
 
    public static void setShowfrom(boolean showfrom) {
        TcpIpManage.showfrom = showfrom;
    }
 
    public static boolean isAsclljx() {
        return asclljx;
    }
 
 
}