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
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
package Frame;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Container;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.Toolkit;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.event.WindowEvent;
import java.awt.event.WindowListener;
import java.util.Iterator;
import java.util.Vector;
import javax.swing.Box;
import javax.swing.ComboBoxModel;
import javax.swing.DefaultComboBoxModel;
import javax.swing.ImageIcon;
import javax.swing.JComboBox;
import javax.swing.JDialog;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.JTextArea;
import javax.swing.JTextField;
import javax.swing.event.InternalFrameEvent;
import javax.swing.event.InternalFrameListener;
import javax.swing.table.DefaultTableModel;
import BaoWen.Urt_7000_port;
import ColorAndFont.ChooseFont;
import ColorAndFont.NothJPanel;
import ColorAndFont.UIColor;
import Judge.JugeNumber;
import PbuliClass.JButtonModel;
import PbuliClass.JCheckBoxModel;
import PbuliClass.JlableModel;
import PbuliClass.ShowMessage;
import PbuliClass.Systems;
import PbuliClass.greateTables;
import PbuliClass.jinternalFrame;
import home.ChuShiHua;
import person.Person;
import person.person_Dell;
import tbDataModel.Tb_gps;
import urt.Control_urt;
import urt.Dell_gps;
import urt.lowgpscontral;
public class UtrSet extends jinternalFrame {
    /**
     * 
     */
    private static final long serialVersionUID = 1L;
    NothJPanel northPanel=null;//Ãæ°å
    NothJPanel northPanel1=null;//Ãæ°å
    JButtonModel Shuaxing=null;//Ë¢ÐÂ
    JButtonModel Send=null;//·¢ËÍ
    JButtonModel Jbt_moreset=null;//·äÃù
    JButtonModel Jbt_all=null;//·¢ËÍ
    JButtonModel Jbt_updata=null;//Éý¼¶
    JButtonModel Jbt_serch=null;//ËÑË÷
    JButtonModel Jbt_openclose_uwb=null;//¿ØÖÆUWB¿ª¹Ø¹¦ÄÜ
    JScrollPane gd=null;//¹ö¶¯Ãæ°å
    JTable table=null;//ÉêÃ÷±í¸ñ
    JTextField  sendFile=null;//·¢ËÍÎı¾¿ò    
    JTextField  endFile=null;//·¢ËÍÎı¾¿ò    
 
    //JlableModel  Jl_bb=new JlableModel("±êÇ©Çø¼ä:");//²ã
    JlableModel  Jl_bb=new JlableModel("Éý¼¶°æ±¾:");//ÒªÉý¼¶µÄ¹Ì¼þ°æ±¾  2023.07.21 zsh
    JTextField  Jt_tagids=null;//·¢ËÍÎı¾¿ò
    JTextField  Jt_banben=null;//·¢ËÍÎı¾¿ò
    JTextField  Jt_serch=null;
 
    DefaultTableModel tableModel=null;//ÉùÃ÷±í¸ñÄ£ÐÍ    
    more_set_dialog moredialog=null;
    boolean all=false;
    JCheckBoxModel Jc_set=null;
    JCheckBoxModel Jc_up=null;    
    JButtonModel jbt_clear=null;
 
    //¿ªÆô×Ô¶¯Éý¼¶Ä£Ê½
    static boolean updataurt=false;
    static int tagid1=0;
    static int tagid2=0;
    static String version="0";
    static String uptex="";
    static boolean mosetisopen=false;
 
    static String versionname="";
 
    public UtrSet() {//¹¹Ôì·½·¨
        String title="URTÅäÖÃ";
        if(Systems.sys().getLanguage().equals("English")) {
            title="URT SET";
        }
        this.setTitle(title);
        Container rq=getContentPane();//»ñÈ¡ÈÝÆ÷
        rq.setLayout(new BorderLayout());
        rq.setBackground(Color.white);
        rq.add(getGd(),BorderLayout.CENTER);
        rq.add(getNorthPanel(),BorderLayout.SOUTH);
        rq.add(getNorthPanel1(),BorderLayout.NORTH);
        this.setFrameIcon(new ImageIcon("image/icon/gpsm.png"));//ÉèÖô°Ìåͼ±ê
        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) {    
                updataurt=false;
            }
 
