Просмотр исходного кода

MBIC Zero Write 기능 활성화
MBIC 제조일자 표시 2자릿수 단위로 Check 하도록 수정

PYJ лет назад: 5
Родитель
Сommit
b648fcbefe

BIN
.vs/Jdas_Mbic/v15/.suo


BIN
.vs/Jdas_Mbic/v15/Server/sqlite3/storage.ide


BIN
.vs/Jdas_Mbic/v15/Server/sqlite3/storage.ide-shm


BIN
.vs/Jdas_Mbic/v15/Server/sqlite3/storage.ide-wal


+ 7 - 5
Jdas_Mbic/Debug.Designer.cs

@@ -44,14 +44,15 @@
44 44
             // tbReceived
45 45
             // 
46 46
             this.tbReceived.BackColor = System.Drawing.SystemColors.ActiveCaptionText;
47
+            this.tbReceived.Dock = System.Windows.Forms.DockStyle.Fill;
47 48
             this.tbReceived.Font = new System.Drawing.Font("굴림", 14F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
48 49
             this.tbReceived.ForeColor = System.Drawing.SystemColors.InactiveBorder;
49
-            this.tbReceived.Location = new System.Drawing.Point(0, 1);
50
+            this.tbReceived.Location = new System.Drawing.Point(0, 0);
50 51
             this.tbReceived.MaxLength = 0;
51 52
             this.tbReceived.Name = "tbReceived";
52 53
             this.tbReceived.ReadOnly = true;
53 54
             this.tbReceived.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.Vertical;
54
-            this.tbReceived.Size = new System.Drawing.Size(874, 403);
55
+            this.tbReceived.Size = new System.Drawing.Size(881, 528);
55 56
             this.tbReceived.TabIndex = 63;
56 57
             this.tbReceived.Text = "";
57 58
             // 
@@ -64,9 +65,10 @@
64 65
             this.groupBox1.Controls.Add(this.button_Clear);
65 66
             this.groupBox1.Controls.Add(this.button_Send);
66 67
             this.groupBox1.Controls.Add(this.textBox_senddata);
67
-            this.groupBox1.Location = new System.Drawing.Point(13, 410);
68
+            this.groupBox1.Dock = System.Windows.Forms.DockStyle.Bottom;
69
+            this.groupBox1.Location = new System.Drawing.Point(0, 439);
68 70
             this.groupBox1.Name = "groupBox1";
69
-            this.groupBox1.Size = new System.Drawing.Size(861, 89);
71
+            this.groupBox1.Size = new System.Drawing.Size(881, 89);
70 72
             this.groupBox1.TabIndex = 64;
71 73
             this.groupBox1.TabStop = false;
72 74
             this.groupBox1.Text = "보내는 문자열";
@@ -149,7 +151,7 @@
149 151
             // 
150 152
             this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
151 153
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
152
-            this.ClientSize = new System.Drawing.Size(881, 511);
154
+            this.ClientSize = new System.Drawing.Size(881, 528);
153 155
             this.Controls.Add(this.groupBox1);
154 156
             this.Controls.Add(this.tbReceived);
155 157
             this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));

+ 12 - 10
Jdas_Mbic/Hidden.Designer.cs

@@ -123,7 +123,7 @@
123 123
             this.dataGridView_TableSetting = new System.Windows.Forms.DataGridView();
124 124
             this.Column_DB = new System.Windows.Forms.DataGridViewTextBoxColumn();
125 125
             this.Column_Offset = new System.Windows.Forms.DataGridViewTextBoxColumn();
126
-            this.button_Save = new System.Windows.Forms.Button();
126
+            this.button_ZeroWrite = new System.Windows.Forms.Button();
127 127
             this.panel2 = new System.Windows.Forms.Panel();
128 128
             this.label1 = new System.Windows.Forms.Label();
129 129
             this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog();
@@ -206,7 +206,7 @@
206 206
             this.panel1.Controls.Add(this.groupBox6);
207 207
             this.panel1.Controls.Add(this.groupBox3);
208 208
             this.panel1.Controls.Add(this.dataGridView_TableSetting);
209
-            this.panel1.Controls.Add(this.button_Save);
209
+            this.panel1.Controls.Add(this.button_ZeroWrite);
210 210
             this.panel1.Controls.Add(this.panel2);
211 211
             this.panel1.Location = new System.Drawing.Point(0, 0);
212 212
             this.panel1.Name = "panel1";
@@ -1398,14 +1398,15 @@
1398 1398
             this.Column_Offset.Name = "Column_Offset";
1399 1399
             this.Column_Offset.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
1400 1400
             // 
1401
-            // button_Save
1401
+            // button_ZeroWrite
1402 1402
             // 
