Ver código fonte

APL Cold Start 추가 / 양식변경

APL Excel 양식 변경 /
 BMA Ref 값 변경 /
 GPS Cold Start 인식 문자열 추가 /
 Sensor Usim 값 앞의 6자리 버리는 기능 추가 /
SN Write 할 때 Label에 입력하도록 수정 /GPS Cold Start 입력 할 수 있도록 수정 /
Catm1 ,Sensor 쓰레드로 동작 하도록 수정 /
Sensor 부분 Complete 알림 위치 변경 /
Sensor 부분 BLE DatagridView 추가
 - MesseageBox 추가  후 BLE 입력 할 수 있도록 수정
 - Save 후 Ble 값 도 Null 값으로 바꾸도록 수정 /

IMEI USIM PHONE NUM Excel에 입력 유무 CheckBox 추가 /
Sensor 부분 작업 완료 후 Excel File Open 유무 CheckBox/버튼 추가/
Data 부적합 시 왜 부적합인지 Value 나오도록 수정 /
만약 Sninsert 바코드 부분에서 만약 잘못 바코드 찍으면 다시 바코드 입력 하도록 MessageBox 띄어주는 문장 추가 /
SN Rewrite 기능 추가 /
SN Write 기능 추가/
 SN Read 기능 추가/
YJ 5 anos atrás
pai
commit
10bca010e3

+ 509 - 312
Main.Designer.cs

@@ -61,26 +61,40 @@
61 61
             this.label_Catm1Test = new System.Windows.Forms.Label();
62 62
             this.panel_GpsMode = new System.Windows.Forms.Panel();
63 63
             this.label_GPSTest = new System.Windows.Forms.Label();
64
-            this.panel_GpsTest = new System.Windows.Forms.Panel();
65
-            this.button_GpsTestSave = new System.Windows.Forms.Button();
66
-            this.richTextBox_Gps = new System.Windows.Forms.RichTextBox();
67
-            this.checkBox_GPGSV = new System.Windows.Forms.CheckBox();
68
-            this.dataGridView_Gps = new System.Windows.Forms.DataGridView();
69
-            this.Gps_SerialNumber = new System.Windows.Forms.DataGridViewTextBoxColumn();
70
-            this.dataGridViewTextBoxColumn8 = new System.Windows.Forms.DataGridViewTextBoxColumn();
71
-            this.LimitMax = new System.Windows.Forms.DataGridViewTextBoxColumn();
72
-            this.LimitMin = new System.Windows.Forms.DataGridViewTextBoxColumn();
73
-            this.Sec = new System.Windows.Forms.DataGridViewTextBoxColumn();
74
-            this.MaxSec = new System.Windows.Forms.DataGridViewTextBoxColumn();
75
-            this.MinSec = new System.Windows.Forms.DataGridViewTextBoxColumn();
76
-            this.panel_SnTest = new System.Windows.Forms.Panel();
77
-            this.dataGridView_SnInsert = new System.Windows.Forms.DataGridView();
78
-            this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
79
-            this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
80
-            this.dataGridViewTextBoxColumn3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
81 64
             this.panel_SensorTest = new System.Windows.Forms.Panel();
65
+            this.checkBox_Usim_Imei_Phone_Num = new System.Windows.Forms.CheckBox();
66
+            this.button_Rewrite = new System.Windows.Forms.Button();
67
+            this.textBox_PrevNum = new System.Windows.Forms.TextBox();
68
+            this.textBox_AfterNum = new System.Windows.Forms.TextBox();
69
+            this.button_SnRead = new System.Windows.Forms.Button();
70
+            this.numericUpDown_ExcelOpenDelay = new System.Windows.Forms.NumericUpDown();
71
+            this.button_ExcelOpen = new System.Windows.Forms.Button();
72
+            this.checkBox_ExcelOpen = new System.Windows.Forms.CheckBox();
82 73
             this.richTextBox_Sensor = new System.Windows.Forms.RichTextBox();
83 74
             this.dataGridView_Sensor = new System.Windows.Forms.DataGridView();
75
+            this.ProductNumber = new System.Windows.Forms.DataGridViewTextBoxColumn();
76
+            this.SN = new System.Windows.Forms.DataGridViewTextBoxColumn();
77
+            this.IMEI = new System.Windows.Forms.DataGridViewTextBoxColumn();
78
+            this.Phone = new System.Windows.Forms.DataGridViewTextBoxColumn();
79
+            this.USIM = new System.Windows.Forms.DataGridViewTextBoxColumn();
80
+            this.Version = new System.Windows.Forms.DataGridViewTextBoxColumn();
81
+            this.BatteryVoltage = new System.Windows.Forms.DataGridViewTextBoxColumn();
82
+            this.SystemVoltage = new System.Windows.Forms.DataGridViewTextBoxColumn();
83
+            this.Temp = new System.Windows.Forms.DataGridViewTextBoxColumn();
84
+            this.BMA_X = new System.Windows.Forms.DataGridViewTextBoxColumn();
85
+            this.BMA_Y = new System.Windows.Forms.DataGridViewTextBoxColumn();
86
+            this.BMA_Z = new System.Windows.Forms.DataGridViewTextBoxColumn();
87
+            this.BLE = new System.Windows.Forms.DataGridViewTextBoxColumn();
88
+            this.BattMin = new System.Windows.Forms.DataGridViewTextBoxColumn();
89
+            this.SystemVoltmin = new System.Windows.Forms.DataGridViewTextBoxColumn();
90
+            this.TempMax = new System.Windows.Forms.DataGridViewTextBoxColumn();
91
+            this.TempMin = new System.Windows.Forms.DataGridViewTextBoxColumn();
92
+            this.BMAX_Max = new System.Windows.Forms.DataGridViewTextBoxColumn();
93
+            this.BMAX_Min = new System.Windows.Forms.DataGridViewTextBoxColumn();
94
+            this.BMAY_Max = new System.Windows.Forms.DataGridViewTextBoxColumn();
95
+            this.BMAY_Min = new System.Windows.Forms.DataGridViewTextBoxColumn();
96
+            this.BMAZ_Max = new System.Windows.Forms.DataGridViewTextBoxColumn();
97
+            this.BMAZ_Min = new System.Windows.Forms.DataGridViewTextBoxColumn();
84 98
             this.panel_MergeMain = new System.Windows.Forms.Panel();
85 99
             this.label7 = new System.Windows.Forms.Label();
86 100
             this.label_Cnt = new System.Windows.Forms.Label();
@@ -112,31 +126,31 @@
112 126
             this.dataGridView_Chk = new System.Windows.Forms.DataGridView();
113 127
             this.button_FileFindLoad = new System.Windows.Forms.Button();
114 128
             this.progressBar2 = new System.Windows.Forms.ProgressBar();
129
+            this.panel_GpsTest = new System.Windows.Forms.Panel();
130
+            this.button_GpsClear = new System.Windows.Forms.Button();
131
+            this.button_GpsTestSave = new System.Windows.Forms.Button();
132
+            this.checkBox_GPGSV = new System.Windows.Forms.CheckBox();
133
+            this.dataGridView_Gps = new System.Windows.Forms.DataGridView();
134
+            this.Gps_SerialNumber = new System.Windows.Forms.DataGridViewTextBoxColumn();
135
+            this.dataGridViewTextBoxColumn8 = new System.Windows.Forms.DataGridViewTextBoxColumn();
136
+            this.LimitMax = new System.Windows.Forms.DataGridViewTextBoxColumn();
137
+            this.LimitMin = new System.Windows.Forms.DataGridViewTextBoxColumn();
138
+            this.Sec = new System.Windows.Forms.DataGridViewTextBoxColumn();
139
+            this.MaxSec = new System.Windows.Forms.DataGridViewTextBoxColumn();
140
+            this.MinSec = new System.Windows.Forms.DataGridViewTextBoxColumn();
141
+            this.richTextBox_Gps = new System.Windows.Forms.RichTextBox();
142
+            this.panel_SnTest = new System.Windows.Forms.Panel();
143
+            this.radioButton_Usim = new System.Windows.Forms.RadioButton();
144
+            this.radioButton_Imei = new System.Windows.Forms.RadioButton();
145
+            this.dataGridView_SnInsert = new System.Windows.Forms.DataGridView();
146
+            this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
147
+            this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
148
+            this.dataGridViewTextBoxColumn3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
115 149
             this.folderBrowserDialog_Mainpath = new System.Windows.Forms.FolderBrowserDialog();
116 150
             this.openFileDialog = new System.Windows.Forms.OpenFileDialog();
117
-            this.timer1 = new System.Windows.Forms.Timer(this.components);
118
-            this.ProductNumber = new System.Windows.Forms.DataGridViewTextBoxColumn();
119
-            this.SN = new System.Windows.Forms.DataGridViewTextBoxColumn();
120
-            this.IMEI = new System.Windows.Forms.DataGridViewTextBoxColumn();
121
-            this.Phone = new System.Windows.Forms.DataGridViewTextBoxColumn();
122
-            this.USIM = new System.Windows.Forms.DataGridViewTextBoxColumn();
123
-            this.Version = new System.Windows.Forms.DataGridViewTextBoxColumn();
124
-            this.BatteryVoltage = new System.Windows.Forms.DataGridViewTextBoxColumn();
125
-            this.SystemVoltage = new System.Windows.Forms.DataGridViewTextBoxColumn();
126
-            this.Temp = new System.Windows.Forms.DataGridViewTextBoxColumn();
127
-            this.BMA_X = new System.Windows.Forms.DataGridViewTextBoxColumn();
128
-            this.BMA_Y = new System.Windows.Forms.DataGridViewTextBoxColumn();
129
-            this.BMA_Z = new System.Windows.Forms.DataGridViewTextBoxColumn();
130
-            this.BattMin = new System.Windows.Forms.DataGridViewTextBoxColumn();
131
-            this.SystemVoltmin = new System.Windows.Forms.DataGridViewTextBoxColumn();
132
-            this.TempMax = new System.Windows.Forms.DataGridViewTextBoxColumn();
133
-            this.TempMin = new System.Windows.Forms.DataGridViewTextBoxColumn();
134
-            this.BMAX_Max = new System.Windows.Forms.DataGridViewTextBoxColumn();
135
-            this.BMAX_Min = new System.Windows.Forms.DataGridViewTextBoxColumn();
136
-            this.BMAY_Max = new System.Windows.Forms.DataGridViewTextBoxColumn();
137
-            this.BMAY_Min = new System.Windows.Forms.DataGridViewTextBoxColumn();
138
-            this.BMAZ_Max = new System.Windows.Forms.DataGridViewTextBoxColumn();
139
-            this.BMAZ_Min = new System.Windows.Forms.DataGridViewTextBoxColumn();
151
+            this.textBox_Write = new System.Windows.Forms.TextBox();
152
+            this.button_Write = new System.Windows.Forms.Button();
153
+            this.label_SerialWrite = new System.Windows.Forms.Label();
140 154
             this.panel_Main.SuspendLayout();
141 155
             this.panel4.SuspendLayout();
142 156
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox5)).BeginInit();
@@ -150,11 +164,8 @@
150 164
             this.panel_SensorMode.SuspendLayout();
151 165
             this.panel_Catm1Mode.SuspendLayout();
152 166
             this.panel_GpsMode.SuspendLayout();
153
-            this.panel_GpsTest.SuspendLayout();
154
-            ((System.ComponentModel.ISupportInitialize)(this.dataGridView_Gps)).BeginInit();
155
-            this.panel_SnTest.SuspendLayout();
156
-            ((System.ComponentModel.ISupportInitialize)(this.dataGridView_SnInsert)).BeginInit();
157 167
             this.panel_SensorTest.SuspendLayout();
168
+            ((System.ComponentModel.ISupportInitialize)(this.numericUpDown_ExcelOpenDelay)).BeginInit();
158 169
             ((System.ComponentModel.ISupportInitialize)(this.dataGridView_Sensor)).BeginInit();
159 170
             this.panel_MergeMain.SuspendLayout();
160 171
             ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit();
@@ -162,6 +173,10 @@
162 173
             ((System.ComponentModel.ISupportInitialize)(this.dataGridView_Catm1)).BeginInit();
163 174
             this.panel_SnCheckMain.SuspendLayout();
164 175
             ((System.ComponentModel.ISupportInitialize)(this.dataGridView_Chk)).BeginInit();
176
+            this.panel_GpsTest.SuspendLayout();
177
+            ((System.ComponentModel.ISupportInitialize)(this.dataGridView_Gps)).BeginInit();
178
+            this.panel_SnTest.SuspendLayout();
179
+            ((System.ComponentModel.ISupportInitialize)(this.dataGridView_SnInsert)).BeginInit();
165 180
             this.SuspendLayout();
166 181
             // 
167 182
             // serialPort
@@ -171,6 +186,7 @@
171 186
             // panel_Main
172 187
             // 
173 188
             this.panel_Main.BackColor = System.Drawing.Color.SkyBlue;
