mxpopstar
2022-05-03 e75ef5f04f61aa5fbd89fd5c413dcee1819b7a91
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
package com.dev.fbs9600_zdhj;
 
import java.awt.Color;
import java.awt.Font;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.Date;
 
import javax.swing.BoxLayout;
import javax.swing.DefaultComboBoxModel;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JTextField;
import javax.swing.UIManager;
import javax.swing.border.TitledBorder;
 
import com.Com;
import com.LimitedDocument;
 
import java.awt.BorderLayout;
import java.awt.FlowLayout;
 
public class zdhj_page_param extends JPanel {
    public static int LANG_TYPE_CN = 0;
    public static int LANG_TYPE_EN = 1;
    public static int LANG_TYPE    = LANG_TYPE_CN;
    private SPCommZDHJ SerialComm_ZDHJ = null;
    /**
     * 
     */
    private static final long serialVersionUID = 1L;
    private JTextField tf_zdhj_ch1_cnt;
    private JTextField tf_zdhj_ch2_cnt;
    private JTextField tf_zdhj_ch3_cnt;
    private JTextField tf_zdhj_ch4_cnt;
    private JTextField tf_zdhj_ch5_cnt;
    private JTextField tf_zdhj_devaddr;
    private JTextField tf_zdhj_curr_range;
    private JTextField tf_zdhj_volcal_source;
    private JTextField tf_zdhj_volcal_slope;
    private JTextField tf_zdhj_currcal_source;
    private JTextField tf_zdhj_currcal_slope;
    private JButton btn_zdhj_volcal_offset;
    private JButton btn_zdhj_volcal_slope;
    private JButton btn_zdhj_volcal_reset;
    private JButton btn_zdhj_currcal_offset;
    private JButton btn_zdhj_currcal_slope;
    private JButton btn_zdhj_currcal_reset;
    private JButton btn_zdhj_param_read;
    private JButton btn_zdhj_param_write;
    private JTextField tf_zdhj_tmp_cal;
    private JButton btn_zdhj_temp_cal_reset;
    private JButton btn_zdhj_temp_cal;
    private JTextField tf_zdhj_autores_interval;
    private JTextField tf_zdhj_wenbo_curr_lev;
    private JComboBox<String> cb_zdhj_res_testtype;
    private JTextField tf_param_set_inf;
    private JTextField tf_zdhj_res_dis_slope;
    private JTextField tf_zdhj_mon_stdcap;
    private JTextField tf_zdhj_res_wenbo_slope;
    private JComboBox<String> cb_zdhj_res_dis_mode;
    private JTextField tf_zdhj_temp;
    private JTextField tf_zdhj_batt_floatcurr_lev;
    private JComboBox<String> cb_monnum_setmode;
    private JButton btn_restart_dev;
    private JTextField tf_zdhj_devid;
    private JTextField tf_respm_d1;
    private JTextField tf_respm_d2;
    private JTextField tf_respm_d3;
    private JTextField tf_respm_d4;
    private JTextField tf_respm_s1;
    private JTextField tf_respm_s2;
    private JTextField tf_respm_s3;
    private JTextField tf_respm_s4;
    private JPanel panel;
    private JPanel panel_1;
    private JPanel panel_2;
    private JPanel panel_3;
    private JPanel panel_4;
    private JPanel panel_5;
    private JPanel panel_6;
    private JPanel panel_7;
    private JPanel panel_8;
    private JPanel panel_9;
    private JPanel panel_10;
    private JPanel panel_11;
    private JPanel panel_12;
    private JPanel panel_13;
    private JPanel panel_14;
    private JPanel panel_15;
    private JPanel panel_16;
    /**
     * Create the panel.
     */
    public zdhj_page_param() {
        JPanel panel_48 = new JPanel();
        String zdhj_title = "Ä£¿é²ÎÊý";
        if(LANG_TYPE_EN == LANG_TYPE) {
            zdhj_title = "Module Param Setup";
        }
        setLayout(new BorderLayout(0, 0));
        add(panel_48, BorderLayout.NORTH);
        panel_48.setLayout(new GridLayout(7, 1, 0, 0));
        
        JPanel panel_49 = new JPanel();
        zdhj_title = "Ä£¿éµØÖ· / µçÁ÷Á¿³Ì(A) / ÄÚ×èÖÜÆÚ(H) / ÄÚ×èÀàÐÍ / ÄÚ×è²É¼¯·§Öµ(A) / ÄÚ×è²É¼¯Aģʽ / ÄÚ×è²É¼¯AϵÊý / ÄÚ×è²É¼¯BϵÊý";
        if(LANG_TYPE_EN == LANG_TYPE) {
            zdhj_title = "Module Addr / Curr Range(A) / ResTestTimeInt(H) / ResTestType / Ripple Wave Level(A) / Discharge Mode / Discharge Param / Ripple Wave Param";
        }
        panel_48.add(panel_49);
        panel_49.setLayout(new GridLayout(0, 8, 2, 0));
        
        panel = new JPanel();
        panel.setBorder(new TitledBorder(null, "\u6A21\u5757\u5730\u5740", TitledBorder.LEADING, TitledBorder.TOP, null, null));
        panel_49.add(panel);
        panel.setLayout(new BorderLayout(0, 0));
        
        tf_zdhj_devaddr = new JTextField();
        panel.add(tf_zdhj_devaddr, BorderLayout.CENTER);
        tf_zdhj_devaddr.setFont(new Font("Dialog", Font.PLAIN, 18));
        tf_zdhj_devaddr.setDocument(new LimitedDocument(3, "0123456789"));
        tf_zdhj_devaddr.setColumns(10);
        
        panel_1 = new JPanel();
        panel_1.setBorder(new TitledBorder(null, "\u7535\u6D41\u91CF\u7A0B(A)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
        panel_49.add(panel_1);
        panel_1.setLayout(new BorderLayout(0, 0));
        
        tf_zdhj_curr_range = new JTextField();
        panel_1.add(tf_zdhj_curr_range, BorderLayout.CENTER);
        tf_zdhj_curr_range.setFont(new Font("Dialog", Font.PLAIN, 18));
        tf_zdhj_curr_range.setDocument(new LimitedDocument(4, "0123456789"));
        tf_zdhj_curr_range.setColumns(10);
        
        panel_2 = new JPanel();
        panel_2.setBorder(new TitledBorder(null, "\u5185\u963B\u5468\u671F(H)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
        panel_49.add(panel_2);
        panel_2.setLayout(new BorderLayout(0, 0));
        
        tf_zdhj_autores_interval = new JTextField();
        panel_2.add(tf_zdhj_autores_interval, BorderLayout.CENTER);
        tf_zdhj_autores_interval.setFont(new Font("Dialog", Font.PLAIN, 18));
        tf_zdhj_autores_interval.setDocument(new LimitedDocument(4, "0123456789"));
        tf_zdhj_autores_interval.setColumns(10);
        
        panel_3 = new JPanel();
        panel_3.setBorder(new TitledBorder(UIManager.getBorder("TitledBorder.border"), "\u5185\u963B\u65B9\u6CD5", TitledBorder.LEADING, TitledBorder.TOP, null, new Color(0, 0, 0)));
        panel_49.add(panel_3);
        panel_3.setLayout(new BorderLayout(0, 0));
        
        cb_zdhj_res_testtype = new JComboBox<String>();
        panel_3.add(cb_zdhj_res_testtype, BorderLayout.CENTER);
        cb_zdhj_res_testtype.setFont(new Font("Dialog", Font.PLAIN, 14));
        cb_zdhj_res_testtype.setModel(new DefaultComboBoxModel<String>(new String[] {"\u653E\u7535", "\u5F55\u64AD", "\u81EA\u52A8"}));
        cb_zdhj_res_testtype.setSelectedIndex(0);
        
        panel_4 = new JPanel();
        panel_4.setBorder(new TitledBorder(null, "\u5185\u963B\u9608\u503C(A)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
        panel_49.add(panel_4);
        panel_4.setLayout(new BorderLayout(0, 0));
        
        tf_zdhj_wenbo_curr_lev = new JTextField();
        panel_4.add(tf_zdhj_wenbo_curr_lev, BorderLayout.CENTER);
        tf_zdhj_wenbo_curr_lev.setFont(new Font("Dialog", Font.PLAIN, 18));
        tf_zdhj_wenbo_curr_lev.setDocument(new LimitedDocument(4, "0123456789."));
        tf_zdhj_wenbo_curr_lev.setColumns(10);
        String[] zdhj_title_str = new String[]{"ÄÚ×è²É¼¯A", "ÄÚ×è²É¼¯B", "×Ô¶¯"};
        if(LANG_TYPE_EN == LANG_TYPE) {
            zdhj_title_str = new String[]{"Discharge", "Ripple Wave", "Auto"};
        }
        
        panel_5 = new JPanel();
        panel_5.setBorder(new TitledBorder(null, "\u5185\u963B\u6A21\u5F0F", TitledBorder.LEADING, TitledBorder.TOP, null, null));
        panel_49.add(panel_5);
        panel_5.setLayout(new BorderLayout(0, 0));
        
        cb_zdhj_res_dis_mode = new JComboBox<String>();
        panel_5.add(cb_zdhj_res_dis_mode, BorderLayout.CENTER);
        cb_zdhj_res_dis_mode.setFont(new Font("Dialog", Font.PLAIN, 14));
        cb_zdhj_res_dis_mode.setModel(new DefaultComboBoxModel<String>(new String[] {"\u5355\u8282\u6D4B\u8BD5", "\u540C\u65F6\u6D4B\u8BD5"}));
        cb_zdhj_res_dis_mode.setSelectedIndex(0);
        zdhj_title_str = new String[]{"Òì²½²âÊÔ", "ͬ²½²âÊÔ"};
        if(LANG_TYPE_EN == LANG_TYPE) {
            zdhj_title_str = new String[]{"Single Discharge", "BroadCast Discharge"};
        }
        
        panel_6 = new JPanel();
        panel_6.setBorder(new TitledBorder(null, "\u6A21\u5F0FA\u7CFB\u6570", TitledBorder.LEADING, TitledBorder.TOP, null, null));
        panel_49.add(panel_6);
        panel_6.setLayout(new BorderLayout(0, 0));
        
        tf_zdhj_res_dis_slope = new JTextField();
        panel_6.add(tf_zdhj_res_dis_slope, BorderLayout.CENTER);
        tf_zdhj_res_dis_slope.setFont(new Font("Dialog", Font.PLAIN, 18));
        tf_zdhj_res_dis_slope.setDocument(new LimitedDocument(6, "0123456789."));
        tf_zdhj_res_dis_slope.setColumns(10);
        
        panel_7 = new JPanel();
        panel_7.setBorder(new TitledBorder(null, "\u6A21\u5F0FB\u7CFB\u6570", TitledBorder.LEADING, TitledBorder.TOP, null, null));
        panel_49.add(panel_7);
        panel_7.setLayout(new BorderLayout(0, 0));
        
        tf_zdhj_res_wenbo_slope = new JTextField();
        panel_7.add(tf_zdhj_res_wenbo_slope, BorderLayout.CENTER);
        tf_zdhj_res_wenbo_slope.setFont(new Font("Dialog", Font.PLAIN, 18));
        tf_zdhj_res_wenbo_slope.setDocument(new LimitedDocument(6, "0123456789."));
        tf_zdhj_res_wenbo_slope.setColumns(10);
        
        JPanel panel_51 = new JPanel();
        zdhj_title = "Îå·µ¥ÌåͨµÀ¸÷×Ôµ¥ÌåÊý(1/2/3/4/5) / ±ê³ÆÈÝÁ¿(AH) / ¸¡³äµçÁ÷·§Öµ(A) / µ¥Ìå±àºÅģʽ";
        if(LANG_TYPE_EN == LANG_TYPE) {
            zdhj_title = "5Channels Each Channel Mon Count(1/2/3/4/5) / Stander Batt Cap(AH) / Float Charge Vol Lev(A) / Mon Numbered mode";
        }
        panel_48.add(panel_51);
        panel_51.setLayout(new GridLayout(0, 9, 2, 0));
        
        panel_8 = new JPanel();
        panel_8.setBorder(new TitledBorder(null, "#1\u5355\u4F53\u6570", TitledBorder.LEADING, TitledBorder.TOP, null, null));
        panel_51.add(panel_8);
        panel_8.setLayout(new BorderLayout(0, 0));
        
        tf_zdhj_ch1_cnt = new JTextField();
        panel_8.add(tf_zdhj_ch1_cnt, BorderLayout.CENTER);
        tf_zdhj_ch1_cnt.setFont(new Font("Dialog", Font.PLAIN, 18));
        tf_zdhj_ch1_cnt.setDocument(new LimitedDocument(3, "0123456789"));
        tf_zdhj_ch1_cnt.setColumns(10);
        
        panel_9 = new JPanel();
        panel_9.setBorder(new TitledBorder(null, "#2\u5355\u4F53\u6570", TitledBorder.LEADING, TitledBorder.TOP, null, null));
        panel_51.add(panel_9);
        panel_9.setLayout(new BorderLayout(0, 0));
        
        tf_zdhj_ch2_cnt = new JTextField();
        panel_9.add(tf_zdhj_ch2_cnt, BorderLayout.CENTER);
        tf_zdhj_ch2_cnt.setFont(new Font("Dialog", Font.PLAIN, 18));
        tf_zdhj_ch2_cnt.setDocument(new LimitedDocument(3, "0123456789"));
        tf_zdhj_ch2_cnt.setColumns(10);
        
        panel_10 = new JPanel();
        panel_10.setBorder(new TitledBorder(null, "#3\u5355\u4F53\u6570", TitledBorder.LEADING, TitledBorder.TOP, null, null));
        panel_51.add(panel_10);
        panel_10.setLayout(new BorderLayout(0, 0));
        
        tf_zdhj_ch3_cnt = new JTextField();
        panel_10.add(tf_zdhj_ch3_cnt, BorderLayout.CENTER);
        tf_zdhj_ch3_cnt.setFont(new Font("Dialog", Font.PLAIN, 18));
        tf_zdhj_ch3_cnt.setDocument(new LimitedDocument(3, "0123456789"));
        tf_zdhj_ch3_cnt.setColumns(10);
        
        panel_11 = new JPanel();
        panel_11.setBorder(new TitledBorder(null, "#4\u5355\u4F53\u6570", TitledBorder.LEADING, TitledBorder.TOP, null, null));
        panel_51.add(panel_11);
        panel_11.setLayout(new BorderLayout(0, 0));
        
        tf_zdhj_ch4_cnt = new JTextField();
        panel_11.add(tf_zdhj_ch4_cnt, BorderLayout.CENTER);
        tf_zdhj_ch4_cnt.setFont(new Font("Dialog", Font.PLAIN, 18));
        tf_zdhj_ch4_cnt.setDocument(new LimitedDocument(3, "0123456789"));
        tf_zdhj_ch4_cnt.setColumns(10);
        
        panel_12 = new JPanel();
        panel_12.setBorder(new TitledBorder(UIManager.getBorder("TitledBorder.border"), "#5\u5355\u4F53\u6570", TitledBorder.LEADING, TitledBorder.TOP, null, new Color(0, 0, 0)));
        panel_51.add(panel_12);
        panel_12.setLayout(new BorderLayout(0, 0));
        
        tf_zdhj_ch5_cnt = new JTextField();
        panel_12.add(tf_zdhj_ch5_cnt, BorderLayout.CENTER);
        tf_zdhj_ch5_cnt.setFont(new Font("Dialog", Font.PLAIN, 18));
        tf_zdhj_ch5_cnt.setDocument(new LimitedDocument(5, "0123456789"));
        tf_zdhj_ch5_cnt.setColumns(10);
        
        panel_13 = new JPanel();
        panel_13.setBorder(new TitledBorder(UIManager.getBorder("TitledBorder.border"), "\u6807\u79F0\u5BB9\u91CF(AH)", TitledBorder.LEADING, TitledBorder.TOP, null, new Color(0, 0, 0)));
        panel_51.add(panel_13);
        panel_13.setLayout(new BorderLayout(0, 0));
        
        tf_zdhj_mon_stdcap = new JTextField();
        panel_13.add(tf_zdhj_mon_stdcap, BorderLayout.CENTER);
        tf_zdhj_mon_stdcap.setDocument(new LimitedDocument(4, "0123456789"));
        tf_zdhj_mon_stdcap.setFont(new Font("Dialog", Font.PLAIN, 18));
        tf_zdhj_mon_stdcap.setColumns(10);
        
        panel_14 = new JPanel();
        panel_14.setBorder(new TitledBorder(UIManager.getBorder("TitledBorder.border"), "\u6D6E\u5145\u7535\u6D41(A)", TitledBorder.LEADING, TitledBorder.TOP, null, new Color(0, 0, 0)));
        panel_51.add(panel_14);
        panel_14.setLayout(new BorderLayout(0, 0));
        
        tf_zdhj_batt_floatcurr_lev = new JTextField();
        panel_14.add(tf_zdhj_batt_floatcurr_lev, BorderLayout.CENTER);
        tf_zdhj_batt_floatcurr_lev.setFont(new Font("Dialog", Font.PLAIN, 18));
        tf_zdhj_batt_floatcurr_lev.setDocument(new LimitedDocument(4, "0123456789."));
        tf_zdhj_batt_floatcurr_lev.setColumns(10);
        zdhj_title_str = new String[]{"µ÷ÊÔģʽ", "Õý³£Ä£Ê½"};
        if(LANG_TYPE_EN == LANG_TYPE) {
            zdhj_title_str = new String[]{"Debug Mode", "Normal Mode"};
        }
        
        panel_15 = new JPanel();
        panel_15.setBorder(new TitledBorder(null, "\u7F16\u53F7\u6A21\u5F0F", TitledBorder.LEADING, TitledBorder.TOP, null, null));
        panel_51.add(panel_15);
        panel_15.setLayout(new BorderLayout(0, 0));
        
        cb_monnum_setmode = new JComboBox<String>();
        panel_15.add(cb_monnum_setmode, BorderLayout.CENTER);
        cb_monnum_setmode.setFont(new Font("Dialog", Font.PLAIN, 14));
        cb_monnum_setmode.setModel(new DefaultComboBoxModel<String>(zdhj_title_str));
        cb_monnum_setmode.setSelectedIndex(0);
        
        panel_16 = new JPanel();
        panel_16.setBorder(new TitledBorder(UIManager.getBorder("TitledBorder.border"), "\u5747\u8861\u7535\u538B(mV)", TitledBorder.LEADING, TitledBorder.TOP, null, new Color(0, 0, 0)));
        panel_51.add(panel_16);
        panel_16.setLayout(new BorderLayout(0, 0));
        
        tf_zdhj_devid = new JTextField();
        tf_zdhj_devid.setFont(new Font("Dialog", Font.PLAIN, 18));
        panel_16.add(tf_zdhj_devid, BorderLayout.CENTER);
        tf_zdhj_devid.setDocument(new LimitedDocument(5, "0123456789"));
        tf_zdhj_devid.setColumns(10);
        
        JPanel panel_54 = new JPanel();
        zdhj_title = "²ÎÊýÉèÖÃ";
        if(LANG_TYPE_EN == LANG_TYPE) {
            zdhj_title = "Param Set";
        }
        
        JPanel panel_80 = new JPanel();
        panel_80.setBorder(new TitledBorder(UIManager.getBorder("TitledBorder.border"), "\u7EBF\u7F06\u8865\u507F(D1,D2,D3,D4 / S1,S2,S3,S4)", TitledBorder.LEADING, TitledBorder.TOP, null, new Color(0, 0, 0)));
        panel_48.add(panel_80);
        panel_80.setLayout(new GridLayout(0, 8, 2, 0));
        
        tf_respm_d1 = new JTextField();
        tf_respm_d1.setFont(new Font("Dialog", Font.PLAIN, 18));
        tf_respm_d1.setDocument(new LimitedDocument(6, "0123456789."));
        panel_80.add(tf_respm_d1);
        tf_respm_d1.setColumns(10);
        
        tf_respm_d2 = new JTextField();
        tf_respm_d2.setFont(new Font("Dialog", Font.PLAIN, 18));
        tf_respm_d2.setDocument(new LimitedDocument(6, "0123456789."));
        panel_80.add(tf_respm_d2);
        tf_respm_d2.setColumns(10);
        
        tf_respm_d3 = new JTextField();
        tf_respm_d3.setFont(new Font("Dialog", Font.PLAIN, 18));
        tf_respm_d3.setDocument(new LimitedDocument(6, "0123456789."));
        panel_80.add(tf_respm_d3);
        tf_respm_d3.setColumns(10);
        
        tf_respm_d4 = new JTextField();
        tf_respm_d4.setFont(new Font("Dialog", Font.PLAIN, 18));
        tf_respm_d4.setDocument(new LimitedDocument(6, "0123456789."));
        panel_80.add(tf_respm_d4);
        tf_respm_d4.setColumns(10);
        
        tf_respm_s1 = new JTextField();
        tf_respm_s1.setFont(new Font("Dialog", Font.PLAIN, 18));
        tf_respm_s1.setDocument(new LimitedDocument(6, "0123456789."));
        panel_80.add(tf_respm_s1);
        tf_respm_s1.setColumns(10);
        
        tf_respm_s2 = new JTextField();
        tf_respm_s2.setFont(new Font("Dialog", Font.PLAIN, 18));
        tf_respm_s2.setDocument(new LimitedDocument(6, "0123456789."));
        panel_80.add(tf_respm_s2);
        tf_respm_s2.setColumns(10);
        
        tf_respm_s3 = new JTextField();
        tf_respm_s3.setFont(new Font("Dialog", Font.PLAIN, 18));
        tf_respm_s3.setDocument(new LimitedDocument(6, "0123456789."));
        panel_80.add(tf_respm_s3);
        tf_respm_s3.setColumns(10);
        
        tf_respm_s4 = new JTextField();
        tf_respm_s4.setFont(new Font("Dialog", Font.PLAIN, 18));
        tf_respm_s4.setDocument(new LimitedDocument(6, "0123456789."));
        panel_80.add(tf_respm_s4);
        tf_respm_s4.setColumns(10);
        panel_54.setBorder(new TitledBorder(UIManager.getBorder("TitledBorder.border"), zdhj_title, TitledBorder.LEADING, TitledBorder.TOP, null, new Color(0, 0, 0)));
        panel_48.add(panel_54);
        panel_54.setLayout(new BoxLayout(panel_54, BoxLayout.X_AXIS));
        
        tf_param_set_inf = new JTextField();
        tf_param_set_inf.setFont(new Font("Dialog", Font.PLAIN, 18));
        panel_54.add(tf_param_set_inf);
        tf_param_set_inf.setColumns(10);
        
        JPanel panel_65 = new JPanel();
        panel_54.add(panel_65);
        panel_65.setLayout(new GridLayout(0, 3, 4, 0));
        
        zdhj_title = "²ÎÊý¶ÁÈ¡";
        if(LANG_TYPE_EN == LANG_TYPE) {
            zdhj_title = "Param Read";
        }
        btn_zdhj_param_read = new JButton(zdhj_title);
        panel_65.add(btn_zdhj_param_read);
        btn_zdhj_param_read.setEnabled(false);
        btn_zdhj_param_read.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                if(null == SerialComm_ZDHJ) {
                    return;
                }
                
                SerialComm_ZDHJ.setCommCmd(SPCommZDHJ.CMD_TYPE_READ, SPCommZDHJ.ZDHJ_PARAM_RegAddr_Start, null, 0);
            }
        });
        btn_zdhj_param_read.setFont(new Font("ËÎÌå", Font.PLAIN, 14));
        
        zdhj_title = "²ÎÊýÉèÖÃ";
        if(LANG_TYPE_EN == LANG_TYPE) {
            zdhj_title = "Param Write";
        }
        btn_zdhj_param_write = new JButton(zdhj_title);
        panel_65.add(btn_zdhj_param_write);
        btn_zdhj_param_write.setEnabled(false);
        btn_zdhj_param_write.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                if(null == SerialComm_ZDHJ) {
                    return;
                }
                
                short[] zdhj_param_data = new short[25];
                try {
                    zdhj_param_data[0] = (short) Integer.parseInt(tf_zdhj_devaddr.getText());
                    
                    short ch1_cnt = (short) Integer.parseInt(tf_zdhj_ch1_cnt.getText());
                    short ch2_cnt = (short) Integer.parseInt(tf_zdhj_ch2_cnt.getText());
                    short ch3_cnt = (short) Integer.parseInt(tf_zdhj_ch3_cnt.getText());
                    short ch4_cnt = (short) Integer.parseInt(tf_zdhj_ch4_cnt.getText());
                    short ch5_cnt = (short) Integer.parseInt(tf_zdhj_ch5_cnt.getText());
 
                    if((ch1_cnt + ch2_cnt + ch3_cnt + ch4_cnt/* + ch5_cnt*/) > SPCommZDHJ.ZDHJ_MON_COUNT_MAX) {
                        String tmp_str = "ËùÓÐͨµÀµ¥Ìå×ÜÊý²»Äܳ¬¹ý";
                        if(LANG_TYPE_EN == LANG_TYPE) {
                            tmp_str = "All channels Mon count must not exceed ";
                        }
                        JOptionPane.showMessageDialog(null, tmp_str + SPCommZDHJ.ZDHJ_MON_COUNT_MAX);
                        return;
                    }
                    
                    zdhj_param_data[1] = ch1_cnt;
                    zdhj_param_data[2] = ch2_cnt;
                    zdhj_param_data[3] = ch3_cnt;
                    zdhj_param_data[4] = ch4_cnt;
                    zdhj_param_data[5] = ch5_cnt;
                    
                    zdhj_param_data[6] = (short) Integer.parseInt(tf_zdhj_curr_range.getText());
                    zdhj_param_data[7] = (short) (Double.parseDouble(tf_zdhj_batt_floatcurr_lev.getText())*10);
                    zdhj_param_data[8] = (short) (Double.parseDouble(tf_zdhj_wenbo_curr_lev.getText())*100);
                    zdhj_param_data[9] = (short) Integer.parseInt(tf_zdhj_autores_interval.getText());
                    zdhj_param_data[10] = (short) cb_zdhj_res_testtype.getSelectedIndex();
                    
                    zdhj_param_data[11] = (short) cb_zdhj_res_dis_mode.getSelectedIndex();
                    zdhj_param_data[12] = (short) Integer.parseInt(tf_zdhj_mon_stdcap.getText());
                    zdhj_param_data[13] = (short) (Double.parseDouble(tf_zdhj_res_dis_slope.getText())*10000);
                    zdhj_param_data[14] = (short) (Double.parseDouble(tf_zdhj_res_wenbo_slope.getText())*10000);
                    zdhj_param_data[15] = (short) cb_monnum_setmode.getSelectedIndex();
                    zdhj_param_data[16] = (short) Integer.parseInt(tf_zdhj_devid.getText());
                    
                    zdhj_param_data[17] = (short) (Double.parseDouble(tf_respm_d1.getText())*10000);
                    zdhj_param_data[18] = (short) (Double.parseDouble(tf_respm_d2.getText())*10000);
                    zdhj_param_data[19] = (short) (Double.parseDouble(tf_respm_d3.getText())*10000);
                    zdhj_param_data[20] = (short) (Double.parseDouble(tf_respm_d4.getText())*10000);
                    zdhj_param_data[21] = (short) (Double.parseDouble(tf_respm_s1.getText())*10000);
                    zdhj_param_data[22] = (short) (Double.parseDouble(tf_respm_s2.getText())*10000);
                    zdhj_param_data[23] = (short) (Double.parseDouble(tf_respm_s3.getText())*10000);
                    zdhj_param_data[24] = (short) (Double.parseDouble(tf_respm_s4.getText())*10000);
                    //--------------------------------------------------------------------------------//
                    String tmp_str = "È·¶¨ÒªÉèÖà'ÅäÖòÎÊý' Âð?";
                    if(LANG_TYPE_EN == LANG_TYPE) {
                        tmp_str = "Are you sure to write param ?";
                    }
                    if(JOptionPane.NO_OPTION 
                            == JOptionPane.showConfirmDialog(null, tmp_str,
                                                            "Information",
                                                            JOptionPane.YES_NO_OPTION)) {
                        return;
                    }
                    //--------------------------------------------------------------------------------//
                    //frmSerialport.setCursor(new Cursor(Cursor.WAIT_CURSOR));
                    SerialComm_ZDHJ.setCommCmd(SPCommZDHJ.CMD_TYPE_WRITE_MULTY, SPCommZDHJ.ZDHJ_PARAM_RegAddr_Start, 
                                                zdhj_param_data, zdhj_param_data.length);
                    Thread.sleep(1000);
                    SerialComm_ZDHJ.setCommCmd(SPCommZDHJ.CMD_TYPE_READ, SPCommZDHJ.ZDHJ_PARAM_RegAddr_Start, null, 0);
                    //frmSerialport.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
                    //--------------------------------------------------------------------------------//
                } catch (Exception e1) {
                //    e1.printStackTrace();
                    String tmp_str = "ÇëÊäÈëºÏ·¨µÄ 'Ä£¿é²ÎÊý' Öµ!";
                    if(LANG_TYPE_EN == LANG_TYPE) {
                        tmp_str = "Please input the rightful param values!";
                    }
                    JOptionPane.showMessageDialog(null, tmp_str);
                }
            }
        });
        btn_zdhj_param_write.setFont(new Font("ËÎÌå", Font.PLAIN, 14));
        
        zdhj_title = "Ä£¿éÖØÆô";
        if(LANG_TYPE_EN == LANG_TYPE) {
            zdhj_title = "Module Restart";
        }
        btn_restart_dev = new JButton(zdhj_title);
        btn_restart_dev.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                if(null == SerialComm_ZDHJ) {
                    return;
                }
                
                String tmp_str = "È·¶¨ÒªÖØÆôÄ£¿éÂð?";
                if(LANG_TYPE_EN == LANG_TYPE) {
                    tmp_str = "Are you sure to restart this module?";
                }
                if(JOptionPane.NO_OPTION 
                        == JOptionPane.showConfirmDialog(null, tmp_str,
                                                            "Information",
                                                            JOptionPane.YES_NO_OPTION)) {
                    return;
                }
                short[] res_type_tag = new short[1];
                res_type_tag[0] = 10000;
                SerialComm_ZDHJ.setCommCmd(SerialComm_ZDHJ.m_CMD_TYPE_WRITE, SPCommZDHJ.ZDHJ_ResStart_System_RegAddr, 
                                            res_type_tag, res_type_tag.length);
            }
        });
        btn_restart_dev.setEnabled(false);
        panel_65.add(btn_restart_dev);
        btn_restart_dev.setFont(new Font("ËÎÌå", Font.PLAIN, 14));
        
        JPanel panel_52 = new JPanel();
        zdhj_title = "ʵ²âµçѹ(V) / Ð£×¼µçѹ(V)";
        if(LANG_TYPE_EN == LANG_TYPE) {
            zdhj_title = "Measure Vol(V) / Standerd Vol(V)";
        }
        panel_52.setBorder(new TitledBorder(UIManager.getBorder("TitledBorder.border"), zdhj_title, TitledBorder.LEADING, TitledBorder.TOP, null, new Color(0, 0, 0)));
        panel_48.add(panel_52);
        panel_52.setLayout(new FlowLayout(FlowLayout.LEFT, 5, 5));
        
        tf_zdhj_volcal_source = new JTextField();
        tf_zdhj_volcal_source.setFont(new Font("Dialog", Font.PLAIN, 18));
        tf_zdhj_volcal_source.setText("0.0");
        tf_zdhj_volcal_source.setEditable(false);
        panel_52.add(tf_zdhj_volcal_source);
        tf_zdhj_volcal_source.setColumns(10);
        
        tf_zdhj_volcal_slope = new JTextField();
        tf_zdhj_volcal_slope.setFont(new Font("Dialog", Font.PLAIN, 18));
        tf_zdhj_volcal_slope.setDocument(new LimitedDocument(5, "0123456789."));
        panel_52.add(tf_zdhj_volcal_slope);
        tf_zdhj_volcal_slope.setColumns(10);
        
        zdhj_title = "Æ«ÒÆÐ£×¼";
        if(LANG_TYPE_EN == LANG_TYPE) {
            zdhj_title = "OffSet Cal";
        }
        btn_zdhj_volcal_offset = new JButton(zdhj_title);
        btn_zdhj_volcal_offset.setEnabled(false);
        btn_zdhj_volcal_offset.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent arg0) {
                if(null == SerialComm_ZDHJ) {
                    return;
                }
                
                short[] res_type_tag = new short[1];
                res_type_tag[0] = (short)((Double.parseDouble(tf_zdhj_volcal_source.getText()))*10);
                SerialComm_ZDHJ.setCommCmd(SerialComm_ZDHJ.m_CMD_TYPE_WRITE, SPCommZDHJ.ZDHJ_AdjVolOffset_RegAddr, 
                                            res_type_tag, res_type_tag.length);
            }
        });
        btn_zdhj_volcal_offset.setFont(new Font("ËÎÌå", Font.PLAIN, 12));
        panel_52.add(btn_zdhj_volcal_offset);
        
        zdhj_title = "бÂÊУ׼";
        if(LANG_TYPE_EN == LANG_TYPE) {
            zdhj_title = "Slope Cal";
        }
        btn_zdhj_volcal_slope = new JButton(zdhj_title);
        btn_zdhj_volcal_slope.setEnabled(false);
        btn_zdhj_volcal_slope.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                if(null == SerialComm_ZDHJ) {
                    return;
                }
                
                String tmp_str = "У׼µçѹǰÇëÏÈÖØÖÃУ׼²ÎÊý, È·¶¨ÒªÐ£×¼µçѹÂð?";
                if(LANG_TYPE_EN == LANG_TYPE) {
                    tmp_str = "Are you sure to calibration group vol?";
                }
                if(JOptionPane.NO_OPTION 
                        == JOptionPane.showConfirmDialog(null, 
                                                        tmp_str,
                                                        "Information",
                                                        JOptionPane.YES_NO_OPTION)) {
                    return;
                }
                
                if(tf_zdhj_volcal_slope.getText().trim().length() < 1) {
                    tmp_str = "ÇëÊäÈëÐèҪУ׼µÄµçѹ!";
                    if(LANG_TYPE_EN == LANG_TYPE) {
                        tmp_str = "Please input standerd group vol first!";
                    }
                    JOptionPane.showMessageDialog(null, tmp_str);
                    return;
                }
                short[] res_type_tag = new short[1];
                double vol_dev = Double.parseDouble(tf_zdhj_volcal_source.getText());
                if(vol_dev < 1) {
                    tmp_str = "ʵ²âµçѹ̫С,ÇÒ²»ÄÜΪÁã!";
                    if(LANG_TYPE_EN == LANG_TYPE) {
                        tmp_str = "The standerd group vol too low!";
                    }
                    JOptionPane.showMessageDialog(null, tmp_str);
                    return;
                }
                double vol_set = Double.parseDouble(tf_zdhj_volcal_slope.getText());
                res_type_tag[0] = (short)((vol_set/vol_dev)*10000);
                SerialComm_ZDHJ.setCommCmd(SerialComm_ZDHJ.m_CMD_TYPE_WRITE, SPCommZDHJ.ZDHJ_AdjVolSlope_RegAddr, 
                                            res_type_tag, res_type_tag.length);
            }
        });
        btn_zdhj_volcal_slope.setFont(new Font("ËÎÌå", Font.PLAIN, 12));
        panel_52.add(btn_zdhj_volcal_slope);
        
        zdhj_title = "ÖØÖÃ";
        if(LANG_TYPE_EN == LANG_TYPE) {
            zdhj_title = "Reset Cal";
        }
        btn_zdhj_volcal_reset = new JButton(zdhj_title);
        btn_zdhj_volcal_reset.setEnabled(false);
        btn_zdhj_volcal_reset.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                if(null == SerialComm_ZDHJ) {
                    return;
                }
                
                String tmp_str = "È·¶¨ÒªÖØÖõçѹУ׼²ÎÊýÂð?";
                if(LANG_TYPE_EN == LANG_TYPE) {
                    tmp_str = "Are you sure to reset group vol calibration?";
                }
                if(JOptionPane.NO_OPTION 
                        == JOptionPane.showConfirmDialog(null, tmp_str,
                                                            "Information",
                                                            JOptionPane.YES_NO_OPTION)) {
                    return;
                }
                short[] res_type_tag = new short[1];
                res_type_tag[0] = 10000;
                SerialComm_ZDHJ.setCommCmd(SerialComm_ZDHJ.m_CMD_TYPE_WRITE, SPCommZDHJ.ZDHJ_AdjVolSlope_RegAddr, 
                                            res_type_tag, res_type_tag.length);
            }
        });
        btn_zdhj_volcal_reset.setFont(new Font("ËÎÌå", Font.PLAIN, 12));
        panel_52.add(btn_zdhj_volcal_reset);
        
        JPanel panel_53 = new JPanel();
        zdhj_title = "ʵ²âµçÁ÷(A) / Ð£×¼µçÁ÷(A)";
        if(LANG_TYPE_EN == LANG_TYPE) {
            zdhj_title = "Measure Curr(A) / Standerd Curr(A)";
        }
        panel_53.setBorder(new TitledBorder(UIManager.getBorder("TitledBorder.border"), zdhj_title, TitledBorder.LEADING, TitledBorder.TOP, null, new Color(0, 0, 0)));
        panel_48.add(panel_53);
        panel_53.setLayout(new FlowLayout(FlowLayout.LEFT, 5, 5));
        
        tf_zdhj_currcal_source = new JTextField();
        tf_zdhj_currcal_source.setFont(new Font("Dialog", Font.PLAIN, 18));
        tf_zdhj_currcal_source.setText("0.0");
        tf_zdhj_currcal_source.setEditable(false);
        panel_53.add(tf_zdhj_currcal_source);
        tf_zdhj_currcal_source.setColumns(10);
        
        tf_zdhj_currcal_slope = new JTextField();
        tf_zdhj_currcal_slope.setFont(new Font("Dialog", Font.PLAIN, 18));
        tf_zdhj_currcal_slope.setDocument(new LimitedDocument(5, "0123456789."));
        panel_53.add(tf_zdhj_currcal_slope);
        tf_zdhj_currcal_slope.setColumns(10);
        
        zdhj_title = "ÇåÁã";
        if(LANG_TYPE_EN == LANG_TYPE) {
            zdhj_title = "Clear";
        }
        btn_zdhj_currcal_offset = new JButton("\u7535\u6D41\u6E05\u96F6");
        btn_zdhj_currcal_offset.setEnabled(false);
        btn_zdhj_currcal_offset.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent arg0) {
                if(null == SerialComm_ZDHJ) {
                    return;
                }
                
                String tmp_str = "ÇëÈ·±£Ä£¿éÒѾ­Á¬½ÓµçÁ÷ǯ, "
                        + "²¢ÇÒµçÁ÷ǯ²»¿¨ÈκιýµçÁ÷µÄÏßÀÂ, "
                        + "È·¶¨ÒªÇåÁãµçÁ÷Âð?";
                if(LANG_TYPE_EN == LANG_TYPE) {
                    tmp_str = "Are you sure to clear offset curr?";
                }
                if(JOptionPane.NO_OPTION 
                        == JOptionPane.showConfirmDialog(null, tmp_str,
                                                        "Information",
                                                        JOptionPane.YES_NO_OPTION)) {
                    return;
                }
                short[] res_type_tag = new short[1];
                res_type_tag[0] = 0x0000;
                SerialComm_ZDHJ.setCommCmd(SerialComm_ZDHJ.m_CMD_TYPE_WRITE, SPCommZDHJ.ZDHJ_SetCurrZero_RegAddr, 
                                            res_type_tag, res_type_tag.length);
            }
        });
        btn_zdhj_currcal_offset.setFont(new Font("ËÎÌå", Font.PLAIN, 12));
        panel_53.add(btn_zdhj_currcal_offset);
        
        zdhj_title = "У׼";
        if(LANG_TYPE_EN == LANG_TYPE) {
            zdhj_title = "Calibrate";
        }
        btn_zdhj_currcal_slope = new JButton("\u7535\u6D41\u6821\u51C6");
        btn_zdhj_currcal_slope.setEnabled(false);
        btn_zdhj_currcal_slope.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                if(null == SerialComm_ZDHJ) {
                    return;
                }
                
                String tmp_str = "У׼µçÁ÷ǰÇëÏÈÖØÖÃУ׼²ÎÊý, È·¶¨ÒªÐ£×¼µçÁ÷Âð?";
                if(LANG_TYPE_EN == LANG_TYPE) {
                    tmp_str = "Are you sure to calibration curr?";
                }
                if(JOptionPane.NO_OPTION 
                        == JOptionPane.showConfirmDialog(null, tmp_str,
                                                        "Information",
                                                        JOptionPane.YES_NO_OPTION)) {
                    return;
                }
                
                if(tf_zdhj_currcal_slope.getText().trim().length() < 1) {
                    tmp_str = "ÇëÊäÈëÐèҪУ׼µÄµçÁ÷!";
                    if(LANG_TYPE_EN == LANG_TYPE) {
                        tmp_str = "Please input standerd curr!";
                    }
                    JOptionPane.showMessageDialog(null, tmp_str);
                    return;
                }
                short[] res_type_tag = new short[1];
                double curr_dev = Double.parseDouble(tf_zdhj_currcal_source.getText());
                if(curr_dev < 1) {
                    tmp_str = "ʵ²âµçÁ÷̫С,ÇÒ²»ÄÜΪÁã!";
                    if(LANG_TYPE_EN == LANG_TYPE) {
                        tmp_str = "The standerd curr too low!";
                    }
                    JOptionPane.showMessageDialog(null, tmp_str);
                    return;
                }
                double curr_set = Double.parseDouble(tf_zdhj_currcal_slope.getText());
                res_type_tag[0] = (short)((curr_set/curr_dev)*10000);
                SerialComm_ZDHJ.setCommCmd(SerialComm_ZDHJ.m_CMD_TYPE_WRITE, SPCommZDHJ.ZDHJ_AdjCurrSlope_RegAddr, 
                                            res_type_tag, res_type_tag.length);
            }
        });
        btn_zdhj_currcal_slope.setFont(new Font("ËÎÌå", Font.PLAIN, 12));
        panel_53.add(btn_zdhj_currcal_slope);
        
        zdhj_title = "ÖØÖÃ";
        if(LANG_TYPE_EN == LANG_TYPE) {
            zdhj_title = "Reset Cal";
        }
        btn_zdhj_currcal_reset = new JButton(zdhj_title);
        btn_zdhj_currcal_reset.setEnabled(false);
        btn_zdhj_currcal_reset.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                if(null == SerialComm_ZDHJ) {
                    return;
                }
                
                String tmp_str = "È·¶¨ÒªÖØÖõçÁ÷У׼²ÎÊýÂð?";
                if(LANG_TYPE_EN == LANG_TYPE) {
                    tmp_str = "Are you sure to reset curr calibration?";
                }
                if(JOptionPane.NO_OPTION 
                        == JOptionPane.showConfirmDialog(null, tmp_str,
                                                        "Information",
                                                        JOptionPane.YES_NO_OPTION)) {
                    return;
                }
                
                short[] res_type_tag = new short[1];
                res_type_tag[0] = 10000;
                SerialComm_ZDHJ.setCommCmd(SerialComm_ZDHJ.m_CMD_TYPE_WRITE, SPCommZDHJ.ZDHJ_AdjCurrSlope_RegAddr, 
                                            res_type_tag, res_type_tag.length);
            }
        });
        btn_zdhj_currcal_reset.setFont(new Font("ËÎÌå", Font.PLAIN, 12));
        panel_53.add(btn_zdhj_currcal_reset);
        
        JPanel panel_82 = new JPanel();
        panel_82.setBorder(new TitledBorder(UIManager.getBorder("TitledBorder.border"), "\u73AF\u5883\u6E29\u5EA6(\u2103) / \u6821\u51C6\u6E29\u5EA6(\u2103)", TitledBorder.LEADING, TitledBorder.TOP, null, new Color(0, 0, 0)));
        panel_48.add(panel_82);
        panel_82.setLayout(new FlowLayout(FlowLayout.LEFT, 5, 5));
        
        tf_zdhj_temp = new JTextField();
        tf_zdhj_temp.setText("0.0");
        tf_zdhj_temp.setFont(new Font("Dialog", Font.PLAIN, 18));
        tf_zdhj_temp.setEditable(false);
        panel_82.add(tf_zdhj_temp);
        tf_zdhj_temp.setColumns(10);
        
        tf_zdhj_tmp_cal = new JTextField();
        tf_zdhj_tmp_cal.setFont(new Font("Dialog", Font.PLAIN, 18));
        panel_82.add(tf_zdhj_tmp_cal);
        tf_zdhj_tmp_cal.setColumns(10);
        tf_zdhj_currcal_slope.setDocument(new LimitedDocument(4, "0123456789."));
        
        btn_zdhj_temp_cal = new JButton("\u6E29\u5EA6\u6821\u51C6");
        btn_zdhj_temp_cal.setFont(new Font("ËÎÌå", Font.PLAIN, 12));
        btn_zdhj_temp_cal.setEnabled(false);
        btn_zdhj_temp_cal.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                if(null == SerialComm_ZDHJ) {
                    return;
                }
                
                String tmp_str = "";
                double temp_dev = Double.parseDouble(tf_zdhj_temp.getText());
                if(temp_dev < 2.0) {
                    tmp_str = "ʵ²âζÈÌ«µÍ,²»ÄÜУ׼!";
                    if(LANG_TYPE_EN == LANG_TYPE) {
                        tmp_str = "The real temp too low!";
                    }
                    JOptionPane.showMessageDialog(null, tmp_str);
                    return;
                }
                if(temp_dev > 60.0) {
                    tmp_str = "ʵ²âζÈÌ«¸ß,²»ÄÜУ׼!";
                    if(LANG_TYPE_EN == LANG_TYPE) {
                        tmp_str = "The real temp too high!";
                    }
                    JOptionPane.showMessageDialog(null, tmp_str);
                    return;
                }
                
                double temp_std = 0;
                try {
                    temp_std = Double.parseDouble(tf_zdhj_tmp_cal.getText());
                } catch (Exception e1) {
                    tmp_str = "ÊäÈëζÈÊý¾Ý¸ñʽ´íÎó,ÇëÊäÈëÓÐЧµÄÕûÊý»ò¸¡µãÊý!";
                    if(LANG_TYPE_EN == LANG_TYPE) {
                        tmp_str = "input temp value format error!";
                    }
                    if(JOptionPane.NO_OPTION 
                            == JOptionPane.showConfirmDialog(null, tmp_str,
                                                            "Information",
                                                            JOptionPane.YES_NO_OPTION)) {
                        return;
                    }
                }
                if((temp_std < 2.0) || (temp_std > 60.0)) {
                    tmp_str = "±ê׼ζȵÍÓÚ2.0¡æ»ò¸ßÓÚ60.0¡æ,²»ÄÜУ׼!";
                    if(LANG_TYPE_EN == LANG_TYPE) {
                        tmp_str = "The cal temp is too low or too high!";
                    }
                    JOptionPane.showMessageDialog(null, tmp_str);
                    return;
                }
                
                tmp_str = "È·¶¨ÒªÐ£×¼Î¶ÈÂð?";
                if(LANG_TYPE_EN == LANG_TYPE) {
                    tmp_str = "Are you sure to reset the temp calibration?";
                }
                if(JOptionPane.NO_OPTION 
                        == JOptionPane.showConfirmDialog(null, tmp_str,
                                                        "Information",
                                                        JOptionPane.YES_NO_OPTION)) {
                    return;
                }
                
                short[] res_type_tag = new short[1];
                int slop = (int)((temp_std/temp_dev)*10000);
                if(slop > 15000) {
                    slop = 15000;
                }
                if(slop < 5000) {
                    slop = 5000;
                }
                res_type_tag[0] = (short)slop;
                SerialComm_ZDHJ.setCommCmd(SPCommZDHJ.CMD_TYPE_WRITE_STD, SPCommZDHJ.ZDHJ_AdjTempSlope_RegAddr, 
                                            res_type_tag, res_type_tag.length);
            }
        });
        panel_82.add(btn_zdhj_temp_cal);
        
        btn_zdhj_temp_cal_reset = new JButton("\u6E29\u5EA6\u91CD\u7F6E");
        btn_zdhj_temp_cal_reset.setFont(new Font("ËÎÌå", Font.PLAIN, 12));
        btn_zdhj_temp_cal_reset.setEnabled(false);
        btn_zdhj_temp_cal_reset.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent arg0) {
                if(null == SerialComm_ZDHJ) {
                    return;
                }
                
                String tmp_str = "È·¶¨ÒªÖØÖÃζÈУ׼²ÎÊýÂð?";
                if(LANG_TYPE_EN == LANG_TYPE) {
                    tmp_str = "Are you sure to reset the temp calibration?";
                }
                if(JOptionPane.NO_OPTION 
                        == JOptionPane.showConfirmDialog(null, tmp_str,
                                                        "Information",
                                                        JOptionPane.YES_NO_OPTION)) {
                    return;
                }
                
                short[] res_type_tag = new short[1];
                res_type_tag[0] = 10000;
                SerialComm_ZDHJ.setCommCmd(SPCommZDHJ.CMD_TYPE_WRITE_STD, SPCommZDHJ.ZDHJ_AdjTempSlope_RegAddr, 
                                            res_type_tag, res_type_tag.length);
            }
        });
        panel_82.add(btn_zdhj_temp_cal_reset);
        /**************************************************************************/
        
        setButttonState(false);
    }
 
    public void setSerialComm_ZDHJ(SPCommZDHJ sz) {
        SerialComm_ZDHJ = sz;
    }
    
    public void setButttonState(boolean state) {
        btn_zdhj_param_read.setEnabled(state);
        btn_zdhj_param_write.setEnabled(state);
        btn_restart_dev.setEnabled(state);
        
        btn_zdhj_currcal_offset.setEnabled(state);
        btn_zdhj_volcal_slope.setEnabled(state);
        btn_zdhj_volcal_reset.setEnabled(state);
        btn_zdhj_currcal_slope.setEnabled(state);
        btn_zdhj_currcal_reset.setEnabled(state);
        btn_zdhj_temp_cal.setEnabled(state);
        btn_zdhj_temp_cal_reset.setEnabled(state);
    }
    
    public void updateData() {
        if(null != SerialComm_ZDHJ) {
            tf_zdhj_volcal_source.setText(String.format("%1.1f", SerialComm_ZDHJ.GroupVol));
            tf_zdhj_temp.setText(String.format("%1.1f", SerialComm_ZDHJ.ExTemp));
            //System.out.println("SerialComm_ZDHJ.dev_stat_state:" + SerialComm_ZDHJ.dev_stat_state);
            tf_zdhj_currcal_source.setText(String.format("%1.1f", SerialComm_ZDHJ.BattCurr));
            
            if(SPCommZDHJ.DEV_PARAM_DATA_STATE_UPDATE == SerialComm_ZDHJ.dev_param_data_state) {
                SerialComm_ZDHJ.dev_param_data_state = SPCommZDHJ.DEV_PARAM_DATA_STATE_NULL;
                
                tf_zdhj_devaddr.setText(String.format("%d", SerialComm_ZDHJ.dev_param_addr));
                tf_zdhj_curr_range.setText(String.format("%d", SerialComm_ZDHJ.dev_param_curr_range));
                tf_zdhj_autores_interval.setText(String.format("%d", SerialComm_ZDHJ.dev_param_auto_restest_interval));
                tf_zdhj_wenbo_curr_lev.setText(String.format("%1.2f", SerialComm_ZDHJ.dev_param_wenbo_curr_lev));
                cb_zdhj_res_testtype.setSelectedIndex(SerialComm_ZDHJ.dev_param_res_test_type);
                cb_zdhj_res_dis_mode.setSelectedIndex(SerialComm_ZDHJ.dev_param_ResDisTestMethod);
                tf_zdhj_res_dis_slope.setText(String.format("%1.4f", SerialComm_ZDHJ.dev_param_res_dis_slope));
                tf_zdhj_res_wenbo_slope.setText(String.format("%1.4f", SerialComm_ZDHJ.dev_param_res_wenbo_slope));
                
                tf_zdhj_ch1_cnt.setText(String.format("%d", SerialComm_ZDHJ.dev_param_ch_mon_cnt[0]));
                tf_zdhj_ch2_cnt.setText(String.format("%d", SerialComm_ZDHJ.dev_param_ch_mon_cnt[1]));
                tf_zdhj_ch3_cnt.setText(String.format("%d", SerialComm_ZDHJ.dev_param_ch_mon_cnt[2]));
                tf_zdhj_ch4_cnt.setText(String.format("%d", SerialComm_ZDHJ.dev_param_ch_mon_cnt[3]));
                tf_zdhj_ch5_cnt.setText(String.format("%d", SerialComm_ZDHJ.dev_param_ch_mon_cnt[4]));
                tf_zdhj_mon_stdcap.setText(String.format("%d", SerialComm_ZDHJ.dev_param_Batt_StdCap));
                tf_zdhj_batt_floatcurr_lev.setText(String.format("%1.1f", SerialComm_ZDHJ.dev_param_FloatCurrLev));
                cb_monnum_setmode.setSelectedIndex(SerialComm_ZDHJ.dev_param_monnum_setmode);
                tf_zdhj_devid.setText(String.format("%d", SerialComm_ZDHJ.dev_param_devid));
                
                tf_respm_d1.setText(String.format("%1.4f", SerialComm_ZDHJ.dev_param_resparam_d[0]));
                tf_respm_d2.setText(String.format("%1.4f", SerialComm_ZDHJ.dev_param_resparam_d[1]));
                tf_respm_d3.setText(String.format("%1.4f", SerialComm_ZDHJ.dev_param_resparam_d[2]));
                tf_respm_d4.setText(String.format("%1.4f", SerialComm_ZDHJ.dev_param_resparam_d[3]));
                
                tf_respm_s1.setText(String.format("%1.4f", SerialComm_ZDHJ.dev_param_resparam_s[0]));
                tf_respm_s2.setText(String.format("%1.4f", SerialComm_ZDHJ.dev_param_resparam_s[1]));
                tf_respm_s3.setText(String.format("%1.4f", SerialComm_ZDHJ.dev_param_resparam_s[2]));
                tf_respm_s4.setText(String.format("%1.4f", SerialComm_ZDHJ.dev_param_resparam_s[3]));
            }
            
            String inf_t = "";
            if(Math.abs(new Date().getTime() - SerialComm_ZDHJ.dt_cmd_ack_time.getTime()) < (1000*5)) {
                inf_t = SPCommZDHJ.ZDHJ_OP_REST_INF_TEXT[SerialComm_ZDHJ.dt_cmd_ack]
                        + " @ " + Com.get_DTF(SerialComm_ZDHJ.dt_cmd_ack_time, Com.DTF_YMDhms);
                if(LANG_TYPE_EN == LANG_TYPE) {
                    inf_t = SPCommZDHJ.ZDHJ_OP_REST_INF_TEXT_EN[SerialComm_ZDHJ.dt_cmd_ack]
                            + " @ " + Com.get_DTF(SerialComm_ZDHJ.dt_cmd_ack_time, Com.DTF_YMDhms);
                }
            }
            tf_param_set_inf.setText(inf_t);
        }
    }
}