            public void internalFrameActivated(InternalFrameEvent e) {
 
            }
        });
        this.setBounds(175, 0, 1000,500);
 
    }
 
 
    public NothJPanel getNorthPanel() {
        if(northPanel==null) {
            northPanel=new NothJPanel();
            Box topicBox = Box.createHorizontalBox();// ´´½¨Ò»¸öˮƽÏäÈÝÆ÷
            topicBox.add(Box.createHorizontalStrut(20));// Ìí¼ÓÒ»¸ö3ÏñËØ¿íµÄˮƽ֧Öù
            topicBox.add(getSendFile() );//Ìí¼ÓËÑË÷Îı¾¿ò
            topicBox.add(Box.createHorizontalStrut(5));// Ìí¼ÓÒ»¸ö3ÏñËØ¿íµÄˮƽ֧Öù
            topicBox.add(getEndFile());
            topicBox.add(Box.createHorizontalStrut(10));
            topicBox.add(getSend());//Ìí¼ÓËÑË÷Îı¾¿ò            
            northPanel.add(topicBox);
            northPanel.setBackground(UIColor.getNorth_color());
 
        }
        return northPanel;
    }
 
 
    public JButtonModel getShuaxing() {
        if(Shuaxing==null) {
            Shuaxing=new JButtonModel("Ë¢ÐÂ");
            Shuaxing.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    updateTable(Dell_gps.getGps_vector());
                }
            });
        }
        return Shuaxing;
    }
 
    /**ˢбí¸ñ·½·¨*/
    public void updateTable(Vector<Tb_gps> a) {    
        if(tableModel !=null) {
            tableModel.getDataVector().clear();
            getRowData(a);
            gd.validate();
        }
    }
 
    public JButtonModel getSend() {
        if(Send==null) {
            Send=new JButtonModel("·¢ËÍ");
            Send.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    if(all) {
                        int selectedRows=table.getRowCount();//±»Ñ¡ÖÐÐеÄË÷Òý¼¯ºÏ
                        if(selectedRows !=0) {
                            for(int i=0;i<selectedRows;i++){
                                String ID=(String)table.getValueAt(i,0);
                                String port=(String)table.getValueAt(i,3);
                                String ip=(String)table.getValueAt(i, 2);
                                if(Jc_up.isSelected() && !Jc_set.isSelected()) {
                                    sendFile.setText("$update,"+ID+",");
                                }
 
                                if(!Jc_up.isSelected() && Jc_set.isSelected()) {
                                    sendFile.setText("$config,"+ID+",");
                                }
 
 
                                String data=sendFile.getText().trim()+endFile.getText().trim();
                                int size=data.getBytes().length;
                                if(port !=null) {
                                    if(size !=0 && JugeNumber.isDigit(port)) {
                                        Urt_7000_port.udp_out(data.getBytes(),size, ip, port,ID,data);
                                        ShowMessage.zidingyi(ip+":"+port+"ÐÅÏ¢ÒÑ·¢ËÍ...");
                                    }
                                }
                            }
                        }else {
                            ShowMessage.zidingyi("µ±Ç°ÐÐÊýΪ0...");    
                            return;
                        }
                    }else {
                        int[] selectedRows=table.getSelectedRows();//±»Ñ¡ÖÐÐеÄË÷Òý¼¯ºÏ
                        if(selectedRows.length !=0) {
                            for(int i=0;i<selectedRows.length;i++){
                                String ID=(String)table.getValueAt(selectedRows[i],0);
                                String port=(String)table.getValueAt(selectedRows[i], 3);
                                String ip=(String)table.getValueAt(selectedRows[i], 2);
 
                                if(Jc_up.isSelected() && !Jc_set.isSelected()) {
                                    sendFile.setText("$update,"+ID+",");
                                }
 
                                if(!Jc_up.isSelected() && Jc_set.isSelected()) {
                                    sendFile.setText("$config,"+ID+",");
                                }                            
 
                                String data=sendFile.getText().trim()+endFile.getText().trim();
                                int size=data.getBytes().length;
                                if(port !=null) {
                                    if(size !=0 && JugeNumber.isDigit(port)) {
                                        Urt_7000_port.udp_out(data.getBytes(),size, ip, port,ID,data);
                                        ShowMessage.zidingyi(ip+":"+port+"ÐÅÏ¢ÒÑ·¢ËÍ...");    
                                    }
                                }
                            }
                        }else {
                            ShowMessage.zidingyi("ÇëÑ¡ÖÐÐèÒª´¦ÀíµÄÐÐ...");    
                            return;
                        }
 
                    }
 
                }
            });
        }
        return Send;
    }
 
 
    @SuppressWarnings({ "serial", "rawtypes" })
    public JTable getTable() {
        if(table==null) {
            String name1="±àºÅ";
            String name2="°æ±¾";
            String name3="µØÖ·";
            String name4="¶Ë¿Ú";
            String name5="ʱ¼ä";
 
            String[] columnNames= {name1,name2,name3,name4,name5};//±í¸ñÁÐÃû
            //Ìí¼Ó±í¸ñÁÐÏòÁ¿
            Vector<String> columnName=new Vector<>();
            for(int i=0;i<columnNames.length;i++){
                columnName.add(columnNames[i]);            
            }
            Vector rowData=new Vector();
            greateTables tables=new greateTables();
            tableModel=new DefaultTableModel(rowData, columnName){ //  ÊµÏÖÈÃÕû¸ö±í¸ñ²»²»ÔÊÐí±»±à¼­ 
                public boolean isCellEditable(int row,int column){  
                    return false;  
                }  
            };
            table=tables.getTable(tableModel);
            getRowData(Dell_gps.getGps_vector());
            //¸ø±í¸ñÌí¼Ó¼àÌýʼþ
            //¸øtable¼ÓÉÏÒ»¸öÊó±êʼþ¼àÌýÆ÷¶ÔÏó
            table.addMouseListener(new MouseListener() {
                public void mouseReleased(MouseEvent e) {
                    // TODO ×Ô¶¯Éú³ÉµÄ·½·¨´æ¸ù
                    int rows=table.getSelectedRowCount();
                    if(rows>1) {
                        sendFile.setText("ÒÑÑ¡ÖÐ"+rows+"ÐÐ");
                    }
                }
 
                @Override
                public void mousePressed(MouseEvent e) {
                    // TODO ×Ô¶¯Éú³ÉµÄ·½·¨´æ¸ù
 
                }
 
                @Override
                public void mouseExited(MouseEvent e) {
                    // TODO ×Ô¶¯Éú³ÉµÄ·½·¨´æ¸ù
 
                }
 
                @Override
                public void mouseEntered(MouseEvent e) {
                    // TODO ×Ô¶¯Éú³ÉµÄ·½·¨´æ¸ù
 
                }
 
                @Override
                public void mouseClicked(MouseEvent e) {
 
                    int row=table.getSelectedRow();
                    int rows=table.getSelectedRowCount();
                    if(row<0) {
                        ShowMessage.zidingyi("µ±Ç°Ñ¡ÖÐÐÐΪ£º"+row);
                        return;
                    }
 
                    if(rows ==1) {
                        String ID=(String) table.getValueAt(row,0);
                        if(Jc_up.isSelected()) {
                            sendFile.setText("$update,"+ID+",");
                        }else {
                            sendFile.setText("$config,"+ID+",");
                        }    
                    }else {
                        ShowMessage.zidingyi("µ±Ç°Ñ¡ÖжàÐÐ");
                    }
 
 
                }
            }); 
 
        }
        return table;
    }
 
    public JScrollPane getGd() {
        gd=new JScrollPane(getTable());
        gd.getViewport().setBackground(UIColor.getNorth_color());
        return gd;
    }
 
 
    /**Ìí¼Ó±í¸ñÐÐÏòÁ¿Êý¾Ý·½·¨*/ 
    @SuppressWarnings({ "unchecked", "rawtypes" })
    public void getRowData(Vector<Tb_gps> list ) {
        Iterator<Tb_gps> iterator = list.iterator();//´´½¨µü´úÆ÷        
        while (iterator.hasNext()) {//µü´úÆ÷´æÔÚÔªËØ            
            Tb_gps tag = iterator.next();//½«µü´úÆ÷ÀïÃæµÄÔªËØ¸øµ½info¼¯ºÏ
            Vector row = new Vector();    
            //"ÐòºÅ","É豸±àºÅ","γ¶È","¾­¶È","GPS״̬","ÎÀÐÇÊý","º£°Î¸ß","²î·ÖÕ¾ID","µçÁ¿","¸üÐÂʱ¼ä"
            row.add(tag.getTagid());
            row.add(tag.getVersion());
            row.add(tag.getIp());
            row.add(tag.getPort());
            row.add(tag.getAddtime());
            tableModel.addRow(row);// Ïò±í¸ñ¶ÔÏóÌí¼ÓÐÐÊý¾Ý
        }    
 
    }
 
 
    public JTextField getSendFile() {
        if(sendFile==null) {
            sendFile=new JTextField(10);
            sendFile.setFont(ChooseFont.getFont(14));
        }
        return sendFile;
    }
 
 
    public JButtonModel getJbt_all() {
        if(Jbt_all==null) {
            Jbt_all=new JButtonModel("È«²¿Ñ¡ÖÐ");
            Jbt_all.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    if(all) {
                        Jbt_all.setBackground(UIColor.getButton_color());
                        all=false;
                    }else {
                        all=true;
                        Jbt_all.setBackground(Color.gray);
                        int a=table.getRowCount();
                        sendFile.setText("Ñ¡ÖÐËùÓÐ"+a+"ÐÐ");
                    }
 
                }
            });
        }
        return Jbt_all;
    }
 
 
    public NothJPanel getNorthPanel1() {
        if(northPanel1==null) {
            northPanel1=new NothJPanel();
            Box topicBox = Box.createHorizontalBox();// ´´½¨Ò»¸öˮƽÏäÈÝÆ÷
 
            topicBox.add(getJt_serch());
            topicBox.add(Box.createHorizontalStrut(3));
            topicBox.add(getJbt_serch());
            topicBox.add(Box.createHorizontalStrut(10));
            topicBox.add(getJc_set());
            topicBox.add(Box.createHorizontalStrut(10));
            topicBox.add(getJc_up());                
            topicBox.add(Box.createHorizontalStrut(10));
            topicBox.add(Jl_bb);
            topicBox.add(Box.createHorizontalStrut(4));
            topicBox.add(getJt_tagids());
            topicBox.add(Box.createHorizontalStrut(30));
            topicBox.add(getJbt_updata());
            topicBox.add(Box.createHorizontalStrut(10));
            topicBox.add(getJbt_all());
            topicBox.add(Box.createHorizontalStrut(10));
            topicBox.add(getShuaxing());//Ìí¼ÓËÑË÷Îı¾¿ò
            topicBox.add(Box.createHorizontalStrut(10));            
            topicBox.add(getJbt_moreset());
            topicBox.add(Box.createHorizontalStrut(10));
            northPanel1.add(topicBox);
            northPanel1.setBackground(UIColor.getNorth_color());
        }
        return northPanel1;
    }
 
 
    public JCheckBoxModel getJc_set() {
        if(Jc_set==null) {
            Jc_set=new JCheckBoxModel("²ÎÊýÉèÖÃ","0");
            Jc_set.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    if(Jc_set.isSelected() && !Jc_up.isSelected()) {
                        endFile.setText("GPSƵÂÊ,·þÎñÆ÷µØÖ·,¶Ë¿Ú");
                    }else {
                        endFile.setText("");
                    }
                }
            });
        }
        return Jc_set;
    }
 
 
    public JCheckBoxModel getJc_up() {
        if(Jc_up==null) {
            Jc_up=new JCheckBoxModel("¹Ì¼þÉý¼¶","0");
            Jc_up.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    if(Jc_up.isSelected() && !Jc_set.isSelected()) {
                        endFile.setText("http://39.106.210.13:8080/hfs/Ìæ»»ÐèÒªµÄ¹Ì¼þ,V2021051001");
                    }else {
                        endFile.setText("");
                    }
                }
            });
        }
        return Jc_up;
    }
 
 
    public JTextField getEndFile() {
        if(endFile==null) {
            endFile=new JTextField(50);
            endFile.setFont(ChooseFont.getFont(14));
        }
        return endFile;
    }
 
 
    public JButtonModel getJbt_moreset() {
        if(Jbt_moreset==null) {
            Jbt_moreset=new JButtonModel("ÉèÖÃ");
            Jbt_moreset.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    if(moredialog==null) {
                        moredialog=new more_set_dialog("±êÇ©ÆäËûÉèÖÃ");    
                        ChuShiHua.setSucc(1);
                    }        
 
                }
            });
        }
        return Jbt_moreset;
    }
 
 
    /**¸ü¶àÉèÖöԻ°¿ò*/
    class more_set_dialog extends JDialog implements WindowListener{
 
        /**
         * 
         */
        private static final long serialVersionUID = 1L;
 
 
        JPanel mb=null;//ÉêÃ÷Ò»¸öÃæ°å
        JlableModel  jl_choosetag=new JlableModel ("Ñ¡Ôñ±êÇ©:");
        JlableModel  jl_fengming=new JlableModel ("ʱ¼äÃë:");
        JlableModel  jl_pinglv=new JlableModel ("ÐÞ¸ÄÆµÂÊ:");
        JlableModel  jl_dingwei=new JlableModel ("Á¬Ðø¶¨Î»:");
        JlableModel  jl_version=new JlableModel ("»ñÈ¡°æ±¾:");
        JlableModel  jl_fond=new JlableModel ("ѰÕÒÖÕ¶Ë:");
        JlableModel  jl_uwbenable=new JlableModel ("¿ª¹ØUWB:");
 
 
        JTextField jf_fengming=new JTextField("10");
        JTextField jf_pinglv=new JTextField("60");
        JTextField jf_dingwei=new JTextField("180");
        JTextField jf_version=new JTextField("");
        JTextField jf_fond=new JTextField("60");
 
        JButtonModel jbt_fengming=null;//·äÃù
        JButtonModel jbt_pinglv=null;//ÐÞ¸ÄÆµÂÊ
        JButtonModel jbt_dingwei=null;//Á¬Ðø¶¨Î»
        JButtonModel jbt_version=null;//»ñÈ¡°æ±¾
        JButtonModel jbt_fond=null;//ѰÕÒÉ豸
        JScrollPane gd2=null;
        JTextArea textArea;
 
        JComboBox<String> tagAll=null;//ËùÓбêÇ©µÄ¼¯ºÏ
        JComboBox<String> jcom_uwbenabe=null;//¿ª¹Ø±êÇ©¼¯ºÏ
        String tagchoose="ËùÓбêÇ©";
        
 
 
        /**»ñÈ¡¶Ô»°¿ò·½·¨*/
        public more_set_dialog(String title) {            
            super();    
            //this.setModal(true);//´°Ìå×èÈû
            this.setAlwaysOnTop(true);//×ÜÊÇÖö¥
            this.setTitle(title);
            Toolkit toolkit = getToolkit();// »ñµÃ´°Ì幤¾ß°ü
            Dimension screenSize = toolkit.getScreenSize();// »ñÈ¡ÆÁÄ»´óС
            int width = (int) (screenSize.width);// ¼ÆËã´°Ìåпí¶È
            int height = (int) (screenSize.height);// ¼ÆËã´°Ìåпí¶È
            int w=780;
            int h=450;
            int x0=(width-w)/2;//´°Ìåx0×ø±ê
            int y0=(height-h)/2;//´°Ìåy0×ø±ê
            Container rq=getContentPane();        
            rq.add(getMb());
            this.setBounds(x0, y0,w ,h);
            this.setVisible(true);
            this.addWindowListener((WindowListener) this);
            this.setIconImage(new ImageIcon("image/icon/tagicon.png").getImage());
            mosetisopen=true;
 
        }
 
        /**¹Ø±Õ¶Ô»°¿ò·½·¨*/
        public void closeTagDialog() {
            this.dispose();
            moredialog=null;
 
        }
        public  JTextArea get_text_area() {
            if(textArea==null) {
                textArea=new JTextArea(10,10);
                textArea.setBackground(UIColor.getNorth_color());
                textArea.setForeground(UIColor.getTable_font());
                textArea.setFont(ChooseFont.getFont(13));
            }
            return textArea;
        }
 
        /**»ñÈ¡¹ö¶¯Ãæ°å*/
        public JScrollPane getGd2() {
            if(gd2==null) {
                gd2=new JScrollPane(get_text_area());
            }
            return gd2;
        }
 
 
        public JButtonModel getJbt_clear() {
            if(jbt_clear==null) {
                jbt_clear=new JButtonModel("Çå¿Õ");
                jbt_clear.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent e) {
                        textArea.setText("");
                    }
                });
            }
            return jbt_clear;
        }
 
 
        /**»ñÈ¡Ãæ°å*/
        public JPanel getMb() {
 
            if(mb==null){
                mb=new JPanel();
                mb.setLayout(null);
                mb.add(jl_choosetag);
                mb.add(getTagAll());
                mb.add(jl_fengming);
                mb.add(jf_fengming);
                mb.add(getJbt_fengming());
                mb.add(getJbt_pinglv());
                mb.add(jl_pinglv);
                mb.add(jf_pinglv);
                mb.add(jl_dingwei);
                mb.add(jf_dingwei);
                mb.add(getJbt_dingwei());
                mb.add(jl_version);
                mb.add(jf_version);
                mb.add(getJbt_version());
                mb.add(getGd2());
                mb.add(getJbt_clear());
                mb.add(jl_fond);
                mb.add(jf_fond);
                mb.add(getJbt_fond());
                mb.add(getjcom_uwbenabe());
                mb.add(getJbt_openclose_uwb());
                mb.add(jl_uwbenable);
 
                int x=30;
                int y=20;
                int h=25;
                int g=20;//ÊúÏò¼ä¸ô
 
                //Ñ¡ÖбêÇ©
                jl_choosetag.setBounds(x, y, 70,h);
                getTagAll().setBounds(x+70,y, 250,h);
 
                //¿ªÆôÐÝÃß
                int y2=y+1*(h+g);
                jl_fengming.setBounds(x,y2,70,h);
                jf_fengming.setBounds(x+70,y2,130,h);
                getJbt_fengming().setBounds(x+210,y2,110,h);
 
                //ÐÞ¸ÄÆµÂÊ
                int y3=y+2*(h+g);
                jl_pinglv.setBounds(x,y3,70,h);
                jf_pinglv.setBounds(x+70,y3,130,h);
                jbt_pinglv.setBounds(x+210,y3,110,h);
 
                //Á¬Ðø¶¨Î»
                int y4=y+3*(h+g);
                jl_dingwei.setBounds(x,y4,70,h);
                jf_dingwei.setBounds(x+70,y4,130,h);
                jbt_dingwei.setBounds(x+210,y4,110,h);
 
                //»ñÈ¡°æ±¾ºÅ
                int y5=y+4*(h+g);
                jl_version.setBounds(x,y5,70,h);
                jf_version.setBounds(x+70,y5,130,h);
                jbt_version.setBounds(x+210,y5,110,h);
 
                //ѰÕÒÉ豸
                int y6=y+5*(h+g);
                jl_fond.setBounds(x,y6,70,h);
                jf_fond.setBounds(x+70,y6,130,h);
                jbt_fond.setBounds(x+210,y6,110,h);
 
                //¿ª¹ØUWB
                int y7=y+6*(h+g);
                jl_uwbenable.setBounds(x,y7,70,h);
                jcom_uwbenabe.setBounds(x+70,y7,130,h);
                Jbt_openclose_uwb.setBounds(x+210,y7,110,h);
 
                //Îı¾ÏÔʾ¿ò                
                gd2.setBounds(x+340,y,350,330);
                jbt_clear.setBounds(x+340,y+340,350,h);
 
            }
 
            return mb;
        }
        //¿ª¹ØUWBÏÂÀ­¿ò
        public JComboBox<String> getjcom_uwbenabe() { 
            if(jcom_uwbenabe==null) {
                jcom_uwbenabe=new JComboBox<String>() ;
                jcom_uwbenabe.setFont(new Font("΢ÈíÑźÚ", Font.PLAIN, 12));//ÉèÖÃ×ÖÌå
                String[] a1= {"¿ªÆô","¹Ø±Õ"};
                ComboBoxModel<String > coModel=new DefaultComboBoxModel<>(a1);//ÏÂÀ­ÁбíÄ£ÐÍ            
                jcom_uwbenabe.setModel(coModel);
                //ÏÂÀ­¿ò¿ÉÒÔÊäÈë
                jcom_uwbenabe.setEditable(true);
            }
            return jcom_uwbenabe;
        }
 
        //Ñ¡Ôñ±êÇ©ÏÂÀ­¿ò
        public JComboBox<String> getTagAll() { 
            if(tagAll==null) {
                tagAll=new JComboBox<String>() ;
                tagAll.setFont(new Font("΢ÈíÑźÚ", Font.PLAIN, 12));//ÉèÖÃ×ÖÌå
                ComboBoxModel<String > coModel=new DefaultComboBoxModel<>(Dell_gps.gpstagids());//ÏÂÀ­ÁбíÄ£ÐÍ            
                tagAll.setModel(coModel);
                //ÏÂÀ­¿ò¿ÉÒÔÊäÈë
                tagAll.setEditable(true);
                tagAll.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent e) {
                        if(tagAll.getSelectedIndex() ==0) {
                            tagchoose="ËùÓÐÖÕ¶Ë";
                        }else {                                
                            tagchoose=(String) tagAll.getSelectedItem();
                            Tb_gps gps=Dell_gps.get_tb_gps(tagchoose);
                            jf_version.setText(gps.getVersion());
                        }
                    }                    
                });
            }
            return tagAll;
        }
 
        //¿ØÖÆUWB¿ª¹Ø
        public JButtonModel getJbt_openclose_uwb() {
            if(Jbt_openclose_uwb==null) {
                Jbt_openclose_uwb=new JButtonModel("¿ª¹ØUWB");
                Jbt_openclose_uwb.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent e) {
                        String uwbendable=(String) jcom_uwbenabe.getSelectedItem();
                        String enable="1";
                        if(uwbendable.equals("¹Ø±Õ")) {
                            enable="0";
                        }
 
                        if(tagchoose.equals("ËùÓÐÖÕ¶Ë")) {                            
                            Control_urt.all_open_or_close_uwb(enable);                            
                            textArea.setText("ËùÓÐÉ豸UWB¿ª¹ØÐÅÏ¢ÒÑÏ·¢:"+enable);
                        }else {                            
                            Tb_gps tg=Dell_gps.get_tb_gps(tagchoose);
                            if(tg !=null) {
                                String port=tg.getPort();
                                if(port==null) {
                                    textArea.setText(tg.getTagid()+"ÖÕ¶ËδÉÏÏß");
                                    return;
                                }else{
                                    String tagid=tg.getTagid();
                                    Person person=person_Dell.get_Person(tagid);
                                    Control_urt.open_or_close_uwb(person,tagid, enable);    
                                    textArea.setText(tagid+"¿ª¹ØUWBÖ¸ÁîÒÑÏ·¢:"+enable);                                    
                                }
                            }
                        }
                    }
                });
            }
            return Jbt_openclose_uwb;
        }
 
 
        public JButtonModel getJbt_fengming() {
            if(jbt_fengming==null) {
                jbt_fengming=new JButtonModel("·äÃù¿ØÖÆ");
                jbt_fengming.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent e) {
                        String time=jf_fengming.getText().trim();
                        if(time.equals("")) {
                            textArea.setText("·äÃùʱ¼ä²»ÄÜΪ¿Õ");
                            return;
                        }
 
                        if(tagchoose.equals("ËùÓÐÖÕ¶Ë")) {                            
                            Control_urt.all_beeiper(time);
                            textArea.setText("ËùÓÐÉ豸·äÃù¿ØÖÆÐÅÏ¢ÒÑÏ·¢:"+time);
                        }else {                            
                            Tb_gps tg=Dell_gps.get_tb_gps(tagchoose);
                            if(tg !=null) {
                                String port=tg.getPort();
                                if(port==null) {
                                    textArea.setText(tg.getTagid()+"ÖÕ¶ËδÉÏÏß");
                                    return;
                                }else{
                                    String tagid=tg.getTagid();
                                    String ip=tg.getIp();
                                    Control_urt.beeper(ip, port,tagid, time,1);
                                    textArea.setText(tagid+"·äÃù¿ØÖÆÐÅÏ¢ÒÑÏ·¢:"+time);                                    
                                }
                            }
                        }
                    }
                });
            }
            return jbt_fengming;
        }
 
        /**ÐÞ¸ÄÆµÂʰ´Å¥*/
        public JButtonModel getJbt_pinglv() {
            if(jbt_pinglv==null) {
                jbt_pinglv=new JButtonModel("ÐÞ¸ÄÆµÂÊ");
                jbt_pinglv.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent e) {
                        String tagid=tagchoose;
                        if(tagid.length()>6) {
                            String hz=jf_pinglv.getText().trim();
                            if(tagchoose.equals("ËùÓÐÖÕ¶Ë")) {
                                lowgpscontral.all_hz(hz);
                                textArea.setText(tagid+"ÐÞ¸ÄÆµÂÊÖ¸ÁîÒÑÏ·¢:"+hz);
                            }else {                                
                                lowgpscontral.alert_hz(tagid, hz);
                                textArea.setText(tagid+"ÐÞ¸ÄÆµÂÊÖ¸ÁîÒÑÏ·¢:"+hz);
                            }
                        }
                    }
                });
            }
            return jbt_pinglv;
        }
 
        /**Á¬Ðø¶¨Î»°´¼ü*/
        public JButtonModel getJbt_dingwei() {
            if(jbt_dingwei==null) {
                jbt_dingwei=new JButtonModel("¿ªÊ¼¶¨Î»");
                jbt_dingwei.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent e) {
                        String tagid=tagchoose;
                        if(tagid.length()>6) {
                            lowgpscontral.lianxu_dingwei(tagid);
                            textArea.setText(tagid+"¿ªÊ¼¶¨Î»Ö¸ÁîÒÑÏ·¢");
                        }
                    }
                });
            }
            return jbt_dingwei;
        }
 
        /**»ñÈ¡°æ±¾ºÅ*/
        public JButtonModel getJbt_version() {
            if(jbt_version==null) {
                jbt_version=new JButtonModel("»ñÈ¡°æ±¾ºÅ");
                jbt_version.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent e) {
                        String tagid=tagchoose;
                        if(tagid.length()>6) {
                            lowgpscontral.serch_version(tagid);
                            textArea.setText(tagid+"»ñÈ¡°æ±¾ºÅÖ¸ÁîÒÑÏ·¢");
                        }                        
                    }
                });
            }
            return jbt_version;
        }
 
        /**ѰÕÒÉ豸*/
        public JButtonModel getJbt_fond() {
            if(jbt_fond==null) {
                jbt_fond=new JButtonModel("ѰÕÒÉ豸");
                jbt_fond.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent e) {
                        String tagid=tagchoose;
                        if(tagid.length()>6) {
                            lowgpscontral.fond_gps(tagid);
                            textArea.setText(tagid+"ѰÕÒÉ豸ָÁîÒÑÏ·¢");
                        }                        
                    }
                });
            }
            return jbt_fond;
        }
 
        @Override
        public void windowOpened(WindowEvent e) {
            // TODO ×Ô¶¯Éú³ÉµÄ·½·¨´æ¸ù
 
        }
 
        @Override
        public void windowClosing(WindowEvent e) {
            // TODO ×Ô¶¯Éú³ÉµÄ·½·¨´æ¸ù
            moredialog=null;
            mosetisopen=false;
 
        }
 
        @Override
        public void windowClosed(WindowEvent e) {
 
        }
 
        @Override
        public void windowIconified(WindowEvent e) {
            // TODO ×Ô¶¯Éú³ÉµÄ·½·¨´æ¸ù
 
        }
 
        @Override
        public void windowDeiconified(WindowEvent e) {
            // TODO ×Ô¶¯Éú³ÉµÄ·½·¨´æ¸ù
 
        }
 
        @Override
        public void windowActivated(WindowEvent e) {
            // TODO ×Ô¶¯Éú³ÉµÄ·½·¨´æ¸ù
 
        }
 
        @Override
        public void windowDeactivated(WindowEvent e) {
            // TODO ×Ô¶¯Éú³ÉµÄ·½·¨´æ¸ù
 
        }
 
    }
 
 
    //ÐÞ¸Ä×Ô¶¯Éý¼¶Âß¼­  2023.07.21 zsh
    public JButtonModel getJbt_updata() {
        if(Jbt_updata==null) {
            Jbt_updata=new JButtonModel("×Ô¶¯Éý¼¶");
            Jbt_updata.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    if(updataurt) {                        
                        updataurt=false;
                        Jbt_updata.setText("  ×Ô¶¯Éý¼¶  ");
                        Jbt_updata.setBackground(UIColor.getButton_color());//Éý¼¶Ä£Ê½Ï°´Å¥ÑÕɫΪÂÌÉ« 2023.07.21 zsh
                    }else {                        
                        String tagids=Jt_tagids.getText().trim();
                        if(tagids.equals("")) {
                            ShowMessage.zidingyi(tagids+"ÊäÈëµÄ°æ±¾ÐÅÏ¢´íÎó");    //2023.07.21 zsh
                            return;
                        }
                        if(tagids.equals("°æ±¾ºÅ;¹Ì¼þÃû³Æ")) {
                            ShowMessage.zidingyi(tagids+"ÊäÈëµÄ°æ±¾ÐÅÏ¢´íÎó");    //2023.07.21 zsh
                            return;
                        }
                        String[] split = tagids.split(";");
                        if (split.length<2){
                            ShowMessage.zidingyi(tagids+":ÊäÈë¸ñʽÓÐÎó,ÕýÈ·¸ñʽ: ÒªÉý¼¶µÄ°æ±¾ºÅ;ÒªÉý¼¶µÄ¹Ì¼þÃû³Æ");
                            return;
                        }
                        version=split[0];//ÒªÉý¼¶µÄ°æ±¾ºÅ
                        versionname=split[1];//ÒªÉý¼¶µÄ¹Ì¼þÃû³Æ
                        updataurt=true;
                        Jbt_updata.setText("  ¹Ø±ÕÉý¼¶  ");
                        Jbt_updata.setBackground(Color.red);
 
                    }
 
                }
            });
 
        }
        return Jbt_updata;
    }
 
 
    public JTextField getJt_tagids() {
        if(Jt_tagids==null) {
            Jt_tagids=new JTextField(20);
            Jt_tagids.setText("°æ±¾ºÅ;¹Ì¼þÃû³Æ");
        }
        return Jt_tagids;
    }
 
 
    public static boolean isUpdataurt() {        
        return updataurt;
    }
 
 
    public static int getTagid1() {
        return tagid1;
    }
 
 
    public static int getTagid2() {
        return tagid2;
    }
 
 
 
 
 
    public static String getVersion() {
        return version;
    }
 
 
    public JButtonModel getJbt_serch() {
        if(Jbt_serch==null) {
            Jbt_serch=new JButtonModel("ËÑË÷");
            Jbt_serch.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    String tagid=Jt_serch.getText().trim();    
                    if(tagid.length()<2) {
                        ShowMessage.zidingyi("ÇëÊäÈëÕýÈ·µÄÉ豸ID");
                        return;
                    }
                    updateTable(Dell_gps.serch(tagid));
                }
            });
        }
        return Jbt_serch;
    }
 
 
 
    public JTextField getJt_serch() {
        if(Jt_serch==null) {
            Jt_serch=new JTextField(6);
        }
        return Jt_serch;
    }
 
 
    public static boolean isMosetisopen() {
        return mosetisopen;
    }
 
 
    public static void setMosetisoen(boolean mosetisoen) {
        UtrSet.mosetisopen = mosetisoen;
    }
 
 
    public static String getVersionname() {
        return versionname;
    }
 
 
}