189
+            this.panel_Main.Controls.Add(this.label_SerialWrite);
174 190
             this.panel_Main.Controls.Add(this.button_Path);
175 191
             this.panel_Main.Controls.Add(this.button_Clear);
176 192
             this.panel_Main.Controls.Add(this.checkBox_Edit);
@@ -553,159 +569,18 @@
553 569
             this.label_GPSTest.MouseLeave += new System.EventHandler(this.label_Check_MouseLeave);
554 570
             this.label_GPSTest.MouseMove += new System.Windows.Forms.MouseEventHandler(this.label_GPSTest_MouseMove);
555 571
             // 
556
-            // panel_GpsTest
557
-            // 
558
-            this.panel_GpsTest.Controls.Add(this.button_GpsTestSave);
559
-            this.panel_GpsTest.Controls.Add(this.checkBox_GPGSV);
560
-            this.panel_GpsTest.Controls.Add(this.dataGridView_Gps);
561
-            this.panel_GpsTest.Controls.Add(this.richTextBox_Gps);
562
-            this.panel_GpsTest.Location = new System.Drawing.Point(149, 44);
563
-            this.panel_GpsTest.Name = "panel_GpsTest";
564
-            this.panel_GpsTest.Size = new System.Drawing.Size(1202, 599);
565
-            this.panel_GpsTest.TabIndex = 86;
566
-            // 
567
-            // button_GpsTestSave
568
-            // 
569
-            this.button_GpsTestSave.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(159)))), ((int)(((byte)(200)))));
570
-            this.button_GpsTestSave.Font = new System.Drawing.Font("굴림", 16F, System.Drawing.FontStyle.Bold);
571
-            this.button_GpsTestSave.Location = new System.Drawing.Point(921, 1);
572
-            this.button_GpsTestSave.Name = "button_GpsTestSave";
573
-            this.button_GpsTestSave.Size = new System.Drawing.Size(272, 58);
574
-            this.button_GpsTestSave.TabIndex = 89;
575
-            this.button_GpsTestSave.Text = "SAVE";
576
-            this.button_GpsTestSave.UseVisualStyleBackColor = false;
577
-            this.button_GpsTestSave.Click += new System.EventHandler(this.button_GpsTestSave_Click);
578
-            // 
579
-            // richTextBox_Gps
580
-            // 
581
-            this.richTextBox_Gps.BackColor = System.Drawing.SystemColors.ActiveCaptionText;
582
-            this.richTextBox_Gps.Font = new System.Drawing.Font("나눔고딕", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
583
-            this.richTextBox_Gps.ForeColor = System.Drawing.Color.Yellow;
584
-            this.richTextBox_Gps.Location = new System.Drawing.Point(26, 67);
585
-            this.richTextBox_Gps.Name = "richTextBox_Gps";
586
-            this.richTextBox_Gps.Size = new System.Drawing.Size(1167, 500);
587
-            this.richTextBox_Gps.TabIndex = 26;
588
-            this.richTextBox_Gps.Text = "";
589
-            // 
590
-            // checkBox_GPGSV
591
-            // 
592
-            this.checkBox_GPGSV.AutoSize = true;
593
-            this.checkBox_GPGSV.Location = new System.Drawing.Point(26, 573);
594
-            this.checkBox_GPGSV.Name = "checkBox_GPGSV";
595
-            this.checkBox_GPGSV.Size = new System.Drawing.Size(106, 16);
596
-            this.checkBox_GPGSV.TabIndex = 88;
597
-            this.checkBox_GPGSV.Text = "GPGSV  Mode";
598
-            this.checkBox_GPGSV.UseVisualStyleBackColor = true;
599
-            // 
600
-            // dataGridView_Gps
601
-            // 
602
-            this.dataGridView_Gps.AllowUserToAddRows = false;
603
-            this.dataGridView_Gps.BackgroundColor = System.Drawing.Color.Gray;
604
-            this.dataGridView_Gps.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
605
-            this.dataGridView_Gps.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
606
-            this.Gps_SerialNumber,
607
-            this.dataGridViewTextBoxColumn8,
608
-            this.LimitMax,
609
-            this.LimitMin,
610
-            this.Sec,
611
-            this.MaxSec,
612
-            this.MinSec});
613
-            this.dataGridView_Gps.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(159)))), ((int)(((byte)(230)))));
614
-            this.dataGridView_Gps.Location = new System.Drawing.Point(26, 3);
615
-            this.dataGridView_Gps.Name = "dataGridView_Gps";
616
-            this.dataGridView_Gps.RowTemplate.Height = 23;
617
-            this.dataGridView_Gps.Size = new System.Drawing.Size(889, 56);
618
-            this.dataGridView_Gps.TabIndex = 15;
619
-            this.dataGridView_Gps.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_Gps_CellClick);
620
-            this.dataGridView_Gps.KeyDown += new System.Windows.Forms.KeyEventHandler(this.dataGridView_Gps_KeyDown);
621
-            // 
622
-            // Gps_SerialNumber
623
-            // 
624
-            this.Gps_SerialNumber.HeaderText = "생산번호";
625
-            this.Gps_SerialNumber.Name = "Gps_SerialNumber";
626
-            // 
627
-            // dataGridViewTextBoxColumn8
628
-            // 
629
-            this.dataGridViewTextBoxColumn8.HeaderText = "GPS SNR";
630
-            this.dataGridViewTextBoxColumn8.Name = "dataGridViewTextBoxColumn8";
631
-            // 
632
-            // LimitMax
633
-            // 
634
-            this.LimitMax.HeaderText = "Maximum";
635
-            this.LimitMax.Name = "LimitMax";
636
-            // 
637
-            // LimitMin
638
-            // 
639
-            this.LimitMin.HeaderText = "Minimum";
640
-            this.LimitMin.Name = "LimitMin";
641
-            // 
642
-            // Sec
643
-            // 
644
-            this.Sec.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
645
-            this.Sec.HeaderText = "Sec";
646
-            this.Sec.Name = "Sec";
647
-            this.Sec.Width = 52;
648
-            // 
649
-            // MaxSec
650
-            // 
651
-            this.MaxSec.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
652
-            this.MaxSec.HeaderText = "MaxSec";
653
-            this.MaxSec.Name = "MaxSec";
654
-            this.MaxSec.Width = 77;
655
-            // 
656
-            // MinSec
657
-            // 
658
-            this.MinSec.HeaderText = "MinSec";
659
-            this.MinSec.Name = "MinSec";
660
-            // 
661
-            // panel_SnTest
662
-            // 
663
-            this.panel_SnTest.Controls.Add(this.dataGridView_SnInsert);
664
-            this.panel_SnTest.Location = new System.Drawing.Point(163, 44);
665
-            this.panel_SnTest.Name = "panel_SnTest";
666
-            this.panel_SnTest.Size = new System.Drawing.Size(1207, 599);
667
-            this.panel_SnTest.TabIndex = 31;
668
-            // 
669
-            // dataGridView_SnInsert
670
-            // 
671
-            this.dataGridView_SnInsert.AllowUserToAddRows = false;
672
-            this.dataGridView_SnInsert.BackgroundColor = System.Drawing.Color.Gray;
673
-            this.dataGridView_SnInsert.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
674
-            this.dataGridView_SnInsert.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
675
-            this.dataGridViewTextBoxColumn1,
676
-            this.dataGridViewTextBoxColumn2,
677
-            this.dataGridViewTextBoxColumn3});
678
-            this.dataGridView_SnInsert.GridColor = System.Drawing.Color.Green;
679
-            this.dataGridView_SnInsert.Location = new System.Drawing.Point(20, 3);
680
-            this.dataGridView_SnInsert.Name = "dataGridView_SnInsert";
681
-            this.dataGridView_SnInsert.RowTemplate.Height = 23;
682
-            this.dataGridView_SnInsert.Size = new System.Drawing.Size(1170, 564);
683
-            this.dataGridView_SnInsert.TabIndex = 15;
684
-            this.dataGridView_SnInsert.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_SnInsert_CellClick);
685
-            // 
686
-            // dataGridViewTextBoxColumn1
687
-            // 
688
-            this.dataGridViewTextBoxColumn1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
689
-            this.dataGridViewTextBoxColumn1.HeaderText = "생산번호";
690
-            this.dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1";
691
-            this.dataGridViewTextBoxColumn1.Width = 78;
692
-            // 
693
-            // dataGridViewTextBoxColumn2
694
-            // 
695
-            this.dataGridViewTextBoxColumn2.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
696
-            this.dataGridViewTextBoxColumn2.HeaderText = "일련번호";
697
-            this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2";
698
-            this.dataGridViewTextBoxColumn2.Width = 78;
699
-            // 
700
-            // dataGridViewTextBoxColumn3
701
-            // 
702
-            this.dataGridViewTextBoxColumn3.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
703
-            this.dataGridViewTextBoxColumn3.HeaderText = "IMEI";
704
-            this.dataGridViewTextBoxColumn3.Name = "dataGridViewTextBoxColumn3";
705
-            this.dataGridViewTextBoxColumn3.Width = 55;
706
-            // 
707 572
             // panel_SensorTest
708 573
             // 
574
+            this.panel_SensorTest.Controls.Add(this.checkBox_Usim_Imei_Phone_Num);
575
+            this.panel_SensorTest.Controls.Add(this.button_Write);
576
+            this.panel_SensorTest.Controls.Add(this.button_Rewrite);
577
+            this.panel_SensorTest.Controls.Add(this.textBox_PrevNum);
578
+            this.panel_SensorTest.Controls.Add(this.textBox_Write);
579
+            this.panel_SensorTest.Controls.Add(this.textBox_AfterNum);
580
+            this.panel_SensorTest.Controls.Add(this.button_SnRead);
581
+            this.panel_SensorTest.Controls.Add(this.numericUpDown_ExcelOpenDelay);
582
+            this.panel_SensorTest.Controls.Add(this.button_ExcelOpen);
583
+            this.panel_SensorTest.Controls.Add(this.checkBox_ExcelOpen);
709 584
             this.panel_SensorTest.Controls.Add(this.richTextBox_Sensor);
710 585
             this.panel_SensorTest.Controls.Add(this.dataGridView_Sensor);
711 586
             this.panel_SensorTest.Location = new System.Drawing.Point(149, 44);
@@ -713,6 +588,92 @@
713 588
             this.panel_SensorTest.Size = new System.Drawing.Size(1207, 599);
714 589
             this.panel_SensorTest.TabIndex = 27;
715 590
             // 
