callm 20 часов назад
Родитель
Сommit
47552c1c12

+ 20 - 3
UAS_MES_YDCY/FunctionCode/Make/Make_FuselageLabelPrintRFID.Designer.cs

@@ -52,6 +52,7 @@
             this.PrintNum = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.NumOnlyTextBox();
             this.sncode = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SnCollectionBox();
             this.OperateResult = new UAS_MES_NEW.CustomControl.RichText.RichTextAutoBottom();
+            this.Hex = new System.Windows.Forms.CheckBox();
             this.SuspendLayout();
             // 
             // label2
@@ -337,11 +338,26 @@
             this.OperateResult.TabIndex = 168;
             this.OperateResult.Text = "";
             // 
-            // Make_FuselageLabelPrint
+            // Hex
+            // 
+            this.Hex.AutoSize = true;
+            this.Hex.Checked = true;
+            this.Hex.CheckState = System.Windows.Forms.CheckState.Checked;
+            this.Hex.Font = new System.Drawing.Font("微软雅黑", 10F);
+            this.Hex.Location = new System.Drawing.Point(1437, 558);
+            this.Hex.Margin = new System.Windows.Forms.Padding(6);
+            this.Hex.Name = "Hex";
+            this.Hex.Size = new System.Drawing.Size(160, 39);
+            this.Hex.TabIndex = 200;
+            this.Hex.Text = "转16进制";
+            this.Hex.UseVisualStyleBackColor = true;
+            // 
+            // Make_FuselageLabelPrintRFID
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(1828, 896);
+            this.Controls.Add(this.Hex);
             this.Controls.Add(this.LockMakeCode);
             this.Controls.Add(this.ma_code);
             this.Controls.Add(this.CollectRemark);
@@ -367,14 +383,14 @@
             this.Controls.Add(this.ms_makecode_label);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
             this.Margin = new System.Windows.Forms.Padding(6);
-            this.Name = "Make_FuselageLabelPrint";
+            this.Name = "Make_FuselageLabelPrintRFID";
             this.Tag = "Make!FuselageLabelPrint";
             this.Text = "Make_FuselageLabelPrint";
             this.Activated += new System.EventHandler(this.Make_FuselageLabelPrint_Activated);
             this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Make_FuselageLabelPrint_FormClosing);
             this.Load += new System.EventHandler(this.Make_FuselageLabelPrint_Load);
             this.SizeChanged += new System.EventHandler(this.Make_FuselageLabelPrint_SizeChanged);
-            this.ResumeLayout(true);
+            this.ResumeLayout(false);
             this.PerformLayout();
 
         }
@@ -404,5 +420,6 @@
         private CustomControl.RichText.RichTextAutoBottom Remark;
         private CustomControl.CustomCheckBox.LockCheckBox LockMakeCode;
         private CustomControl.TextBoxWithIcon.MaCodeSearchTextBox ma_code;
+        private System.Windows.Forms.CheckBox Hex;
     }
 }

+ 6 - 4
UAS_MES_YDCY/FunctionCode/Make/Make_FuselageLabelPrintRFID.cs

@@ -332,7 +332,7 @@ namespace UAS_MES_NEW.Make
                             }
 
                             //6.设置打印数据 Set the print data.
-                            uRet = DSTP2x_SetTmplPrnData(tmp_prt, "Text-01", "56789VWXYZ"); //The data must be utf-8
+                            uRet = DSTP2x_SetTmplPrnData(tmp_prt, "Text-01", sncode.Text); //The data must be utf-8
                             if (uRet != 0)
                             {
                                 OperateResult.AppendText("Failed to set someone data in template,error code:[" + uRet.ToString() + "]");
@@ -340,7 +340,8 @@ namespace UAS_MES_NEW.Make
                             }
 
                             //7.设置RFID数据 Set the RFID data.
-                            uRet = DSTP2x_SetTmplRFIDData(tmp_prt, "EPC-01", AsciiToHex(sncode.Text), AsciiToHex(sncode.Text).Length);
+                            //uRet = DSTP2x_SetTmplRFIDData(tmp_prt, "EPC-01", sncode.Text, sncode.Text.Length);
+                            uRet = DSTP2x_SetTmplRFIDData(tmp_prt, "EPC-01",Hex.Checked? AsciiToHex(sncode.Text): sncode.Text, Hex.Checked? AsciiToHex(sncode.Text).Length:sncode.Text.Length);
                             if (uRet != 0)
                             {
                                 OperateResult.AppendText("Failed to set EPC data in template,error code:[" + uRet.ToString() + "]");
@@ -382,8 +383,9 @@ namespace UAS_MES_NEW.Make
                             OperateResult.AppendText("This example has been successfully demonstrated!\n");
 
                             SAMPLE_END:
-                            //11.DeInit Library.
-                            uRet = DSTP2x_Lib_Clear();
+                            {
+                                uRet = DSTP2x_Lib_Clear();
+                            }
 
                             //记录日志
                             LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, oMakeCode, User.UserLineCode, User.UserSourceCode, "机身标打印", "机身标打印成功", sncode.Text, "");