1403
-            this.button_Save.Location = new System.Drawing.Point(823, 736);
1404
-            this.button_Save.Name = "button_Save";
1405
-            this.button_Save.Size = new System.Drawing.Size(203, 34);
1406
-            this.button_Save.TabIndex = 149;
1407
-            this.button_Save.Text = "ZERO SET";
1408
-            this.button_Save.UseVisualStyleBackColor = true;
1403
+            this.button_ZeroWrite.Location = new System.Drawing.Point(823, 736);
1404
+            this.button_ZeroWrite.Name = "button_ZeroWrite";
1405
+            this.button_ZeroWrite.Size = new System.Drawing.Size(203, 34);
1406
+            this.button_ZeroWrite.TabIndex = 149;
1407
+            this.button_ZeroWrite.Text = "ZERO SET";
1408
+            this.button_ZeroWrite.UseVisualStyleBackColor = true;
1409
+            this.button_ZeroWrite.Click += new System.EventHandler(this.button_ZeroWrite_Click);
1409 1410
             // 
1410 1411
             // panel2
1411 1412
             // 
@@ -1433,6 +1434,7 @@
1433 1434
             // 
1434 1435
             this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
1435 1436
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
1437
+            this.AutoScroll = true;
1436 1438
             this.ClientSize = new System.Drawing.Size(1085, 782);
1437 1439
             this.Controls.Add(this.panel1);
1438 1440
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
@@ -1498,7 +1500,7 @@
1498 1500
         private System.Windows.Forms.Panel panel1;
1499 1501
         private System.Windows.Forms.Panel panel2;
1500 1502
         private System.Windows.Forms.Label label1;
1501
-        private System.Windows.Forms.Button button_Save;
1503
+        private System.Windows.Forms.Button button_ZeroWrite;
1502 1504
         private System.Windows.Forms.Button button_Down;
1503 1505
         private System.Windows.Forms.Button button_TableAttribute_Default;
1504 1506
         private System.Windows.Forms.Label label45;

+ 25 - 0
Jdas_Mbic/Hidden.cs

@@ -1211,5 +1211,30 @@ namespace Jdas_Mbic
1211 1211
             temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + i++] = Convert.ToByte(CRCRET & 0x00FF);//CRC
1212 1212
             ((JdasMbic)(this.Owner)).serial.Serial_DataSend(temp_buf, temp_buf.Length);
1213 1213
         }
1214
+
1215
+
1216
+        
1217
+        private void button_ZeroWrite_Click(object sender, EventArgs e)
1218
+        {
1219
+            byte[] temp_buf = new byte[7];
1220
+            int i = 0;
1221
+            Button button = (Button)sender;
1222
+            DATATYPE datatype;
1223
+            ((JdasMbic)(this.Owner)).ReqTimer_Cnt = 0;
1224
+
1225
+            //temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data] = textBox_SerialNumber.Text.Split();
1226
+            datatype = DATATYPE.Bluecell_StatusSave;
1227
+
1228
+            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_Header] = BLUECELL_HEADER;
1229
+            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_Type] = Convert.ToByte(datatype);
1230
+            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_Length_H] = ((4 & 0xFF00) >> 8);
1231
+            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_Length_L] = (4 & 0x00FF);
1232
+            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_CrcIndex] = 5;
1233
+            //temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data] = 0;
1234
+            UInt16 CRCRET = ((JdasMbic)(this.Owner)).crc.CRC16_Generate(temp_buf, temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_Length_L]);
1235
+            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + i++] = Convert.ToByte((CRCRET & 0xFF00) >> 8);//CRC
1236
+            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + i++] = Convert.ToByte(CRCRET & 0x00FF);//CRC
1237
+            ((JdasMbic)(this.Owner)).serial.Serial_DataSend(temp_buf, temp_buf.Length);
1238
+        }
1214 1239
     }
1215 1240
 }

+ 2 - 2
Jdas_Mbic/Main.cs

@@ -1863,8 +1863,8 @@ namespace Jdas_Mbic
1863 1863
             }
1864 1864
             this.Invoke(new StringSend(TextBox_Text_Set), textBox_MunufactureDate,
1865 1865
                                              buf[(int)BluecellReqIndex.Manufacture_Date].ToString()
1866
-                                           + buf[(int)BluecellReqIndex.Manufacture_Date + 1].ToString()
1867
-                                           + buf[(int)BluecellReqIndex.Manufacture_Date + 2].ToString());
1866
+                                           + buf[(int)BluecellReqIndex.Manufacture_Date + 1].ToString("D2")
1867
+                                           + buf[(int)BluecellReqIndex.Manufacture_Date + 2].ToString("D2"));
1868 1868
             string tempstr = "";
1869 1869
             for (int strindex = 0; strindex < 20; strindex++)
1870 1870
                 tempstr += Convert.ToChar(buf[(int)BluecellReqIndex.Serial_Number + strindex]);

BIN
Jdas_Mbic/bin/Debug/Jdas_Mbic.exe


BIN
Jdas_Mbic/bin/Debug/Jdas_Mbic.pdb


BIN
Jdas_Mbic/bin/Release/Jdas_Mbic.exe


BIN
Jdas_Mbic/bin/Release/Jdas_Mbic.pdb


BIN
Jdas_Mbic/bin/Release/Jdas_Mbic_.exe


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


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


BIN
Jdas_Mbic/obj/Debug/Jdas_Mbic.exe


BIN
Jdas_Mbic/obj/Debug/Jdas_Mbic.pdb


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


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


BIN
Jdas_Mbic/obj/Release/Jdas_Mbic.exe


BIN
Jdas_Mbic/obj/Release/Jdas_Mbic.pdb