591
+            // checkBox_Usim_Imei_Phone_Num
592
+            // 
593
+            this.checkBox_Usim_Imei_Phone_Num.AutoSize = true;
594
+            this.checkBox_Usim_Imei_Phone_Num.Checked = true;
595
+            this.checkBox_Usim_Imei_Phone_Num.CheckState = System.Windows.Forms.CheckState.Checked;
596
+            this.checkBox_Usim_Imei_Phone_Num.Location = new System.Drawing.Point(739, 574);
597
+            this.checkBox_Usim_Imei_Phone_Num.Name = "checkBox_Usim_Imei_Phone_Num";
598
+            this.checkBox_Usim_Imei_Phone_Num.Size = new System.Drawing.Size(145, 16);
599
+            this.checkBox_Usim_Imei_Phone_Num.TabIndex = 99;
600
+            this.checkBox_Usim_Imei_Phone_Num.Text = "USIM Default Number";
601
+            this.checkBox_Usim_Imei_Phone_Num.UseVisualStyleBackColor = true;
602
+            // 
603
+            // button_Rewrite
604
+            // 
605
+            this.button_Rewrite.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(159)))), ((int)(((byte)(200)))));
606
+            this.button_Rewrite.Location = new System.Drawing.Point(238, 571);
607
+            this.button_Rewrite.Name = "button_Rewrite";
608
+            this.button_Rewrite.Size = new System.Drawing.Size(75, 23);
609
+            this.button_Rewrite.TabIndex = 98;
610
+            this.button_Rewrite.Text = "Rewrite";
611
+            this.button_Rewrite.UseVisualStyleBackColor = false;
612
+            this.button_Rewrite.Click += new System.EventHandler(this.button_Rewrite_Click);
613
+            // 
614
+            // textBox_PrevNum
615
+            // 
616
+            this.textBox_PrevNum.Location = new System.Drawing.Point(26, 571);
617
+            this.textBox_PrevNum.Name = "textBox_PrevNum";
618
+            this.textBox_PrevNum.Size = new System.Drawing.Size(100, 21);
619
+            this.textBox_PrevNum.TabIndex = 97;
620
+            // 
621
+            // textBox_AfterNum
622
+            // 
623
+            this.textBox_AfterNum.Location = new System.Drawing.Point(132, 571);
624
+            this.textBox_AfterNum.Name = "textBox_AfterNum";
625
+            this.textBox_AfterNum.Size = new System.Drawing.Size(100, 21);
626
+            this.textBox_AfterNum.TabIndex = 97;
627
+            // 
628
+            // button_SnRead
629
+            // 
630
+            this.button_SnRead.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(159)))), ((int)(((byte)(200)))));
631
+            this.button_SnRead.Location = new System.Drawing.Point(480, 571);
632
+            this.button_SnRead.Name = "button_SnRead";
633
+            this.button_SnRead.Size = new System.Drawing.Size(75, 23);
634
+            this.button_SnRead.TabIndex = 96;
635
+            this.button_SnRead.Text = "SN Read";
636
+            this.button_SnRead.UseVisualStyleBackColor = false;
637
+            this.button_SnRead.Click += new System.EventHandler(this.button_SnRead_Click);
638
+            // 
639
+            // numericUpDown_ExcelOpenDelay
640
+            // 
641
+            this.numericUpDown_ExcelOpenDelay.Location = new System.Drawing.Point(886, 570);
642
+            this.numericUpDown_ExcelOpenDelay.Maximum = new decimal(new int[] {
643
+            10000,
644
+            0,
645
+            0,
646
+            0});
647
+            this.numericUpDown_ExcelOpenDelay.Name = "numericUpDown_ExcelOpenDelay";
648
+            this.numericUpDown_ExcelOpenDelay.Size = new System.Drawing.Size(120, 21);
649
+            this.numericUpDown_ExcelOpenDelay.TabIndex = 95;
650
+            this.numericUpDown_ExcelOpenDelay.Value = new decimal(new int[] {
651
+            3000,
652
+            0,
653
+            0,
654
+            0});
655
+            // 
656
+            // button_ExcelOpen
657
+            // 
658
+            this.button_ExcelOpen.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(159)))), ((int)(((byte)(200)))));
659
+            this.button_ExcelOpen.Location = new System.Drawing.Point(565, 571);
660
+            this.button_ExcelOpen.Name = "button_ExcelOpen";
661
+            this.button_ExcelOpen.Size = new System.Drawing.Size(75, 23);
662
+            this.button_ExcelOpen.TabIndex = 94;
663
+            this.button_ExcelOpen.Text = "ExcelOpen";
664
+            this.button_ExcelOpen.UseVisualStyleBackColor = false;
665
+            this.button_ExcelOpen.Click += new System.EventHandler(this.button_ExcelOpen_Click);
666
+            // 
667
+            // checkBox_ExcelOpen
668
+            // 
669
+            this.checkBox_ExcelOpen.AutoSize = true;
670
+            this.checkBox_ExcelOpen.Location = new System.Drawing.Point(646, 575);
671
+            this.checkBox_ExcelOpen.Name = "checkBox_ExcelOpen";
672
+            this.checkBox_ExcelOpen.Size = new System.Drawing.Size(86, 16);
673
+            this.checkBox_ExcelOpen.TabIndex = 93;
674
+            this.checkBox_ExcelOpen.Text = "ExcelOpen";
675
+            this.checkBox_ExcelOpen.UseVisualStyleBackColor = true;
676
+            // 
716 677
             // richTextBox_Sensor
717 678
             // 
718 679
             this.richTextBox_Sensor.BackColor = System.Drawing.SystemColors.ActiveCaptionText;
@@ -742,6 +703,7 @@
742 703
             this.BMA_X,
743 704
             this.BMA_Y,
744 705
             this.BMA_Z,
706
+            this.BLE,
745 707
             this.BattMin,
746 708
             this.SystemVoltmin,
747 709
             this.TempMax,
@@ -760,25 +722,162 @@
760 722
             this.dataGridView_Sensor.TabIndex = 15;
761 723
             this.dataGridView_Sensor.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_Sensor_CellClick);
762 724
             // 
763
-            // panel_MergeMain
725
+            // ProductNumber
764 726
             // 
765
-            this.panel_MergeMain.Controls.Add(this.label7);
766
-            this.panel_MergeMain.Controls.Add(this.label_Cnt);
767
-            this.panel_MergeMain.Controls.Add(this.numericUpDown1);
768
-            this.panel_MergeMain.Controls.Add(this.button_Merge);
769
-            this.panel_MergeMain.Controls.Add(this.button_PrevFile);
770
-            this.panel_MergeMain.Controls.Add(this.button_AfterFile);
771
-            this.panel_MergeMain.Controls.Add(this.listBox_AfterFile);
772
-            this.panel_MergeMain.Controls.Add(this.listBox_PreviousFile);
773
-            this.panel_MergeMain.Controls.Add(this.progressBar_Merge);
774
-            this.panel_MergeMain.Location = new System.Drawing.Point(160, 44);
775
-            this.panel_MergeMain.Name = "panel_MergeMain";
776
-            this.panel_MergeMain.Size = new System.Drawing.Size(1202, 599);
777
-            this.panel_MergeMain.TabIndex = 88;
727
+            this.ProductNumber.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
728
+            this.ProductNumber.HeaderText = "생산번호";
729
+            this.ProductNumber.Name = "ProductNumber";
730
+            this.ProductNumber.Width = 78;
778 731
             // 
779
-            // label7
732
+            // SN
780 733
             // 
781
-            this.label7.AutoSize = true;
734
+            this.SN.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
735
+            this.SN.HeaderText = "일련번호";
736
+            this.SN.Name = "SN";
737
+            this.SN.Width = 78;
738
+            // 
739
+            // IMEI
740
+            // 
741
+            this.IMEI.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
742
+            this.IMEI.HeaderText = "IMEI";
743
+            this.IMEI.Name = "IMEI";
744
+            this.IMEI.Width = 55;
745
+            // 
746
+            // Phone
747
+            // 
748
+            this.Phone.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
749
+            this.Phone.HeaderText = "Phone";
750
+            this.Phone.Name = "Phone";
751
+            this.Phone.Width = 66;
752
+            // 
753
+            // USIM
754
+            // 
755
+            this.USIM.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
756
+            this.USIM.HeaderText = "USIM";
757
+            this.USIM.Name = "USIM";
758
+            this.USIM.Width = 60;
759
+            // 
760
+            // Version
761
+            // 
762
+            this.Version.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
763
+            this.Version.HeaderText = "버전";
764
+            this.Version.Name = "Version";
765
+            this.Version.Width = 54;
766
+            // 
767
+            // BatteryVoltage
768
+            // 
769
+            this.BatteryVoltage.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
770
+            this.BatteryVoltage.HeaderText = "BatteryVoltage";
771
+            this.BatteryVoltage.Name = "BatteryVoltage";
772
+            this.BatteryVoltage.Width = 111;
773
+            // 
774
+            // SystemVoltage
775
+            // 
776
+            this.SystemVoltage.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
777
+            this.SystemVoltage.HeaderText = "SystemVoltage";
778
+            this.SystemVoltage.Name = "SystemVoltage";
779
+            this.SystemVoltage.Width = 115;
780
+            // 
781
+            // Temp
782
+            // 
783
+            this.Temp.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
784
+            this.Temp.HeaderText = "온도";
785
+            this.Temp.Name = "Temp";
786
+            this.Temp.Width = 54;
787
+            // 
788
+            // BMA_X
789
+            // 
790
+            this.BMA_X.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
791
+            this.BMA_X.HeaderText = "가속도 X";
792
+            this.BMA_X.Name = "BMA_X";
793
+            this.BMA_X.Width = 78;
794
+            // 
795
+            // BMA_Y
796
+            // 
797
+            this.BMA_Y.HeaderText = "가속도 Y";
798
+            this.BMA_Y.Name = "BMA_Y";
799
+            // 
800
+            // BMA_Z
801
+            // 
802
+            this.BMA_Z.HeaderText = "가속도 Z";
803
+            this.BMA_Z.Name = "BMA_Z";
804
+            // 
805
+            // BLE
806
+            // 
807
+            this.BLE.HeaderText = "BLE";
808
+            this.BLE.Name = "BLE";
809
+            // 
810
+            // BattMin
811
+            // 
812
+            this.BattMin.HeaderText = "BattMin";
813
+            this.BattMin.Name = "BattMin";
814
+            // 
815
+            // SystemVoltmin
816
+            // 
817
+            this.SystemVoltmin.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
818
+            this.SystemVoltmin.HeaderText = "SystemVoltmin";
819
+            this.SystemVoltmin.Name = "SystemVoltmin";
820
+            this.SystemVoltmin.Width = 115;
821
+            // 
822
+            // TempMax
823
+            // 
824
+            this.TempMax.HeaderText = "TempMax";
825
+            this.TempMax.Name = "TempMax";
826
+            // 
827
+            // TempMin
828
+            // 
829
+            this.TempMin.HeaderText = "TempMin";
830
+            this.TempMin.Name = "TempMin";
831
+            // 
832
+            // BMAX_Max
833
+            // 
834
+            this.BMAX_Max.HeaderText = "BMAX_Max";
835
+            this.BMAX_Max.Name = "BMAX_Max";
836
+            // 
837
+            // BMAX_Min
838
+            // 
839
+            this.BMAX_Min.HeaderText = "BMAX_Min";
840
+            this.BMAX_Min.Name = "BMAX_Min";
841
+            // 
842
+            // BMAY_Max
843
+            // 
844
+            this.BMAY_Max.HeaderText = "BMAY_Max";
845
+            this.BMAY_Max.Name = "BMAY_Max";
846
+            // 
847
+            // BMAY_Min
848
+            // 
849
+            this.BMAY_Min.HeaderText = "BMAY_Min";
850
+            this.BMAY_Min.Name = "BMAY_Min";
851
+            // 
852
+            // BMAZ_Max
853
+            // 
854
+            this.BMAZ_Max.HeaderText = "BMAZ_Max";
855
+            this.BMAZ_Max.Name = "BMAZ_Max";
856
+            // 
857
+            // BMAZ_Min
858
+            // 
859
+            this.BMAZ_Min.HeaderText = "BMAZ_Min";
860
+            this.BMAZ_Min.Name = "BMAZ_Min";
861
+            // 
862
+            // panel_MergeMain
863
+            // 
864
+            this.panel_MergeMain.Controls.Add(this.label7);
865
+            this.panel_MergeMain.Controls.Add(this.label_Cnt);
866
+            this.panel_MergeMain.Controls.Add(this.numericUpDown1);
867
+            this.panel_MergeMain.Controls.Add(this.button_Merge);
868
+            this.panel_MergeMain.Controls.Add(this.button_PrevFile);
869
+            this.panel_MergeMain.Controls.Add(this.button_AfterFile);
870
+            this.panel_MergeMain.Controls.Add(this.listBox_AfterFile);
871
+            this.panel_MergeMain.Controls.Add(this.listBox_PreviousFile);
872
+            this.panel_MergeMain.Controls.Add(this.progressBar_Merge);
873
+            this.panel_MergeMain.Location = new System.Drawing.Point(160, 44);
874
+            this.panel_MergeMain.Name = "panel_MergeMain";
875
+            this.panel_MergeMain.Size = new System.Drawing.Size(1202, 599);
876
+            this.panel_MergeMain.TabIndex = 88;
877
+            // 
878
+            // label7
879
+            // 
880
+            this.label7.AutoSize = true;
782 881
             this.label7.Location = new System.Drawing.Point(119, 31);
783 882
             this.label7.Name = "label7";
784 883
             this.label7.Size = new System.Drawing.Size(29, 12);
@@ -1073,145 +1172,226 @@
1073 1172
             this.progressBar2.Size = new System.Drawing.Size(1159, 40);
1074 1173
             this.progressBar2.TabIndex = 0;
1075 1174
             // 
1076
-            // openFileDialog
1077
-            // 
1078
-            this.openFileDialog.Multiselect = true;
1175
+            // panel_GpsTest
1079 1176
             // 
1080
-            // timer1
1177
+            this.panel_GpsTest.Controls.Add(this.button_GpsClear);
1178
+            this.panel_GpsTest.Controls.Add(this.button_GpsTestSave);
1179
+            this.panel_GpsTest.Controls.Add(this.checkBox_GPGSV);
1180
+            this.panel_GpsTest.Controls.Add(this.dataGridView_Gps);
1181
+            this.panel_GpsTest.Controls.Add(this.richTextBox_Gps);
1182
+            this.panel_GpsTest.Location = new System.Drawing.Point(149, 44);
1183
+            this.panel_GpsTest.Name = "panel_GpsTest";
1184
+            this.panel_GpsTest.Size = new System.Drawing.Size(1202, 599);
1185
+            this.panel_GpsTest.TabIndex = 86;
1081 1186
             // 
1082
-            this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
1187
+            // button_GpsClear
1083 1188
             // 
1084
-            // ProductNumber
1189
+            this.button_GpsClear.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(159)))), ((int)(((byte)(200)))));
1190
+            this.button_GpsClear.Font = new System.Drawing.Font("굴림", 16F, System.Drawing.FontStyle.Bold);
1191
+            this.button_GpsClear.Location = new System.Drawing.Point(1073, 4);
1192
+            this.button_GpsClear.Name = "button_GpsClear";
1193
+            this.button_GpsClear.Size = new System.Drawing.Size(121, 58);
1194
+            this.button_GpsClear.TabIndex = 90;
1195
+            this.button_GpsClear.Text = "Clear";
1196
+            this.button_GpsClear.UseVisualStyleBackColor = false;
1197
+            this.button_GpsClear.Click += new System.EventHandler(this.button_GpsClear_Click);
1085 1198
             // 
1086
-            this.ProductNumber.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
1087
-            this.ProductNumber.HeaderText = "생산번호";
1088
-            this.ProductNumber.Name = "ProductNumber";
1089
-            this.ProductNumber.Width = 78;
1090
-            // 
1091
-            // SN
1092
-            // 
1093
-            this.SN.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
1094
-            this.SN.HeaderText = "일련번호";
1095
-            this.SN.Name = "SN";
1096
-            this.SN.Width = 78;
1199
+            // button_GpsTestSave
1097 1200
             // 
1098
-            // IMEI
1201
+            this.button_GpsTestSave.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(159)))), ((int)(((byte)(200)))));
1202
+            this.button_GpsTestSave.Font = new System.Drawing.Font("굴림", 16F, System.Drawing.FontStyle.Bold);
1203
+            this.button_GpsTestSave.Location = new System.Drawing.Point(921, 4);
1204
+            this.button_GpsTestSave.Name = "button_GpsTestSave";
1205
+            this.button_GpsTestSave.Size = new System.Drawing.Size(124, 58);
1206
+            this.button_GpsTestSave.TabIndex = 89;
1207
+            this.button_GpsTestSave.Text = "SAVE";
1208
+            this.button_GpsTestSave.UseVisualStyleBackColor = false;
1209
+            this.button_GpsTestSave.Click += new System.EventHandler(this.button_GpsTestSave_Click);
1099 1210
             // 
1100
-            this.IMEI.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
1101
-            this.IMEI.HeaderText = "IMEI";
1102
-            this.IMEI.Name = "IMEI";
1103
-            this.IMEI.Width = 55;
1211
+            // checkBox_GPGSV
1104 1212
             // 
1105
-            // Phone
1213
+            this.checkBox_GPGSV.AutoSize = true;
1214
+            this.checkBox_GPGSV.Location = new System.Drawing.Point(26, 573);
1215
+            this.checkBox_GPGSV.Name = "checkBox_GPGSV";
1216
+            this.checkBox_GPGSV.Size = new System.Drawing.Size(106, 16);
1217
+            this.checkBox_GPGSV.TabIndex = 88;
1218
+            this.checkBox_GPGSV.Text = "GPGSV  Mode";
1219
+            this.checkBox_GPGSV.UseVisualStyleBackColor = true;
1106 1220
             // 
1107
-            this.Phone.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
1108
-            this.Phone.HeaderText = "Phone";
1109
-            this.Phone.Name = "Phone";
1110
-            this.Phone.Width = 66;
1221
+            // dataGridView_Gps
1111 1222
             // 
1112
-            // USIM
1223
+            this.dataGridView_Gps.AllowUserToAddRows = false;
1224
+            this.dataGridView_Gps.BackgroundColor = System.Drawing.Color.Gray;
1225
+            this.dataGridView_Gps.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
1226
+            this.dataGridView_Gps.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
1227
+            this.Gps_SerialNumber,
1228
+            this.dataGridViewTextBoxColumn8,
1229
+            this.LimitMax,
1230
+            this.LimitMin,
1231
+            this.Sec,
1232
+            this.MaxSec,
1233
+            this.MinSec});
1234
+            this.dataGridView_Gps.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(159)))), ((int)(((byte)(230)))));
1235
+            this.dataGridView_Gps.Location = new System.Drawing.Point(26, 3);
1236
+            this.dataGridView_Gps.Name = "dataGridView_Gps";
1237
+            this.dataGridView_Gps.RowTemplate.Height = 23;
1238
+            this.dataGridView_Gps.Size = new System.Drawing.Size(889, 56);
1239
+            this.dataGridView_Gps.TabIndex = 15;
1240
+            this.dataGridView_Gps.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_Gps_CellClick);
1241
+            this.dataGridView_Gps.KeyDown += new System.Windows.Forms.KeyEventHandler(this.dataGridView_Gps_KeyDown);
1113 1242
             // 
1114
-            this.USIM.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
1115
-            this.USIM.HeaderText = "USIM";
1116
-            this.USIM.Name = "USIM";
1117
-            this.USIM.Width = 60;
1243
+            // Gps_SerialNumber
1118 1244
             // 
1119
-            // Version
1245
+            this.Gps_SerialNumber.HeaderText = "생산번호";
1246
+            this.Gps_SerialNumber.Name = "Gps_SerialNumber";
1120 1247
             // 
1121
-            this.Version.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
1122
-            this.Version.HeaderText = "버전";
1123
-            this.Version.Name = "Version";
1124
-            this.Version.Width = 54;
1248
+            // dataGridViewTextBoxColumn8
1125 1249
             // 
1126
-            // BatteryVoltage
1250
+            this.dataGridViewTextBoxColumn8.HeaderText = "GPS SNR";
1251
+            this.dataGridViewTextBoxColumn8.Name = "dataGridViewTextBoxColumn8";
1127 1252
             // 
1128
-            this.BatteryVoltage.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
1129
-            this.BatteryVoltage.HeaderText = "BatteryVoltage";
1130
-            this.BatteryVoltage.Name = "BatteryVoltage";
1131
-            this.BatteryVoltage.Width = 111;
1253
+            // LimitMax
1132 1254
             // 
1133
-            // SystemVoltage
1255
+            this.LimitMax.HeaderText = "Maximum";
1256
+            this.LimitMax.Name = "LimitMax";
1134 1257
             // 
1135
-            this.SystemVoltage.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
1136
-            this.SystemVoltage.HeaderText = "SystemVoltage";
1137
-            this.SystemVoltage.Name = "SystemVoltage";
1138
-            this.SystemVoltage.Width = 115;
1258
+            // LimitMin
1139 1259
             // 
1140
-            // Temp
1260
+            this.LimitMin.HeaderText = "Minimum";
1261
+            this.LimitMin.Name = "LimitMin";
1141 1262
             // 
1142
-            this.Temp.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
1143
-            this.Temp.HeaderText = "온도";
1144
-            this.Temp.Name = "Temp";
1145
-            this.Temp.Width = 54;
1263
+            // Sec
1146 1264
             // 
1147
-            // BMA_X
1265
+            this.Sec.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
1266
+            this.Sec.HeaderText = "Sec";
1267
+            this.Sec.Name = "Sec";
1268
+            this.Sec.Width = 52;
1148 1269
             // 
1149
-            this.BMA_X.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
1150
-            this.BMA_X.HeaderText = "가속도 X";
1151
-            this.BMA_X.Name = "BMA_X";
1152
-            this.BMA_X.Width = 78;
1270
+            // MaxSec
1153 1271
             // 
1154
-            // BMA_Y
1272
+            this.MaxSec.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
1273
+            this.MaxSec.HeaderText = "MaxSec";
1274
+            this.MaxSec.Name = "MaxSec";
1275
+            this.MaxSec.Width = 77;
1155 1276
             // 
1156
-            this.BMA_Y.HeaderText = "가속도 Y";
1157
-            this.BMA_Y.Name = "BMA_Y";
1277
+            // MinSec
1158 1278
             // 
1159
-            // BMA_Z
1279
+            this.MinSec.HeaderText = "MinSec";
1280
+            this.MinSec.Name = "MinSec";
1160 1281
             // 
1161
-            this.BMA_Z.HeaderText = "가속도 Z";
1162
-            this.BMA_Z.Name = "BMA_Z";
1282
+            // richTextBox_Gps
1163 1283
             // 
1164
-            // BattMin
1284
+            this.richTextBox_Gps.BackColor = System.Drawing.SystemColors.ActiveCaptionText;
1285
+            this.richTextBox_Gps.Font = new System.Drawing.Font("나눔고딕", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
1286
+            this.richTextBox_Gps.ForeColor = System.Drawing.Color.Yellow;
1287
+            this.richTextBox_Gps.Location = new System.Drawing.Point(26, 67);
1288
+            this.richTextBox_Gps.Name = "richTextBox_Gps";
1289
+            this.richTextBox_Gps.Size = new System.Drawing.Size(1167, 500);
1290
+            this.richTextBox_Gps.TabIndex = 26;
1291
+            this.richTextBox_Gps.Text = "";
1165 1292
             // 
1166
-            this.BattMin.HeaderText = "BattMin";
1167
-            this.BattMin.Name = "BattMin";
1293
+            // panel_SnTest
1168 1294
             // 
1169
-            // SystemVoltmin
1295
+            this.panel_SnTest.Controls.Add(this.radioButton_Usim);
1296
+            this.panel_SnTest.Controls.Add(this.radioButton_Imei);
1297
+            this.panel_SnTest.Controls.Add(this.dataGridView_SnInsert);
1298
+            this.panel_SnTest.Location = new System.Drawing.Point(163, 44);
1299
+            this.panel_SnTest.Name = "panel_SnTest";
1300
+            this.panel_SnTest.Size = new System.Drawing.Size(1207, 599);
1301
+            this.panel_SnTest.TabIndex = 31;
1170 1302
             // 
1171
-            this.SystemVoltmin.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
1172
-            this.SystemVoltmin.HeaderText = "SystemVoltmin";
1173
-            this.SystemVoltmin.Name = "SystemVoltmin";
1174
-            this.SystemVoltmin.Width = 115;
1303
+            // radioButton_Usim
1304
+            // 
1305
+            this.radioButton_Usim.AutoSize = true;
1306
+            this.radioButton_Usim.Location = new System.Drawing.Point(150, 4);
1307
+            this.radioButton_Usim.Name = "radioButton_Usim";
1308
+            this.radioButton_Usim.Size = new System.Drawing.Size(53, 16);
1309
+            this.radioButton_Usim.TabIndex = 17;
1310
+            this.radioButton_Usim.Text = "USIM";
1311
+            this.radioButton_Usim.UseVisualStyleBackColor = true;
1312
+            this.radioButton_Usim.CheckedChanged += new System.EventHandler(this.radioButton_Usim_CheckedChanged);
1313
+            // 
1314
+            // radioButton_Imei
1315
+            // 
1316
+            this.radioButton_Imei.AutoSize = true;
1317
+            this.radioButton_Imei.Checked = true;
1318
+            this.radioButton_Imei.Location = new System.Drawing.Point(51, 4);
1319
+            this.radioButton_Imei.Name = "radioButton_Imei";
1320
+            this.radioButton_Imei.Size = new System.Drawing.Size(48, 16);
1321
+            this.radioButton_Imei.TabIndex = 16;
1322
+            this.radioButton_Imei.TabStop = true;
1323
+            this.radioButton_Imei.Text = "IMEI";
1324
+            this.radioButton_Imei.UseVisualStyleBackColor = true;
1325
+            this.radioButton_Imei.CheckedChanged += new System.EventHandler(this.radioButton_Imei_CheckedChanged);
1175 1326
             // 
1176
-            // TempMax
1327
+            // dataGridView_SnInsert
1177 1328
             // 
1178
-            this.TempMax.HeaderText = "TempMax";
1179
-            this.TempMax.Name = "TempMax";
1329
+            this.dataGridView_SnInsert.AllowUserToAddRows = false;
1330
+            this.dataGridView_SnInsert.BackgroundColor = System.Drawing.Color.Gray;
1331
+            this.dataGridView_SnInsert.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
1332
+            this.dataGridView_SnInsert.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
1333
+            this.dataGridViewTextBoxColumn1,
1334
+            this.dataGridViewTextBoxColumn2,
1335
+            this.dataGridViewTextBoxColumn3});
1336
+            this.dataGridView_SnInsert.GridColor = System.Drawing.Color.Green;
1337
+            this.dataGridView_SnInsert.Location = new System.Drawing.Point(20, 31);
1338
+            this.dataGridView_SnInsert.Name = "dataGridView_SnInsert";
1339
+            this.dataGridView_SnInsert.RowTemplate.Height = 23;
1340
+            this.dataGridView_SnInsert.Size = new System.Drawing.Size(1170, 536);
1341
+            this.dataGridView_SnInsert.TabIndex = 15;
1342
+            this.dataGridView_SnInsert.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_SnInsert_CellClick);
1180 1343
             // 
1181
-            // TempMin
1344
+            // dataGridViewTextBoxColumn1
1182 1345
             // 
1183
-            this.TempMin.HeaderText = "TempMin";
1184
-            this.TempMin.Name = "TempMin";
1346
+            this.dataGridViewTextBoxColumn1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
1347
+            this.dataGridViewTextBoxColumn1.HeaderText = "생산번호";
1348
+            this.dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1";
1349
+            this.dataGridViewTextBoxColumn1.Width = 78;
1185 1350
             // 
1186
-            // BMAX_Max
1351
+            // dataGridViewTextBoxColumn2
1187 1352
             // 
1188
-            this.BMAX_Max.HeaderText = "BMAX_Max";
1189
-            this.BMAX_Max.Name = "BMAX_Max";
1353
+            this.dataGridViewTextBoxColumn2.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
1354
+            this.dataGridViewTextBoxColumn2.HeaderText = "일련번호";
1355
+            this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2";
1356
+            this.dataGridViewTextBoxColumn2.Width = 78;
1190 1357
             // 
1191
-            // BMAX_Min
1358
+            // dataGridViewTextBoxColumn3
1192 1359
             // 
1193
-            this.BMAX_Min.HeaderText = "BMAX_Min";
1194
-            this.BMAX_Min.Name = "BMAX_Min";
1360
+            this.dataGridViewTextBoxColumn3.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
1361
+            this.dataGridViewTextBoxColumn3.HeaderText = "IMEI";
1362
+            this.dataGridViewTextBoxColumn3.Name = "dataGridViewTextBoxColumn3";
1363
+            this.dataGridViewTextBoxColumn3.Width = 55;
1195 1364
             // 
1196
-            // BMAY_Max
1365
+            // openFileDialog
1197 1366
             // 
1198
-            this.BMAY_Max.HeaderText = "BMAY_Max";
1199
-            this.BMAY_Max.Name = "BMAY_Max";
1367
+            this.openFileDialog.Multiselect = true;
1200 1368
             // 
1201
-            // BMAY_Min
1369
+            // textBox_Write
1202 1370
             // 
1203
-            this.BMAY_Min.HeaderText = "BMAY_Min";
1204
-            this.BMAY_Min.Name = "BMAY_Min";
1371
+            this.textBox_Write.Location = new System.Drawing.Point(316, 571);
1372
+            this.textBox_Write.Name = "textBox_Write";
1373
+            this.textBox_Write.Size = new System.Drawing.Size(80, 21);
1374
+            this.textBox_Write.TabIndex = 97;
1205 1375
             // 
1206
-            // BMAZ_Max
1376
+            // button_Write
1207 1377
             // 
1208
-            this.BMAZ_Max.HeaderText = "BMAZ_Max";
1209
-            this.BMAZ_Max.Name = "BMAZ_Max";
1378
+            this.button_Write.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(159)))), ((int)(((byte)(200)))));
1379
+            this.button_Write.Location = new System.Drawing.Point(402, 571);
1380
+            this.button_Write.Name = "button_Write";
1381
+            this.button_Write.Size = new System.Drawing.Size(75, 23);
1382
+            this.button_Write.TabIndex = 98;
1383
+            this.button_Write.Text = "Write";
1384
+            this.button_Write.UseVisualStyleBackColor = false;
1385
+            this.button_Write.Click += new System.EventHandler(this.button_Write_Click);
1210 1386
             // 
1211
-            // BMAZ_Min
1387
+            // label_SerialWrite
1212 1388
             // 
1213
-            this.BMAZ_Min.HeaderText = "BMAZ_Min";
1214
-            this.BMAZ_Min.Name = "BMAZ_Min";
1389
+            this.label_SerialWrite.AutoSize = true;
1390
+            this.label_SerialWrite.Font = new System.Drawing.Font("굴림", 10F, System.Drawing.FontStyle.Bold);
1391
+            this.label_SerialWrite.Location = new System.Drawing.Point(366, 17);
1392
+            this.label_SerialWrite.Name = "label_SerialWrite";
1393
+            this.label_SerialWrite.Size = new System.Drawing.Size(0, 14);
1394
+            this.label_SerialWrite.TabIndex = 93;
1215 1395
             // 
1216 1396
             // Main
1217 1397
             // 
@@ -1247,12 +1427,9 @@
1247 1427
             this.panel_Catm1Mode.PerformLayout();
1248 1428
             this.panel_GpsMode.ResumeLayout(false);
1249 1429
             this.panel_GpsMode.PerformLayout();
1250
-            this.panel_GpsTest.ResumeLayout(false);
1251
-            this.panel_GpsTest.PerformLayout();
1252
-            ((System.ComponentModel.ISupportInitialize)(this.dataGridView_Gps)).EndInit();
1253
-            this.panel_SnTest.ResumeLayout(false);
1254
-            ((System.ComponentModel.ISupportInitialize)(this.dataGridView_SnInsert)).EndInit();
1255 1430
             this.panel_SensorTest.ResumeLayout(false);
1431
+            this.panel_SensorTest.PerformLayout();
1432
+            ((System.ComponentModel.ISupportInitialize)(this.numericUpDown_ExcelOpenDelay)).EndInit();
1256 1433
             ((System.ComponentModel.ISupportInitialize)(this.dataGridView_Sensor)).EndInit();
1257 1434
             this.panel_MergeMain.ResumeLayout(false);
1258 1435
             this.panel_MergeMain.PerformLayout();
@@ -1262,6 +1439,12 @@
1262 1439
             this.panel_SnCheckMain.ResumeLayout(false);
1263 1440
             this.panel_SnCheckMain.PerformLayout();
1264 1441
             ((System.ComponentModel.ISupportInitialize)(this.dataGridView_Chk)).EndInit();
1442
+            this.panel_GpsTest.ResumeLayout(false);
1443
+            this.panel_GpsTest.PerformLayout();
1444
+            ((System.ComponentModel.ISupportInitialize)(this.dataGridView_Gps)).EndInit();
1445
+            this.panel_SnTest.ResumeLayout(false);
1446
+            this.panel_SnTest.PerformLayout();
1447
+            ((System.ComponentModel.ISupportInitialize)(this.dataGridView_SnInsert)).EndInit();
1265 1448
             this.ResumeLayout(false);
1266 1449
 
1267 1450
         }
@@ -1344,7 +1527,6 @@
1344 1527
         private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn3;
1345 1528
         private System.Windows.Forms.Panel panel_Sninsert;
1346 1529
         private System.Windows.Forms.Label label_Sninsert;
1347
-        private System.Windows.Forms.Timer timer1;
1348 1530
         private System.Windows.Forms.DataGridViewTextBoxColumn Gps_SerialNumber;
1349 1531
         private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn8;
1350 1532
         private System.Windows.Forms.DataGridViewTextBoxColumn LimitMax;
@@ -1352,6 +1534,17 @@
1352 1534
         private System.Windows.Forms.DataGridViewTextBoxColumn Sec;
1353 1535
         private System.Windows.Forms.DataGridViewTextBoxColumn MaxSec;
1354 1536
         private System.Windows.Forms.DataGridViewTextBoxColumn MinSec;
1537
+        private System.Windows.Forms.Button button_GpsClear;
1538
+        private System.Windows.Forms.RadioButton radioButton_Usim;
1539
+        private System.Windows.Forms.RadioButton radioButton_Imei;
1540
+        private System.Windows.Forms.CheckBox checkBox_ExcelOpen;
1541
+        private System.Windows.Forms.Button button_ExcelOpen;
1542
+        private System.Windows.Forms.NumericUpDown numericUpDown_ExcelOpenDelay;
1543
+        private System.Windows.Forms.Button button_SnRead;
1544
+        private System.Windows.Forms.Button button_Rewrite;
1545
+        private System.Windows.Forms.TextBox textBox_PrevNum;
1546
+        private System.Windows.Forms.TextBox textBox_AfterNum;
1547
+        private System.Windows.Forms.CheckBox checkBox_Usim_Imei_Phone_Num;
1355 1548
         private System.Windows.Forms.DataGridViewTextBoxColumn ProductNumber;
1356 1549
         private System.Windows.Forms.DataGridViewTextBoxColumn SN;
1357 1550
         private System.Windows.Forms.DataGridViewTextBoxColumn IMEI;
@@ -1364,6 +1557,7 @@
1364 1557
         private System.Windows.Forms.DataGridViewTextBoxColumn BMA_X;
1365 1558
         private System.Windows.Forms.DataGridViewTextBoxColumn BMA_Y;
1366 1559
         private System.Windows.Forms.DataGridViewTextBoxColumn BMA_Z;
1560
+        private System.Windows.Forms.DataGridViewTextBoxColumn BLE;
1367 1561
         private System.Windows.Forms.DataGridViewTextBoxColumn BattMin;
1368 1562
         private System.Windows.Forms.DataGridViewTextBoxColumn SystemVoltmin;
1369 1563
         private System.Windows.Forms.DataGridViewTextBoxColumn TempMax;
@@ -1374,6 +1568,9 @@
1374 1568
         private System.Windows.Forms.DataGridViewTextBoxColumn BMAY_Min;
1375 1569
         private System.Windows.Forms.DataGridViewTextBoxColumn BMAZ_Max;
1376 1570
         private System.Windows.Forms.DataGridViewTextBoxColumn BMAZ_Min;
1571
+        private System.Windows.Forms.Button button_Write;
1572
+        private System.Windows.Forms.TextBox textBox_Write;
1573
+        private System.Windows.Forms.Label label_SerialWrite;
1377 1574
     }
1378 1575
 }
1379 1576
 

+ 293 - 89
Main.cs

@@ -17,6 +17,7 @@ using Microsoft.WindowsAPICodePack.Dialogs;
17 17
 using System.Threading;
18 18
 using System.Data.OleDb;
19 19
 using System.Collections;
20
+using System.Diagnostics;
20 21
 
21 22
 
22 23
 //using Microsoft.Office.Interop.Excel;
@@ -209,12 +210,12 @@ namespace APL_TestCheck
209 210
             dataGridView_Gps.Rows[0].Cells[6].Value = "0";
210 211
 
211 212
 
212
-            dataGridView_Sensor.Rows[0].Cells[16].Value = "50"; //BMA X  MAX
213
-            dataGridView_Sensor.Rows[0].Cells[17].Value = "-100";//BMA X  MIN
214
-            dataGridView_Sensor.Rows[0].Cells[18].Value = "50";//BMA Y  MAX
215
-            dataGridView_Sensor.Rows[0].Cells[19].Value = "-100";//BMA X  MIN
216
-            dataGridView_Sensor.Rows[0].Cells[20].Value = null;//BMA X  MAX
217
-            dataGridView_Sensor.Rows[0].Cells[21].Value = "950";//BMA X  MIN
213
+            dataGridView_Sensor.Rows[0].Cells[17].Value = "70"; //BMA X  MAX
214
+            dataGridView_Sensor.Rows[0].Cells[18].Value = "-100";//BMA X  MIN
215
+            dataGridView_Sensor.Rows[0].Cells[19].Value = "70";//BMA Y  MAX
216
+            dataGridView_Sensor.Rows[0].Cells[20].Value = "-100";//BMA X  MIN
217
+            dataGridView_Sensor.Rows[0].Cells[21].Value = null;//BMA X  MAX
218
+            dataGridView_Sensor.Rows[0].Cells[22].Value = "950";//BMA X  MIN
218 219
 
219 220
 
220 221
             panel_GpsTest.Visible = true;
@@ -253,6 +254,7 @@ namespace APL_TestCheck
253 254
 
254 255
         }
255 256
         private delegate void StringSend(string Text);
257
+        private delegate void GridviewSend(ref object gridview,string Text);
256 258
         private delegate void ByteSend(byte[] Text);
257 259
 
258 260
         string startStr = "V";
@@ -547,7 +549,7 @@ namespace APL_TestCheck
547 549
             string[] GPGGA_sp = str.Split(',');
548 550
             int Losscount = 0;
549 551
             int location1, location2, LastLocation, SentenceCount;
550
-            int GPGGA_Location,ColdTime = 0;
552
+            int GPGGA_Location,GNGGA_Location, ColdTime = 0;
551 553
             bool SaveOk = false;
552 554
             try
553 555
             {
@@ -564,10 +566,15 @@ namespace APL_TestCheck
564 566
                 }
565 567
                 */
566 568
                 GPGGA_Location = str.IndexOf("$GPGGA");
569
+                GNGGA_Location = str.IndexOf("$GNGGA");
567 570
                 //  SentenceCount = WordNum(str, "GPGGA");
568 571
                 //ColdTime = Convert.ToInt32(dataGridView_Sensor.Rows[0].Cells[4].Value);
569
-                if (GPGGA_Location != -1)
572
+                if (GPGGA_Location != -1 || GNGGA_Location != -1)
570 573
                 {
574
+                    if(GNGGA_Location != -1)
575
+                    {
576
+                        GPGGA_Location = GNGGA_Location;
577
+                    }
571 578
                     str = str.Substring(GPGGA_Location);
572 579
                     location2 = str.IndexOf("\r\n");
573 580
                     splitstr = str.Substring(location2 + 2);
@@ -591,6 +598,17 @@ namespace APL_TestCheck
591 598
                     {
592 599
                         ColdCnt++;
593 600
                         dataGridView_Gps.Rows[0].Cells[4].Value = ColdCnt.ToString();
601
+
602
+
603
+                        gps_arrangecnt = 0;
604
+                        //ColdCnt = 0;
605
+                       // GPGGA_Cnt = 0;
606
+                        Gps_CurrentCount = 0;
607
+                        Gps_Arrange[10] = 0;
608
+                        dataGridView_Gps.Rows[0].Cells[0].Value = null;
609
+                        dataGridView_Gps.Rows[0].Cells[1].Value = null;
610
+                       // dataGridView_Gps.Rows[0].Cells[4].Value = null;
611
+                        dataGridView_Gps.Refresh();
594 612
                         return "";
595 613
                     }
596 614
 
@@ -658,7 +676,7 @@ namespace APL_TestCheck
658 676
 
659 677
                         }
660 678
                     }
661
-                    if(gps_arrangecnt == 10 && dataGridView_Gps.Rows[0].Cells[1].Value == null)
679
+                    if(gps_arrangecnt >= 10 && dataGridView_Gps.Rows[0].Cells[1].Value == null)
662 680
                     {
663 681
                         for (int retcnt = 0; retcnt < 10; retcnt++)
664 682
                         {
@@ -667,6 +685,7 @@ namespace APL_TestCheck
667 685
                         }
668 686
                         Gps_Arrange[10] = Gps_Arrange[10] / 10;
669 687
                         dataGridView_Gps.Rows[0].Cells[1].Value = Gps_Arrange[10].ToString();
688
+                        Gps_Arrange[10] = 0;
670 689
                     }
671 690
                     str = null;
672 691
                     for (int a = 0; a < SentenceCount; a++)
@@ -727,7 +746,7 @@ namespace APL_TestCheck
727 746
                     dataGridView_Sensor.Rows[0].Cells[5].Value = sp[0]; //version
728 747
                     dataGridView_Sensor.Rows[0].Cells[2].Value = "8627850" + sp[2]; //,IMEI
729 748
                     dataGridView_Sensor.Rows[0].Cells[3].Value = sp[3];//, Phone Number, 
730
-                    dataGridView_Sensor.Rows[0].Cells[4].Value = sp[4];//USIM Number
749
+                    dataGridView_Sensor.Rows[0].Cells[4].Value = sp[4].Substring(6);//USIM Number
731 750
                     dataGridView_Sensor.Rows[0].Cells[6].Value = sp[5];//, Battery Voltage,
732 751
                     dataGridView_Sensor.Rows[0].Cells[7].Value = sp[6];// System Voltage, 
733 752
                     dataGridView_Sensor.Rows[0].Cells[8].Value = sp[7];//Temp, BMA400 값 출력 x, y, z
@@ -759,8 +778,12 @@ namespace APL_TestCheck
759 778
                         if (dataGridView_Sensor.Rows[0].Cells[1].Value != null)
760 779
                         {
761 780
                             //dataGridView_Sensor.Rows[0].Cells[1].Value = Name = value;
762
-                            if (dataGridView_Sensor.Rows[0].Cells[1].Value.ToString().Length == 7)
781
+                            if (dataGridView_Sensor.Rows[0].Cells[1].Value.ToString().Length == 7
782
+                                && Convert.ToInt32(dataGridView_Sensor.Rows[0].Cells[1].Value) > 0)
783
+                            {
763 784
                                 serialPort.Write("APLSN Write:" + dataGridView_Sensor.Rows[0].Cells[1].Value.ToString() + "\r\n");
785
+                                label_SerialWrite.Text = "APLSN Write:" + dataGridView_Sensor.Rows[0].Cells[1].Value.ToString() + "\r\n";
786
+                            }
764 787
                             else
765 788
                                 MessageBox.Show("SKT SN이 틀립니다.");
766 789
                         }
@@ -930,14 +953,14 @@ namespace APL_TestCheck
930 953
         string FileSaveSet = null;
931 954
 
932 955
 
933
-        void Gps_ThreadRun(string dst, object Value1, object Value2)
956
+        void Gps_ThreadRun(string dst, object Value1, object Value2, object Value3)
934 957
         {
935 958
             //DST    : 위치
936 959
             //Value1 : 생산 번호
937 960
             //Value2 : SNR
938 961
             Thread Gps_thread = new Thread(delegate ()
939 962
             {
940
-                Gps_DataxlsWrite(dst, Value1, Value2);
963
+                Gps_DataxlsWrite(dst, Value1, Value2, Value3);
941 964
             });
942 965
             Gps_thread.Start();
943 966
         }
@@ -963,11 +986,11 @@ namespace APL_TestCheck
963 986
             //Value2 : Modem Ver
964 987
             //Value3 : RSRP
965 988
             //Value4 : RSRQ
966
-            Thread Catm1_thread = new Thread(delegate ()
989
+            Thread Sensor_thread = new Thread(delegate ()
967 990
             {
968 991
                 Sensor_DataxlsWrite(data);
969 992
             });
970
-            Catm1_thread.Start();
993
+            Sensor_thread.Start();
971 994
 
972 995
         }
973 996
         void Sninsert_ThreadRun(object[] data)
@@ -985,6 +1008,7 @@ namespace APL_TestCheck
985 1008
 
986 1009
 
987 1010
         //Thread rTh_Gps;
1011
+        string CurrentExcelFilePath = null;
988 1012
         private void button_GpsTestSave_Click(object sender, EventArgs e)
989 1013
         {
990 1014
             //rTh_Gps = new Thread(new ParameterizedThreadStart(Gps_DataxlsWrite));
@@ -1014,7 +1038,7 @@ namespace APL_TestCheck
1014 1038
             }
1015 1039
             string Ref_Xls_File = new System.IO.DirectoryInfo(System.Windows.Forms.Application.StartupPath).ToString();
1016 1040
             string Dst_Xls_File = null;
1017
-            Ref_Xls_File = Ref_Xls_File + @"\APL_200305.xls";
1041
+            Ref_Xls_File = Ref_Xls_File + @"\APL_200307.xls";
1018 1042
             FileInfo SrcfileInfo = new FileInfo(Ref_Xls_File);
1019 1043
             FileInfo DstfileInfo;
1020 1044
 
@@ -1057,6 +1081,7 @@ namespace APL_TestCheck
1057 1081
                         else
1058 1082
                         {
1059 1083
                             File.Copy(Ref_Xls_File, Dst_Xls_File);
1084
+                            
1060 1085
                             Thread.Sleep(2000);
1061 1086
                         }
1062 1087
                     }
@@ -1074,11 +1099,12 @@ namespace APL_TestCheck
1074 1099
             }
1075 1100
             // rTh_Gps.Start();
1076 1101
             //Gps_DataxlsWrite(Dst_Xls_File, dataGridView_Gps.Rows[0].Cells[0].Value, dataGridView_Gps.Rows[0].Cells[1].Value);
1077
-            Gps_ThreadRun(Dst_Xls_File, dataGridView_Gps.Rows[0].Cells[0].Value, dataGridView_Gps.Rows[0].Cells[1].Value);
1102
+            Gps_ThreadRun(Dst_Xls_File, dataGridView_Gps.Rows[0].Cells[0].Value, dataGridView_Gps.Rows[0].Cells[1].Value, dataGridView_Gps.Rows[0].Cells[4].Value);
1078 1103
             dataGridView_Gps.Rows[0].Cells[0].Value = null;
1079 1104
             dataGridView_Gps.Rows[0].Cells[1].Value = null;
1080 1105
             dataGridView_Gps.Rows[0].Cells[4].Value = null;
1081 1106
             dataGridView_Gps.Refresh();
1107
+            AutoClosingMessageBox.Show("완료 되었습니다.", "알림", 1000);
1082 1108
             //   if (!di.Exists) { di.Create(); }
1083 1109
             //string tmppath = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
1084 1110
 #if false
@@ -1101,7 +1127,7 @@ namespace APL_TestCheck
1101 1127
         private void button_SensorTestSave()
1102 1128
         {
1103 1129
             string CheckProductionNum = null;
1104
-            object[] data = new object[13];// 0 :파일위치
1130
+            object[] data = new object[15];// 0 :파일위치
1105 1131
             AutoClosingMessageBox.Show("저장 중.....", "알림", 1000);
1106 1132
 
1107 1133
             try
@@ -1126,7 +1152,7 @@ namespace APL_TestCheck
1126 1152
             }
1127 1153
             string Ref_Xls_File = new System.IO.DirectoryInfo(System.Windows.Forms.Application.StartupPath).ToString();
1128 1154
             string Dst_Xls_File = null;
1129
-            Ref_Xls_File = Ref_Xls_File + @"\APL_200305.xls";
1155
+            Ref_Xls_File = Ref_Xls_File + @"\APL_200307.xls";
1130 1156
             FileInfo SrcfileInfo = new FileInfo(Ref_Xls_File);
1131 1157
             FileInfo DstfileInfo;
1132 1158
 
@@ -1145,6 +1171,7 @@ namespace APL_TestCheck
1145 1171
                         // File Copy 후 Data 입력 
1146 1172
                         Dst_Xls_File = FileSaveSet + @"\" + dataGridView_Sensor.Rows[0].Cells[0].Value.ToString() + @".xls";
1147 1173
                         DstfileInfo = new FileInfo(Dst_Xls_File);
1174
+                        CurrentExcelFilePath = Dst_Xls_File;
1148 1175
                         if (DstfileInfo.Exists)
1149 1176
                         {
1150 1177
                             if (MessageBox.Show("이미 파일이 있습니다.\r\n 덮어씌우겠습니까?", "YesOrNo", MessageBoxButtons.YesNo) == DialogResult.Yes)
@@ -1168,6 +1195,7 @@ namespace APL_TestCheck
1168 1195
                         else
1169 1196
                         {
1170 1197
                             File.Copy(Ref_Xls_File, Dst_Xls_File);
1198
+                           
1171 1199
                             Thread.Sleep(2000);
1172 1200
                         }
1173 1201
                     }
@@ -1185,18 +1213,20 @@ namespace APL_TestCheck
1185 1213
             }
1186 1214
             //
1187 1215
             data[0] = Dst_Xls_File;
1188
-            for (int i = 0; i < 12; i++)
1216
+            for (int i = 0; i < 13; i++)
1189 1217
                 data[i + 1] = dataGridView_Sensor.Rows[0].Cells[i].Value;
1190 1218
 
1191 1219
             //Sensor_DataxlsWrite();
1192 1220
             Sensor_ThreadRun(data);
1193
-            AutoClosingMessageBox.Show("완료 되었습니다.", "알림", 1000);
1221
+            
1194 1222
 
1195 1223
 
1196
-            for (int i = 0; i < 12; i++)
1224
+            for (int i = 0; i < 13; i++)
1197 1225
                 dataGridView_Sensor.Rows[0].Cells[i].Value = null;
1198 1226
 
1199 1227
             dataGridView_Sensor.Refresh();
1228
+
1229
+
1200 1230
             //  dataGridView_Sensor.Rows[0].Cells[0].Value = null;
1201 1231
             // dataGridView_Sensor.Rows[0].Cells[1].Value = null;
1202 1232
 
@@ -1242,7 +1272,7 @@ namespace APL_TestCheck
1242 1272
             }
1243 1273
             string Ref_Xls_File = new System.IO.DirectoryInfo(System.Windows.Forms.Application.StartupPath).ToString();
1244 1274
             string Dst_Xls_File = null;
1245
-            Ref_Xls_File = Ref_Xls_File + @"\APL_200305.xls";
1275
+            Ref_Xls_File = Ref_Xls_File + @"\APL_200307.xls";
1246 1276
             FileInfo SrcfileInfo = new FileInfo(Ref_Xls_File);
1247 1277
             FileInfo DstfileInfo;
1248 1278
 
@@ -1354,7 +1384,7 @@ namespace APL_TestCheck
1354 1384
             }
1355 1385
             string Ref_Xls_File = new System.IO.DirectoryInfo(System.Windows.Forms.Application.StartupPath).ToString();
1356 1386
             string Dst_Xls_File = null;
1357
-            Ref_Xls_File = Ref_Xls_File + @"\APL_200305.xls";
1387
+            Ref_Xls_File = Ref_Xls_File + @"\APL_200307.xls";
1358 1388
             FileInfo SrcfileInfo = new FileInfo(Ref_Xls_File);
1359 1389
             FileInfo DstfileInfo;
1360 1390
 
@@ -1413,16 +1443,31 @@ namespace APL_TestCheck
1413 1443
             }
1414 1444
             //
1415 1445
             data[0] = Dst_Xls_File;
1416
-            for (int i = 0; i < 3; i++)
1417
-                data[i + 1] = dataGridView_SnInsert.Rows[0].Cells[i].Value;
1446
+            if (radioButton_Imei.Checked == true)
1447
+            {
1448
+                for (int i = 0; i < 3; i++)
1449
+                    data[i + 1] = dataGridView_SnInsert.Rows[0].Cells[i].Value;
1450
+            }
1451
+            else
1452
+            {
1453
+                for (int i = 0; i < 2; i++)
1454
+                    data[i + 1] = dataGridView_SnInsert.Rows[0].Cells[i].Value;
1455
+            }
1418 1456
 
1419 1457
             //Sensor_DataxlsWrite();
1420 1458
             Sninsert_ThreadRun(data);
1421 1459
             AutoClosingMessageBox.Show("완료 되었습니다.", "알림", 1000);
1422 1460
 
1423
-
1424
-            for (int i = 0; i < 3; i++)
1425
-                dataGridView_SnInsert.Rows[0].Cells[i].Value = null;
1461
+            if (radioButton_Imei.Checked == true)
1462
+            {
1463
+                for (int i = 0; i < 3; i++)
1464
+                    dataGridView_SnInsert.Rows[0].Cells[i].Value = null;
1465
+            }
1466
+            else
1467
+            {
1468
+                for (int i = 0; i < 2; i++)
1469
+                    dataGridView_SnInsert.Rows[0].Cells[i].Value = null;
1470
+            }
1426 1471
 
1427 1472
             dataGridView_SnInsert.Refresh();
1428 1473
             //  dataGridView_Sensor.Rows[0].Cells[0].Value = null;
@@ -1462,7 +1507,7 @@ namespace APL_TestCheck
1462 1507
         Excel.Application ExcelApp = null;
1463 1508
         Excel.Workbook wb = null;
1464 1509
         Excel.Worksheet ws = null;
1465
-        private void Gps_DataxlsWrite(object dst, object Value1, object Value2)
1510
+        private void Gps_DataxlsWrite(object dst, object Value1, object Value2, object Value3)
1466 1511
         {
1467 1512
 
1468 1513
 
@@ -1510,6 +1555,7 @@ namespace APL_TestCheck
1510 1555
                 //시트에 값 쓰기...
1511 1556
                 ws.Cells[8, 9] = Value1.ToString();//dataGridView_Gps.Rows[0].Cells[0].Value;
1512 1557
                 ws.Cells[8, 11] = Value2.ToString();//dataGridView_Gps.Rows[0].Cells[1].Value;
1558
+                ws.Cells[8, 16] = Value3.ToString(); // Cold Second
1513 1559
                                                     /*ws.Cells[1, 3] = "123";
1514 1560
                                                     ws.Cells[1, 4] = "1234";
1515 1561
                                                     ws.Cells[2, 1] = "Test1"; //A2
@@ -1619,12 +1665,23 @@ namespace APL_TestCheck
1619 1665
 
1620 1666
                 //엑셀 시트 인덱스 번호는 0,0 부터 시작 하는 것이 아니라 1,1 A1 부터 시작 함. 0,0 으로 시작하면 오류...
1621 1667
                 //시트에 값 쓰기...
1668
+                for (int i = 1; i < 13; i++){
1669
+                    if(data[i] == null)
1670
+                    {
1671
+                        data[i] = "";
1672
+                    }
1673
+                }
1674
+               // ws.Range("M6", "R6").EntireRow.Hidden = false; // ROW 숨기기
1622 1675
                 ws.Cells[8, 9] = data[1].ToString();//dataGridView_Sensor.Rows[0].Cells[0].Value; // 제조 번호
1623 1676
                 ws.Cells[8, 4] = data[2].ToString();//dataGridView_Sensor.Rows[0].Cells[1].Value; // 일련번호
1624
-                ws.Cells[8, 6] = data[3].ToString();//dataGridView_Sensor.Rows[0].Cells[2].Value; //IMEI 
1625
-                ws.Cells[8, 7] = data[4].ToString();//dataGridView_Sensor.Rows[0].Cells[3].Value;// PHONE
1626
-                ws.Cells[8, 8] = data[5].ToString();//dataGridView_Sensor.Rows[0].Cells[4].Value;//USIM
1627
-                ws.Cells[8, 10] = data[6].ToString();//dataGridView_Sensor.Rows[0].Cells[5].Value;//FIRM VER
1677
+                if (checkBox_Usim_Imei_Phone_Num.Checked == true) 
1678
+                {
1679
+                    ws.Cells[8, 6] = data[3].ToString();//dataGridView_Sensor.Rows[0].Cells[2].Value; //IMEI 
1680
+                    ws.Cells[8, 7] = data[4].ToString();//dataGridView_Sensor.Rows[0].Cells[3].Value;// PHONE
1681
+                    ws.Cells[8, 8] = data[5].ToString();//dataGridView_Sensor.Rows[0].Cells[4].Value;//USIM
1682
+                }
1683
+                ws.Cells[8, 10] = data[6].ToString();//dataGridView_Sensor.Rows[0].Cells[5].Value;//FIRM VEBR
1684
+                ws.Cells[8, 17] = data[13].ToString();//BLE 나중에 추가해서  Num 다름
1628 1685
                 ws.Cells[8, 18] = data[7].ToString();//dataGridView_Sensor.Rows[0].Cells[6].Value;//BATT
1629 1686
                 ws.Cells[8, 19] = data[8].ToString();//dataGridView_Sensor.Rows[0].Cells[7].Value;//SYS
1630 1687
                 ws.Cells[8, 20] = data[9].ToString();//dataGridView_Sensor.Rows[0].Cells[8].Value;//TEMP
@@ -1680,6 +1737,7 @@ namespace APL_TestCheck
1680 1737
                   }
1681 1738
                   #endregion*/
1682 1739
                 GC.Collect();
1740
+             //   AutoClosingMessageBox.Show("완료 되었습니다.", "알림", 1000);
1683 1741
             }
1684 1742
             finally
1685 1743
             {
@@ -1702,7 +1760,19 @@ namespace APL_TestCheck
1702 1760
                   }
1703 1761
                   #endregion*/
1704 1762
                 GC.Collect();
1763
+                Thread.Sleep(1000);
1764
+                AutoClosingMessageBox.Show("완료 되었습니다.", "알림", 1000);
1765
+                ExcelKill();
1766
+        
1767
+               
1768
+        
1769
+            }
1770
+            if (checkBox_ExcelOpen.Checked == true)
1771
+            {
1772
+                Thread.Sleep(Convert.ToInt32(numericUpDown_ExcelOpenDelay.Value));
1773
+                Process.Start(CurrentExcelFilePath);
1705 1774
             }
1775
+            dataGridView_Sensor_CellClick(null, null);
1706 1776
         }
1707 1777
         private void Catm1_DataxlsWrite(object dst, object Product, object Modemver, object Rsrp, object Rsrq)
1708 1778
         {
@@ -1852,10 +1922,18 @@ namespace APL_TestCheck
1852 1922
 
1853 1923
                 //엑셀 시트 인덱스 번호는 0,0 부터 시작 하는 것이 아니라 1,1 A1 부터 시작 함. 0,0 으로 시작하면 오류...
1854 1924
                 //시트에 값 쓰기...
1855
-                ws.Cells[8, 9] = data[1].ToString();// 제조 번호
1856
-                ws.Cells[8, 4] = data[2].ToString();// 일련번호
1857
-                ws.Cells[8, 6] = data[3].ToString();//IMEI 
1858
-                ws.Cells[8, 15] = "OK";
1925
+                if (radioButton_Imei.Checked == true)
1926
+                {
1927
+                    ws.Cells[8, 9] = data[1].ToString();// 제조 번호
1928
+                    ws.Cells[8, 4] = data[2].ToString();// 일련번호
1929
+                    ws.Cells[8, 6] = data[3].ToString();//IMEI 
1930
+                    ws.Cells[8, 15] = "OK";
1931
+                }
1932
+                else
1933
+                {
1934
+                    ws.Cells[8, 9] = data[1].ToString();// 제조 번호
1935
+                    ws.Cells[8, 8] = data[2].ToString();// 일련번호
1936
+                }
1859 1937
 
1860 1938
 
1861 1939
 
@@ -1923,6 +2001,7 @@ namespace APL_TestCheck
1923 2001
                   }
1924 2002
                   #endregion*/
1925 2003
                 GC.Collect();
2004
+               
1926 2005
             }
1927 2006
         }
1928 2007
         private void ExportExcel(bool captions)
@@ -2515,8 +2594,8 @@ namespace APL_TestCheck
2515 2594
             if (InputBox("번호 입력", "생산 번호:", ref value) == DialogResult.OK)
2516 2595
             {
2517 2596
                 // SN
2518
-                dataGridView_Sensor.Rows[0].Cells[0].Value = value;
2519
-                if (dataGridView_Sensor.Rows[0].Cells[0].Value != null)
2597
+                dataGridView_Gps.Rows[0].Cells[0].Value = value;
2598
+                if (dataGridView_Gps.Rows[0].Cells[0].Value != null)
2520 2599
                 {
2521 2600
                     Double SnrMinref = Convert.ToDouble(dataGridView_Gps.Rows[0].Cells[3].Value);
2522 2601
                     Double SnrValue = Convert.ToDouble(dataGridView_Gps.Rows[0].Cells[1].Value);
@@ -2524,15 +2603,17 @@ namespace APL_TestCheck
2524 2603
                     Double SecMaxref = Convert.ToDouble(dataGridView_Gps.Rows[0].Cells[3].Value);
2525 2604
                     if (SnrMinref > SnrValue || SecMaxref <= SecValue)
2526 2605
                     {
2527
-                        MessageBox.Show("APL 부적합 Device 입니다.");
2606
+                        MessageBox.Show("APL 부적합 Device 입니다.\r\n" +"인식된 SNR 값" +SnrValue.ToString() +"\r\n"+"Cold Start Vale"+ SecValue .ToString());
2528 2607
                         return;
2529 2608
                     }
2530
-                    button_GpsTestSave_Click(null, null);
2531
-                    dataGridView_Gps_CellClick(null, null);
2532 2609
                     gps_arrangecnt = 0;
2533 2610
                     ColdCnt = 0;
2534 2611
                     GPGGA_Cnt = 0;
2612
+                    Gps_CurrentCount = 0;
2613
+                    button_GpsTestSave_Click(null, null);
2614
+                    dataGridView_Gps_CellClick(null, null);
2535 2615
                     dataGridView_Gps.Rows[0].Cells[0].Value = Name = value;
2616
+                    serialPort.Write("Reset" + "\r\n");
2536 2617
                    // button_GpsTestSave_Click(null, null);
2537 2618
                 }
2538 2619
 
@@ -2552,20 +2633,27 @@ namespace APL_TestCheck
2552 2633
 
2553 2634
             }
2554 2635
         }
2555
-        bool ButtonCheck = false;
2636
+
2637
+        private void DataGridViewInsert_Func(string text)
2638
+        {
2639
+            dataGridView_Sensor.Rows[0].Cells[0].Value = text;
2640
+        }
2556 2641
         private void dataGridView_Sensor_CellClick(object sender, DataGridViewCellEventArgs e)
2557 2642
         {
2558
-            string value = "";
2559
-            string value1 = "";
2643
+            string[] value = new string[3];
2560 2644
             //BL-VITE00-V
2561
-            if (ButtonCheck == false)
2562
-                MessageBox.Show("버튼을 눌러 버튼을 확인 해주세요.");
2645
+            /*if (ButtonCheck == false)
2646
+                MessageBox.Show("버튼을 눌러 버튼을 확인 해주세요.");*/
2563 2647
 
2564
-            if (InputBox("번호 입력", "생산 번호:", ref value) == DialogResult.OK)
2648
+            if (InputBox("번호 입력", "생산 번호:", ref value[0]) == DialogResult.OK)
2565 2649
             {
2566 2650
                 // SN
2567
-                dataGridView_Sensor.Rows[0].Cells[0].Value = Name = value;
2568
-                if (InputBox("번호 입력", "SKT SN:", ref value1) == DialogResult.OK)
2651
+                
2652
+      //  dataGridView_Sensor.Rows[0].Cells[0].Value = Name = value[0];
2653
+                this.Invoke(new StringSend(DataGridViewInsert_Func),  value[0]);
2654
+            //  this.Invoke(new GridviewSend(DataGridViewInsert_Func),dataGridView_Sensor.Rows[0].Cells[0].Value, value);
2655
+            Sktnumgoback:
2656
+                if (InputBox("번호 입력", "SKT SN:", ref value[1]) == DialogResult.OK)
2569 2657
                 {
2570 2658
                     int BMAX = 0;
2571 2659
                     int BMAY = 0;
@@ -2577,34 +2665,62 @@ namespace APL_TestCheck
2577 2665
                     int BMAZ_Max = 0;
2578 2666
                     int BMAZ_Min = 0;
2579 2667
 
2668
+
2669
+                    if (Convert.ToInt32(value[1]) <= 0)
2670
+                    {
2671
+                        value[1] = "";
2672
+                        goto Sktnumgoback;
2673
+
2674
+                    }
2580 2675
                     BMAX = Convert.ToInt32(dataGridView_Sensor.Rows[0].Cells[9].Value);
2581 2676
                     BMAY = Convert.ToInt32(dataGridView_Sensor.Rows[0].Cells[10].Value);
2582 2677
                     BMAZ = Convert.ToInt32(dataGridView_Sensor.Rows[0].Cells[11].Value);
2583 2678
 
2584
-                    BMAX_Max = Convert.ToInt32(dataGridView_Sensor.Rows[0].Cells[16].Value);
2585
-                    BMAX_Min = Convert.ToInt32(dataGridView_Sensor.Rows[0].Cells[17].Value);
2586
-                    BMAY_Max = Convert.ToInt32(dataGridView_Sensor.Rows[0].Cells[18].Value);
2587
-                    BMAY_Min = Convert.ToInt32(dataGridView_Sensor.Rows[0].Cells[19].Value);
2588
-                    BMAZ_Max = Convert.ToInt32(dataGridView_Sensor.Rows[0].Cells[20].Value);
2589
-                    BMAZ_Min = Convert.ToInt32(dataGridView_Sensor.Rows[0].Cells[21].Value);
2679
+                    BMAX_Max = Convert.ToInt32(dataGridView_Sensor.Rows[0].Cells[17].Value);
2680
+                    BMAX_Min = Convert.ToInt32(dataGridView_Sensor.Rows[0].Cells[18].Value);
2681
+                    BMAY_Max = Convert.ToInt32(dataGridView_Sensor.Rows[0].Cells[19].Value);
2682
+                    BMAY_Min = Convert.ToInt32(dataGridView_Sensor.Rows[0].Cells[20].Value);
2683
+                    BMAZ_Max = Convert.ToInt32(dataGridView_Sensor.Rows[0].Cells[21].Value);
2684
+                    BMAZ_Min = Convert.ToInt32(dataGridView_Sensor.Rows[0].Cells[22].Value);
2590 2685
 
2591 2686
 
2592
-
2593
-                    if (BMAX <= BMAX_Max && BMAX >= BMAX_Min &&
2594
-                        BMAY <= BMAY_Max && BMAY >= BMAY_Min &&
2595
-                                            BMAZ >= BMAZ_Min)
2687
+                    if (!(BMAX <= BMAX_Max && BMAX >= BMAX_Min))
2596 2688
                     {
2597
-                        dataGridView_Sensor.Rows[0].Cells[1].Value = value1;
2598
-                        dataGridView_Sensor.Refresh();
2599
-                        button_SensorTestSave();
2600
-                        dataGridView_Sensor_CellClick(null, null);
2601
-                        ButtonCheck = false;
2689
+                        MessageBox.Show("가속도 센서 X 축"+ BMAX .ToString()+ " 부적합 입니다. ");
2690
+                        return;
2602 2691
                     }
2603
-                    else
2692
+                    if (!(BMAY <= BMAY_Max && BMAY >= BMAY_Min))
2693
+                    {
2694
+                        MessageBox.Show("가속도 센서 Y 축" + BMAY.ToString() + " 부적합 입니다. ");
2695
+                        return;
2696
+                    }
2697
+                    if (!(BMAZ <= BMAZ_Min))
2604 2698
                     {
2605
-                        MessageBox.Show("가속도 센서 / Voltage / 온도  부적합 입니다.\r\n 값을 확인 해주세요.");
2699
+                        MessageBox.Show("가속도 센서 Z 축" + BMAZ.ToString() + " 부적합 입니다. ");
2606 2700
                         return;
2607 2701
                     }
2702
+                    dataGridView_Sensor.Rows[0].Cells[1].Value = value[1];
2703
+                    BleReinput:
2704
+                    if (InputBox("번호 입력", "BLE RSSI Value", ref value[2]) == DialogResult.OK)
2705
+                    {
2706
+                        try
2707
+                        {
2708
+                            if (Convert.ToInt32(value[2]) > 0)
2709
+                            {
2710
+                                value[2] = "";
2711
+                                goto BleReinput;
2712
+                            }
2713
+                        }
2714
+                        catch
2715
+                        {
2716
+                            value[2] = "";
2717
+                            goto BleReinput;
2718
+                        }
2719
+                        dataGridView_Sensor.Rows[0].Cells[12].Value = value[2];
2720
+                        dataGridView_Sensor.Refresh();
2721
+                        button_SensorTestSave();
2722
+                        Thread.Sleep(3000);
2723
+                    }
2608 2724
                 }
2609 2725
 
2610 2726
             }
@@ -2696,40 +2812,66 @@ namespace APL_TestCheck
2696 2812
             string ProductNum = "";
2697 2813
             string SKTNUM = "";
2698 2814
             string IMEI = "";
2815
+            string USIM = "";
2699 2816
             string[] ImeiCheck = new string[15];
2700 2817
             ProductNumgoback:
2701
-            if (InputBox("번호 입력", "생산 번호:", ref ProductNum) == DialogResult.OK)
2818
+            if (radioButton_Imei.Checked == true)
2702 2819
             {
2703
-                // SN
2704
-                if (ProductNum.Contains("BL-") == false)
2820
+                if (InputBox("번호 입력", "생산 번호:", ref ProductNum) == DialogResult.OK)
2705 2821
                 {
2706
-                    ProductNum = "";
2707
-                    goto ProductNumgoback;
2708
-                }
2709
-                dataGridView_SnInsert.Rows[0].Cells[0].Value = Name = ProductNum;
2822
+                    // SN
2823
+                    if (ProductNum.Contains("BL-") == false)
2824
+                    {
2825
+                        ProductNum = "";
2826
+                        goto ProductNumgoback;
2827
+                    }
2828
+                    dataGridView_SnInsert.Rows[0].Cells[0].Value = Name = ProductNum;
2710 2829
 
2711
-             
2712
-                if (InputBox("번호 입력", "SKT SN:", ref SKTNUM) == DialogResult.OK)
2713
-                {
2714
-          
2715 2830
 
2716
-                    dataGridView_SnInsert.Rows[0].Cells[1].Value = SKTNUM;
2717
-                    Imeigoback:
2718
-                    if (InputBox("번호 입력", "IMEI:", ref IMEI) == DialogResult.OK)
2831
+                    if (InputBox("번호 입력", "SKT SN:", ref SKTNUM) == DialogResult.OK)
2719 2832
                     {
2720
-                        if (IMEI.Contains(';') == false)
2833
+
2834
+
2835
+                        dataGridView_SnInsert.Rows[0].Cells[1].Value = SKTNUM;
2836
+                    Imeigoback:
2837
+                        if (InputBox("번호 입력", "IMEI:", ref IMEI) == DialogResult.OK)
2721 2838
                         {
2722
-                            IMEI = "";
2723
-                            goto Imeigoback;
2839
+                            if (IMEI.Contains(';') == false)
2840
+                            {
2841
+                                IMEI = "";
2842
+                                goto Imeigoback;
2843
+                            }
2844
+                            ImeiCheck = IMEI.Split(';');
2845
+                            dataGridView_SnInsert.Rows[0].Cells[2].Value = ImeiCheck[0];
2846
+                            button_SninsertTestSave();
2847
+                            dataGridView_SnInsert_CellClick(null, null);
2724 2848
                         }
2725
-                        ImeiCheck = IMEI.Split(';');
2726
-                        dataGridView_SnInsert.Rows[0].Cells[2].Value = ImeiCheck[0];
2849
+                    }
2850
+
2851
+                }
2852
+            }
2853
+            else
2854
+            {
2855
+                if (InputBox("번호 입력", "생산 번호:", ref ProductNum) == DialogResult.OK)
2856
+                {
2857
+                    // SN
2858
+                    if (ProductNum.Contains("BL-") == false)
2859
+                    {
2860
+                        ProductNum = "";
2861
+                        goto ProductNumgoback;
2862
+                    }
2863
+                    dataGridView_SnInsert.Rows[0].Cells[0].Value = Name = ProductNum;
2864
+
2865
+                    if (InputBox("번호 입력", "USIM:", ref USIM) == DialogResult.OK)
2866
+                    {
2867
+                        USIM = USIM.Substring(6);
2868
+                        dataGridView_SnInsert.Rows[0].Cells[1].Value = USIM;
2869
+
2727 2870
                         button_SninsertTestSave();
2728
-                        dataGridView_Sensor.Refresh();
2729 2871
                         dataGridView_SnInsert_CellClick(null, null);
2730 2872
                     }
2731
-                }
2732 2873
 
2874
+                }
2733 2875
             }
2734 2876
         }
2735 2877
 
@@ -2771,6 +2913,68 @@ namespace APL_TestCheck
2771 2913
             }
2772 2914
         }
2773 2915
 
2916
+        private void button_GpsClear_Click(object sender, EventArgs e)
2917
+        {
2918
+            gps_arrangecnt = 0;
2919
+            ColdCnt = 0;
2920
+            GPGGA_Cnt = 0;
2921
+            Gps_CurrentCount = 0;
2922
+            dataGridView_Gps.Rows[0].Cells[0].Value = null;
2923
+            dataGridView_Gps.Rows[0].Cells[1].Value = null;
2924
+            dataGridView_Gps.Rows[0].Cells[4].Value = null;
2925
+            dataGridView_Gps.Refresh();
2926
+        }
2927
+
2928
+        private void radioButton_Imei_CheckedChanged(object sender, EventArgs e)
2929
+        {
2930
+            dataGridView_SnInsert.ColumnCount = 3;
2931
+            dataGridView_SnInsert.Columns[1].HeaderText = "일련번호";
2932
+            dataGridView_SnInsert.Columns[2].HeaderText = "IMEI";
2933
+        }
2934
+
2935
+        private void radioButton_Usim_CheckedChanged(object sender, EventArgs e)
2936
+        {
2937
+            dataGridView_SnInsert.Columns[1].HeaderText = "USIM";
2938
+            dataGridView_SnInsert.ColumnCount = 2;
2939
+        }
2940
+
2941
+        private void button_ExcelOpen_Click(object sender, EventArgs e)
2942
+        {
2943
+            Process.Start(CurrentExcelFilePath);
2944
+        }
2945
+
2946
+        private void button_SnRead_Click(object sender, EventArgs e)
2947
+        {
2948
+            serialPort.Write("APLSN Read:" + "\r\n");
2949
+        }
2950
+
2951
+        private void button_Rewrite_Click(object sender, EventArgs e)
2952
+        {
2953
+            try
2954
+            {
2955
+                serialPort.Write("APLSN Rewrite:" + textBox_PrevNum.Text + "," + textBox_AfterNum.Text + "\r\n");
2956
+                label_SerialWrite.Text = "APLSN Rewrite:" + textBox_PrevNum.Text + "," + textBox_AfterNum.Text + "\r\n";
2957
+            }
2958
+            catch
2959
+            {
2960
+                MessageBox.Show("시리얼 포트가 닫혀 있습니다. Open 하세요.");
2961
+            }
2962
+            // serialPort.Write("APLSN Rewrite:0000002,0000001\r\n");
2963
+        }
2964
+
2965
+        private void button_Write_Click(object sender, EventArgs e)
2966
+        {
2967
+            try
2968
+            {
2969
+                serialPort.Write("APLSN Write:" + textBox_Write +"\r\n");
2970
+                label_SerialWrite.Text = "APLSN Write:" + textBox_Write + "\r\n";
2971
+            }
2972
+            catch
2973
+            {
2974
+                MessageBox.Show("시리얼 포트가 닫혀 있습니다. Open 하세요.");
2975
+            }
2976
+        }
2977
+
2774 2978
         private void timer1_Tick(object sender, EventArgs e)
2775 2979
         {
2776 2980
             

+ 4 - 4
Main.resx

@@ -156,6 +156,9 @@
156 156
   <metadata name="BMA_Z.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
157 157
     <value>True</value>
158 158
   </metadata>
159
+  <metadata name="BLE.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
160
+    <value>True</value>
161
+  </metadata>
159 162
   <metadata name="BattMin.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
160 163
     <value>True</value>
161 164
   </metadata>
@@ -234,11 +237,8 @@
234 237
   <metadata name="openFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
235 238
     <value>329, 17</value>
236 239
   </metadata>
237
-  <metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
238
-    <value>464, 17</value>
239
-  </metadata>
240 240
   <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
241
-    <value>55</value>
241
+    <value>56</value>
242 242
   </metadata>
243 243
   <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
244 244
   <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">

BIN
bin/Debug/APL_200305.xls


BIN
bin/Debug/APL_TestCheck.exe


BIN
bin/Debug/APL_TestCheck.pdb


BIN
bin/Release/APL_200305.xls


BIN
bin/Release/APL_TestCheck.exe


BIN
bin/Release/APL_TestCheck.pdb


BIN
obj/Debug/APL_TestCheck.csproj.GenerateResource.cache


BIN
obj/Debug/APL_TestCheck.csproj.ResolveComReference.cache


BIN
obj/Debug/APL_TestCheck.exe


BIN
obj/Debug/APL_TestCheck.pdb


BIN
obj/Release/APL_TestCheck.csproj.GenerateResource.cache


BIN
obj/Release/APL_TestCheck.csproj.ResolveComReference.cache


BIN
obj/Release/APL_TestCheck.exe


BIN
obj/Release/APL_TestCheck.pdb