3.25 测试
改端子扫码,产线页面,主页
This commit is contained in:
1 parent
bd70f38e1a
commit
083c4ec3ac
16 files changed
+1016
-877
No files matched your search
+55
-9
@@ -38,12 +38,15 @@
|
||||
this.新增 = new System.Windows.Forms.Button();
|
||||
this.id = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.linename = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.linecode = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.linetype = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.linemode = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
//this.linecode = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
//this.linetype = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
//this.linemode = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.lineremark1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.lineremark2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.lineremark3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.lineremark4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.lineremark5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.lineremark6 = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.flowname = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.plcname = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
|
||||
@@ -97,12 +100,15 @@
|
||||
this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
|
||||
this.id,
|
||||
this.linename,
|
||||
this.linecode,
|
||||
this.linetype,
|
||||
this.linemode,
|
||||
//this.linecode,
|
||||
//this.linetype,
|
||||
//this.linemode,
|
||||
this.lineremark1,
|
||||
this.lineremark2,
|
||||
this.lineremark3,
|
||||
this.lineremark4,
|
||||
this.lineremark5,
|
||||
this.lineremark6,
|
||||
this.flowname,
|
||||
this.plcname});
|
||||
dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
|
||||
@@ -174,6 +180,8 @@
|
||||
this.linename.MinimumWidth = 9;
|
||||
this.linename.Name = "linename";
|
||||
this.linename.ReadOnly = true;
|
||||
#region 不显示
|
||||
/*
|
||||
//
|
||||
// linecode
|
||||
//
|
||||
@@ -201,12 +209,14 @@
|
||||
this.linemode.MinimumWidth = 9;
|
||||
this.linemode.Name = "linemode";
|
||||
this.linemode.ReadOnly = true;
|
||||
*/
|
||||
#endregion 不显示
|
||||
//
|
||||
// lineremark1
|
||||
//
|
||||
this.lineremark1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
|
||||
this.lineremark1.DataPropertyName = "lineremark1";
|
||||
this.lineremark1.HeaderText = "备用显示1";
|
||||
this.lineremark1.HeaderText = "Line";
|
||||
this.lineremark1.MinimumWidth = 9;
|
||||
this.lineremark1.Name = "lineremark1";
|
||||
this.lineremark1.ReadOnly = true;
|
||||
@@ -217,7 +227,7 @@
|
||||
//
|
||||
this.lineremark2.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
|
||||
this.lineremark2.DataPropertyName = "lineremark2";
|
||||
this.lineremark2.HeaderText = "备用显示2";
|
||||
this.lineremark2.HeaderText = "StationID";
|
||||
this.lineremark2.MinimumWidth = 9;
|
||||
this.lineremark2.Name = "lineremark2";
|
||||
this.lineremark2.ReadOnly = true;
|
||||
@@ -228,13 +238,46 @@
|
||||
//
|
||||
this.lineremark3.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
|
||||
this.lineremark3.DataPropertyName = "lineremark3";
|
||||
this.lineremark3.HeaderText = "备用显示3";
|
||||
this.lineremark3.HeaderText = "MachineID";
|
||||
this.lineremark3.MinimumWidth = 9;
|
||||
this.lineremark3.Name = "lineremark3";
|
||||
this.lineremark3.ReadOnly = true;
|
||||
this.lineremark3.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
|
||||
this.lineremark3.ToolTipText = "lineremark3";
|
||||
//
|
||||
// lineremark4
|
||||
//
|
||||
this.lineremark4.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
|
||||
this.lineremark4.DataPropertyName = "lineremark4";
|
||||
this.lineremark4.HeaderText = "Token";
|
||||
this.lineremark4.MinimumWidth = 9;
|
||||
this.lineremark4.Name = "lineremark4";
|
||||
this.lineremark4.ReadOnly = true;
|
||||
this.lineremark4.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
|
||||
this.lineremark4.ToolTipText = "lineremark4";
|
||||
//
|
||||
// lineremark5
|
||||
//
|
||||
this.lineremark5.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
|
||||
this.lineremark5.DataPropertyName = "lineremark5";
|
||||
this.lineremark5.HeaderText = "FixSn";
|
||||
this.lineremark5.MinimumWidth = 9;
|
||||
this.lineremark5.Name = "lineremark5";
|
||||
this.lineremark5.ReadOnly = true;
|
||||
this.lineremark5.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
|
||||
this.lineremark5.ToolTipText = "lineremark5";
|
||||
//
|
||||
// lineremark6
|
||||
//
|
||||
this.lineremark6.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
|
||||
this.lineremark6.DataPropertyName = "lineremark6";
|
||||
this.lineremark6.HeaderText = "Mold";
|
||||
this.lineremark6.MinimumWidth = 9;
|
||||
this.lineremark6.Name = "lineremark6";
|
||||
this.lineremark6.ReadOnly = true;
|
||||
this.lineremark6.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
|
||||
this.lineremark6.ToolTipText = "lineremark6";
|
||||
//
|
||||
// flowname
|
||||
//
|
||||
this.flowname.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
|
||||
@@ -292,6 +335,9 @@
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn lineremark1;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn lineremark2;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn lineremark3;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn lineremark4;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn lineremark5;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn lineremark6;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn flowname;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn plcname;
|
||||
}
|
||||
|
||||
@@ -93,14 +93,17 @@ namespace WindowsFormsApp1.form
|
||||
id = line.id,
|
||||
flowid = line.flowid,
|
||||
linename = line.linename,
|
||||
linecode = line.linecode,
|
||||
linetype = line.linetype,
|
||||
linemode = line.linemode,
|
||||
//linecode = line.linecode,
|
||||
//linetype = line.linetype,
|
||||
//linemode = line.linemode,
|
||||
flowname = flowname.flowname,
|
||||
plcname = plcname.plcname,
|
||||
lineremark1 = line.lineremark1,
|
||||
lineremark2 = line.lineremark2,
|
||||
lineremark3 = line.lineremark3,
|
||||
lineremark4 = line.lineremark4,
|
||||
lineremark5 = line.lineremark5,
|
||||
lineremark6 = line.lineremark6,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
+55
-55
@@ -64,10 +64,10 @@ namespace WindowsFormsApp1
|
||||
this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.groupBox1.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.groupBox1.Location = new System.Drawing.Point(0, 0);
|
||||
this.groupBox1.Margin = new System.Windows.Forms.Padding(6, 5, 6, 5);
|
||||
this.groupBox1.Margin = new System.Windows.Forms.Padding(7, 6, 7, 6);
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.Padding = new System.Windows.Forms.Padding(6, 5, 6, 5);
|
||||
this.groupBox1.Size = new System.Drawing.Size(1647, 704);
|
||||
this.groupBox1.Padding = new System.Windows.Forms.Padding(7, 6, 7, 6);
|
||||
this.groupBox1.Size = new System.Drawing.Size(1797, 805);
|
||||
this.groupBox1.TabIndex = 5;
|
||||
this.groupBox1.TabStop = false;
|
||||
this.groupBox1.Text = "端子扫码";
|
||||
@@ -103,7 +103,7 @@ namespace WindowsFormsApp1
|
||||
this.tableLayoutPanel1.Controls.Add(this.端子2校验, 5, 3);
|
||||
this.tableLayoutPanel1.Controls.Add(this.端子3校验, 5, 4);
|
||||
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tableLayoutPanel1.Location = new System.Drawing.Point(6, 37);
|
||||
this.tableLayoutPanel1.Location = new System.Drawing.Point(7, 43);
|
||||
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
|
||||
this.tableLayoutPanel1.RowCount = 8;
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 5F));
|
||||
@@ -114,16 +114,16 @@ namespace WindowsFormsApp1
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 5F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 17F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 5F));
|
||||
this.tableLayoutPanel1.Size = new System.Drawing.Size(1635, 662);
|
||||
this.tableLayoutPanel1.Size = new System.Drawing.Size(1783, 756);
|
||||
this.tableLayoutPanel1.TabIndex = 0;
|
||||
//
|
||||
// button3
|
||||
//
|
||||
this.button3.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.button3.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.button3.Location = new System.Drawing.Point(1390, 372);
|
||||
this.button3.Location = new System.Drawing.Point(1516, 424);
|
||||
this.button3.Name = "button3";
|
||||
this.button3.Size = new System.Drawing.Size(157, 106);
|
||||
this.button3.Size = new System.Drawing.Size(172, 122);
|
||||
this.button3.TabIndex = 14;
|
||||
this.button3.Text = "清空条码";
|
||||
this.button3.UseVisualStyleBackColor = true;
|
||||
@@ -133,9 +133,9 @@ namespace WindowsFormsApp1
|
||||
//
|
||||
this.button2.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.button2.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.button2.Location = new System.Drawing.Point(1390, 260);
|
||||
this.button2.Location = new System.Drawing.Point(1516, 296);
|
||||
this.button2.Name = "button2";
|
||||
this.button2.Size = new System.Drawing.Size(157, 106);
|
||||
this.button2.Size = new System.Drawing.Size(172, 122);
|
||||
this.button2.TabIndex = 13;
|
||||
this.button2.Text = "清空条码";
|
||||
this.button2.UseVisualStyleBackColor = true;
|
||||
@@ -145,9 +145,9 @@ namespace WindowsFormsApp1
|
||||
//
|
||||
this.button1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.button1.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.button1.Location = new System.Drawing.Point(1390, 148);
|
||||
this.button1.Location = new System.Drawing.Point(1516, 168);
|
||||
this.button1.Name = "button1";
|
||||
this.button1.Size = new System.Drawing.Size(157, 106);
|
||||
this.button1.Size = new System.Drawing.Size(172, 122);
|
||||
this.button1.TabIndex = 12;
|
||||
this.button1.Text = "清空条码";
|
||||
this.button1.UseVisualStyleBackColor = true;
|
||||
@@ -157,9 +157,9 @@ namespace WindowsFormsApp1
|
||||
//
|
||||
this.确认.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.确认.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.确认.Location = new System.Drawing.Point(84, 517);
|
||||
this.确认.Location = new System.Drawing.Point(92, 589);
|
||||
this.确认.Name = "确认";
|
||||
this.确认.Size = new System.Drawing.Size(321, 106);
|
||||
this.确认.Size = new System.Drawing.Size(350, 122);
|
||||
this.确认.TabIndex = 2;
|
||||
this.确认.Text = "确认";
|
||||
this.确认.UseVisualStyleBackColor = true;
|
||||
@@ -170,9 +170,9 @@ namespace WindowsFormsApp1
|
||||
this.tableLayoutPanel1.SetColumnSpan(this.取消, 2);
|
||||
this.取消.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.取消.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.取消.Location = new System.Drawing.Point(1227, 517);
|
||||
this.取消.Location = new System.Drawing.Point(1338, 589);
|
||||
this.取消.Name = "取消";
|
||||
this.取消.Size = new System.Drawing.Size(320, 106);
|
||||
this.取消.Size = new System.Drawing.Size(350, 122);
|
||||
this.取消.TabIndex = 3;
|
||||
this.取消.Text = "取消";
|
||||
this.取消.UseVisualStyleBackColor = true;
|
||||
@@ -182,10 +182,10 @@ namespace WindowsFormsApp1
|
||||
//
|
||||
this.端子2结果.Anchor = System.Windows.Forms.AnchorStyles.None;
|
||||
this.端子2结果.AutoSize = true;
|
||||
this.端子2结果.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.端子2结果.Location = new System.Drawing.Point(1274, 292);
|
||||
this.端子2结果.Font = new System.Drawing.Font("宋体", 14F, System.Drawing.FontStyle.Bold);
|
||||
this.端子2结果.Location = new System.Drawing.Point(1395, 338);
|
||||
this.端子2结果.Name = "端子2结果";
|
||||
this.端子2结果.Size = new System.Drawing.Size(62, 42);
|
||||
this.端子2结果.Size = new System.Drawing.Size(57, 38);
|
||||
this.端子2结果.TabIndex = 7;
|
||||
this.端子2结果.Text = "NG";
|
||||
//
|
||||
@@ -193,12 +193,12 @@ namespace WindowsFormsApp1
|
||||
//
|
||||
this.端子3结果.Anchor = System.Windows.Forms.AnchorStyles.None;
|
||||
this.端子3结果.AutoSize = true;
|
||||
this.端子3结果.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.端子3结果.Location = new System.Drawing.Point(1274, 404);
|
||||
this.端子3结果.Font = new System.Drawing.Font("宋体", 14F, System.Drawing.FontStyle.Bold);
|
||||
this.端子3结果.Location = new System.Drawing.Point(1395, 466);
|
||||
this.端子3结果.Name = "端子3结果";
|
||||
this.端子3结果.Size = new System.Drawing.Size(62, 42);
|
||||
this.端子3结果.Size = new System.Drawing.Size(57, 38);
|
||||
this.端子3结果.TabIndex = 8;
|
||||
this.端子3结果.Text = "OK";
|
||||
this.端子3结果.Text = "NG";
|
||||
//
|
||||
// 端子1
|
||||
//
|
||||
@@ -206,9 +206,9 @@ namespace WindowsFormsApp1
|
||||
this.端子1.AutoSize = true;
|
||||
this.tableLayoutPanel1.SetColumnSpan(this.端子1, 2);
|
||||
this.端子1.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.端子1.Location = new System.Drawing.Point(645, 180);
|
||||
this.端子1.Location = new System.Drawing.Point(698, 205);
|
||||
this.端子1.Name = "端子1";
|
||||
this.端子1.Size = new System.Drawing.Size(260, 42);
|
||||
this.端子1.Size = new System.Drawing.Size(295, 48);
|
||||
this.端子1.TabIndex = 1;
|
||||
this.端子1.Text = "12112312312";
|
||||
//
|
||||
@@ -218,9 +218,9 @@ namespace WindowsFormsApp1
|
||||
this.端子2.AutoSize = true;
|
||||
this.tableLayoutPanel1.SetColumnSpan(this.端子2, 2);
|
||||
this.端子2.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.端子2.Location = new System.Drawing.Point(645, 292);
|
||||
this.端子2.Location = new System.Drawing.Point(698, 333);
|
||||
this.端子2.Name = "端子2";
|
||||
this.端子2.Size = new System.Drawing.Size(260, 42);
|
||||
this.端子2.Size = new System.Drawing.Size(295, 48);
|
||||
this.端子2.TabIndex = 6;
|
||||
this.端子2.Text = "12112312312";
|
||||
//
|
||||
@@ -230,9 +230,9 @@ namespace WindowsFormsApp1
|
||||
this.端子3.AutoSize = true;
|
||||
this.tableLayoutPanel1.SetColumnSpan(this.端子3, 2);
|
||||
this.端子3.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.端子3.Location = new System.Drawing.Point(645, 404);
|
||||
this.端子3.Location = new System.Drawing.Point(698, 461);
|
||||
this.端子3.Name = "端子3";
|
||||
this.端子3.Size = new System.Drawing.Size(260, 42);
|
||||
this.端子3.Size = new System.Drawing.Size(295, 48);
|
||||
this.端子3.TabIndex = 5;
|
||||
this.端子3.Text = "12112312312";
|
||||
//
|
||||
@@ -240,12 +240,12 @@ namespace WindowsFormsApp1
|
||||
//
|
||||
this.端子1结果.Anchor = System.Windows.Forms.AnchorStyles.None;
|
||||
this.端子1结果.AutoSize = true;
|
||||
this.端子1结果.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.端子1结果.Location = new System.Drawing.Point(1274, 180);
|
||||
this.端子1结果.Font = new System.Drawing.Font("宋体", 14F, System.Drawing.FontStyle.Bold);
|
||||
this.端子1结果.Location = new System.Drawing.Point(1395, 210);
|
||||
this.端子1结果.Name = "端子1结果";
|
||||
this.端子1结果.Size = new System.Drawing.Size(62, 42);
|
||||
this.端子1结果.Size = new System.Drawing.Size(57, 38);
|
||||
this.端子1结果.TabIndex = 4;
|
||||
this.端子1结果.Text = "OK";
|
||||
this.端子1结果.Text = "NG";
|
||||
//
|
||||
// 请扫描条码
|
||||
//
|
||||
@@ -254,9 +254,9 @@ namespace WindowsFormsApp1
|
||||
this.tableLayoutPanel1.SetColumnSpan(this.请扫描条码, 3);
|
||||
this.请扫描条码.Font = new System.Drawing.Font("宋体", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.请扫描条码.ForeColor = System.Drawing.Color.Red;
|
||||
this.请扫描条码.Location = new System.Drawing.Point(508, 61);
|
||||
this.请扫描条码.Location = new System.Drawing.Point(543, 69);
|
||||
this.请扫描条码.Name = "请扫描条码";
|
||||
this.请扫描条码.Size = new System.Drawing.Size(452, 56);
|
||||
this.请扫描条码.Size = new System.Drawing.Size(515, 64);
|
||||
this.请扫描条码.TabIndex = 0;
|
||||
this.请扫描条码.Text = "请扫描端子条码:";
|
||||
//
|
||||
@@ -265,9 +265,9 @@ namespace WindowsFormsApp1
|
||||
this.label6.Anchor = System.Windows.Forms.AnchorStyles.None;
|
||||
this.label6.AutoSize = true;
|
||||
this.label6.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.label6.Location = new System.Drawing.Point(160, 180);
|
||||
this.label6.Location = new System.Drawing.Point(171, 205);
|
||||
this.label6.Name = "label6";
|
||||
this.label6.Size = new System.Drawing.Size(169, 42);
|
||||
this.label6.Size = new System.Drawing.Size(192, 48);
|
||||
this.label6.TabIndex = 9;
|
||||
this.label6.Text = "端子1:";
|
||||
//
|
||||
@@ -276,9 +276,9 @@ namespace WindowsFormsApp1
|
||||
this.label7.Anchor = System.Windows.Forms.AnchorStyles.None;
|
||||
this.label7.AutoSize = true;
|
||||
this.label7.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.label7.Location = new System.Drawing.Point(160, 292);
|
||||
this.label7.Location = new System.Drawing.Point(171, 333);
|
||||
this.label7.Name = "label7";
|
||||
this.label7.Size = new System.Drawing.Size(169, 42);
|
||||
this.label7.Size = new System.Drawing.Size(192, 48);
|
||||
this.label7.TabIndex = 10;
|
||||
this.label7.Text = "端子2:";
|
||||
//
|
||||
@@ -287,9 +287,9 @@ namespace WindowsFormsApp1
|
||||
this.label8.Anchor = System.Windows.Forms.AnchorStyles.None;
|
||||
this.label8.AutoSize = true;
|
||||
this.label8.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.label8.Location = new System.Drawing.Point(160, 404);
|
||||
this.label8.Location = new System.Drawing.Point(171, 461);
|
||||
this.label8.Name = "label8";
|
||||
this.label8.Size = new System.Drawing.Size(169, 42);
|
||||
this.label8.Size = new System.Drawing.Size(192, 48);
|
||||
this.label8.TabIndex = 11;
|
||||
this.label8.Text = "端子3:";
|
||||
//
|
||||
@@ -297,21 +297,21 @@ namespace WindowsFormsApp1
|
||||
//
|
||||
this.端子1校验.Anchor = System.Windows.Forms.AnchorStyles.None;
|
||||
this.端子1校验.AutoSize = true;
|
||||
this.端子1校验.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.端子1校验.Location = new System.Drawing.Point(1111, 180);
|
||||
this.端子1校验.Font = new System.Drawing.Font("宋体", 14F, System.Drawing.FontStyle.Bold);
|
||||
this.端子1校验.Location = new System.Drawing.Point(1217, 210);
|
||||
this.端子1校验.Name = "端子1校验";
|
||||
this.端子1校验.Size = new System.Drawing.Size(62, 42);
|
||||
this.端子1校验.Size = new System.Drawing.Size(57, 38);
|
||||
this.端子1校验.TabIndex = 15;
|
||||
this.端子1校验.Text = "OK";
|
||||
this.端子1校验.Text = "NG";
|
||||
//
|
||||
// 端子2校验
|
||||
//
|
||||
this.端子2校验.Anchor = System.Windows.Forms.AnchorStyles.None;
|
||||
this.端子2校验.AutoSize = true;
|
||||
this.端子2校验.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.端子2校验.Location = new System.Drawing.Point(1111, 292);
|
||||
this.端子2校验.Font = new System.Drawing.Font("宋体", 14F, System.Drawing.FontStyle.Bold);
|
||||
this.端子2校验.Location = new System.Drawing.Point(1217, 338);
|
||||
this.端子2校验.Name = "端子2校验";
|
||||
this.端子2校验.Size = new System.Drawing.Size(62, 42);
|
||||
this.端子2校验.Size = new System.Drawing.Size(57, 38);
|
||||
this.端子2校验.TabIndex = 16;
|
||||
this.端子2校验.Text = "NG";
|
||||
//
|
||||
@@ -319,12 +319,12 @@ namespace WindowsFormsApp1
|
||||
//
|
||||
this.端子3校验.Anchor = System.Windows.Forms.AnchorStyles.None;
|
||||
this.端子3校验.AutoSize = true;
|
||||
this.端子3校验.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.端子3校验.Location = new System.Drawing.Point(1111, 404);
|
||||
this.端子3校验.Font = new System.Drawing.Font("宋体", 14F, System.Drawing.FontStyle.Bold);
|
||||
this.端子3校验.Location = new System.Drawing.Point(1217, 466);
|
||||
this.端子3校验.Name = "端子3校验";
|
||||
this.端子3校验.Size = new System.Drawing.Size(62, 42);
|
||||
this.端子3校验.Size = new System.Drawing.Size(57, 38);
|
||||
this.端子3校验.TabIndex = 17;
|
||||
this.端子3校验.Text = "OK";
|
||||
this.端子3校验.Text = "NG";
|
||||
//
|
||||
// timer1
|
||||
//
|
||||
@@ -334,16 +334,16 @@ namespace WindowsFormsApp1
|
||||
//
|
||||
// ScanForm_DZ
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(11F, 21F);
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(1647, 704);
|
||||
this.ClientSize = new System.Drawing.Size(1797, 805);
|
||||
this.Controls.Add(this.groupBox1);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
this.Name = "ScanForm_DZ";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "扫码界面";
|
||||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.ScanForm_FormClosing);
|
||||
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.ScanForm_DZ_FormClosed);
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
this.tableLayoutPanel1.ResumeLayout(false);
|
||||
this.tableLayoutPanel1.PerformLayout();
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace WindowsFormsApp1
|
||||
public ScanForm_DZ()
|
||||
{
|
||||
InitializeComponent();
|
||||
Init.ScanPort.DataReceived += SerialPort_DataReceived;
|
||||
Init.ScanPort.DataReceived += SerialPort_DataReceived_DZ;
|
||||
端子1.Text = "";
|
||||
端子2.Text = "";
|
||||
端子3.Text = "";
|
||||
@@ -33,6 +33,18 @@ namespace WindowsFormsApp1
|
||||
private void button1_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.DialogResult = DialogResult.OK;
|
||||
//Init.ScanPort.DataReceived -= SerialPort_DataReceived_DZ;
|
||||
//if (string.IsNullOrEmpty(端子1.Text)
|
||||
// || string.IsNullOrEmpty(端子2.Text)
|
||||
// || string.IsNullOrEmpty(端子3.Text))
|
||||
//{
|
||||
// //MessageBox.Show($"有端子未扫描!");
|
||||
// //return;
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// this.Close();
|
||||
//}
|
||||
this.Close();
|
||||
}
|
||||
|
||||
@@ -54,10 +66,11 @@ namespace WindowsFormsApp1
|
||||
}
|
||||
}
|
||||
|
||||
public void SerialPort_DataReceived(object sender, SerialDataReceivedEventArgs e)
|
||||
public void SerialPort_DataReceived_DZ(object sender, SerialDataReceivedEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
var PlcData = new plcdata();
|
||||
if (!Init.ScanPort.IsOpen)
|
||||
{
|
||||
Init.ScanPort?.Open();
|
||||
@@ -75,14 +88,15 @@ namespace WindowsFormsApp1
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
SQLiteHelper<t_keyvalue> sQLiteHelper_key = new db.SQLiteHelper<t_keyvalue>();
|
||||
var key_sqlresult = sQLiteHelper_key.QueryAll();
|
||||
if (string.IsNullOrWhiteSpace(端子1.Text))
|
||||
{
|
||||
this.Invoke(new Action(() =>
|
||||
{
|
||||
端子1.Text = barcode;
|
||||
}));
|
||||
var result = ApiClient.CallFunctionByName("nowinterface.code", null, new otherdata() { JS_SN = barcode });
|
||||
var result = ApiClient.CallFunctionByName("SN_FeedingCheck", PlcData, new otherdata() { JS_SN = barcode });
|
||||
if (result.Success)
|
||||
{
|
||||
this.Invoke(new Action(() =>
|
||||
@@ -90,7 +104,7 @@ namespace WindowsFormsApp1
|
||||
端子1校验.Text = "校验OK";
|
||||
}));
|
||||
//继续调用接口
|
||||
var result2 = ApiClient.CallFunctionByName("nowinterface.code", null, new otherdata() { JS_SN = barcode });
|
||||
var result2 = ApiClient.CallFunctionByName("Link_Comp", PlcData, new otherdata() { JS_SN = barcode });
|
||||
if (result2.Success)
|
||||
{
|
||||
this.Invoke(new Action(() =>
|
||||
@@ -98,6 +112,13 @@ namespace WindowsFormsApp1
|
||||
端子1结果.Text = "绑定OK";
|
||||
button1.Visible = false;
|
||||
}));
|
||||
// 写数据到 主页的barcode 数据库改,缓存改
|
||||
var txt = Init.t_Keyvalues.FirstOrDefault(a => a.key == "Barcode1");
|
||||
txt.value = 端子1.Text;
|
||||
|
||||
var code = key_sqlresult.Data.First(x => x.key == txt.key);
|
||||
code.value = 端子1.Text;
|
||||
sQLiteHelper_key.Update(code);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -121,7 +142,7 @@ namespace WindowsFormsApp1
|
||||
{
|
||||
端子2.Text = barcode;
|
||||
}));
|
||||
var result = ApiClient.CallFunctionByName("nowinterface.code", null, new otherdata() { JS_SN = barcode });
|
||||
var result = ApiClient.CallFunctionByName("SN_FeedingCheck", PlcData, new otherdata() { JS_SN = barcode });
|
||||
if (result.Success)
|
||||
{
|
||||
this.Invoke(new Action(() =>
|
||||
@@ -130,10 +151,30 @@ namespace WindowsFormsApp1
|
||||
}));
|
||||
//继续调用接口
|
||||
|
||||
this.Invoke(new Action(() =>
|
||||
var result2 = ApiClient.CallFunctionByName("Link_Comp", PlcData, new otherdata() { JS_SN = barcode });
|
||||
if (result2.Success)
|
||||
{
|
||||
button2.Visible = false;
|
||||
}));
|
||||
this.Invoke(new Action(() =>
|
||||
{
|
||||
端子2结果.Text = "绑定OK";
|
||||
button2.Visible = false;
|
||||
}));
|
||||
|
||||
// 写数据到 主页的barcode 数据库改,缓存改
|
||||
var txt = Init.t_Keyvalues.FirstOrDefault(a => a.key == "Barcode2");
|
||||
txt.value = 端子2.Text;
|
||||
|
||||
var code = key_sqlresult.Data.First(x => x.key == txt.key);
|
||||
code.value = 端子2.Text;
|
||||
sQLiteHelper_key.Update(code);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Invoke(new Action(() =>
|
||||
{
|
||||
端子2结果.Text = "绑定NG";
|
||||
}));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -149,7 +190,7 @@ namespace WindowsFormsApp1
|
||||
{
|
||||
端子3.Text = barcode;
|
||||
}));
|
||||
var result = ApiClient.CallFunctionByName("nowinterface.code", null, new otherdata() { JS_SN = barcode });
|
||||
var result = ApiClient.CallFunctionByName("SN_FeedingCheck", PlcData, new otherdata() { JS_SN = barcode });
|
||||
if (result.Success)
|
||||
{
|
||||
this.Invoke(new Action(() =>
|
||||
@@ -157,11 +198,30 @@ namespace WindowsFormsApp1
|
||||
端子3校验.Text = "校验OK";
|
||||
}));
|
||||
|
||||
//继续调用接口
|
||||
this.Invoke(new Action(() =>
|
||||
var result2 = ApiClient.CallFunctionByName("Link_Comp", PlcData, new otherdata() { JS_SN = barcode });
|
||||
if (result2.Success)
|
||||
{
|
||||
button3.Visible = false;
|
||||
}));
|
||||
this.Invoke(new Action(() =>
|
||||
{
|
||||
端子3结果.Text = "绑定OK";
|
||||
button3.Visible = false;
|
||||
}));
|
||||
|
||||
// 写数据到 主页的barcode 数据库改,缓存改
|
||||
var txt = Init.t_Keyvalues.FirstOrDefault(a => a.key == "Barcode3");
|
||||
txt.value = 端子3.Text;
|
||||
|
||||
var code = key_sqlresult.Data.First(x => x.key == txt.key);
|
||||
code.value = 端子3.Text;
|
||||
sQLiteHelper_key.Update(code);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Invoke(new Action(() =>
|
||||
{
|
||||
端子3结果.Text = "绑定NG";
|
||||
}));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -169,7 +229,7 @@ namespace WindowsFormsApp1
|
||||
{
|
||||
端子3校验.Text = "校验NG";
|
||||
}));
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -209,5 +269,10 @@ namespace WindowsFormsApp1
|
||||
{
|
||||
端子3.Text = "";
|
||||
}
|
||||
|
||||
private void ScanForm_DZ_FormClosed(object sender, FormClosedEventArgs e)
|
||||
{
|
||||
FormHelp.RemoveAllEventHandlers(Init.ScanPort, "DataReceived");
|
||||
}
|
||||
}
|
||||
}
|
||||
+21
-20
@@ -48,10 +48,10 @@
|
||||
this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.groupBox1.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.groupBox1.Location = new System.Drawing.Point(0, 0);
|
||||
this.groupBox1.Margin = new System.Windows.Forms.Padding(6, 5, 6, 5);
|
||||
this.groupBox1.Margin = new System.Windows.Forms.Padding(7, 6, 7, 6);
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.Padding = new System.Windows.Forms.Padding(6, 5, 6, 5);
|
||||
this.groupBox1.Size = new System.Drawing.Size(1647, 704);
|
||||
this.groupBox1.Padding = new System.Windows.Forms.Padding(7, 6, 7, 6);
|
||||
this.groupBox1.Size = new System.Drawing.Size(1797, 805);
|
||||
this.groupBox1.TabIndex = 5;
|
||||
this.groupBox1.TabStop = false;
|
||||
this.groupBox1.Text = "物料扫码";
|
||||
@@ -71,7 +71,7 @@
|
||||
this.tableLayoutPanel1.Controls.Add(this.确认, 1, 6);
|
||||
this.tableLayoutPanel1.Controls.Add(this.取消, 3, 6);
|
||||
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tableLayoutPanel1.Location = new System.Drawing.Point(6, 37);
|
||||
this.tableLayoutPanel1.Location = new System.Drawing.Point(7, 43);
|
||||
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
|
||||
this.tableLayoutPanel1.RowCount = 8;
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 4.588645F));
|
||||
@@ -82,16 +82,16 @@
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 9.50806F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 13.76593F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 17.19009F));
|
||||
this.tableLayoutPanel1.Size = new System.Drawing.Size(1635, 662);
|
||||
this.tableLayoutPanel1.Size = new System.Drawing.Size(1783, 756);
|
||||
this.tableLayoutPanel1.TabIndex = 0;
|
||||
//
|
||||
// button1
|
||||
//
|
||||
this.button1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.button1.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.button1.Location = new System.Drawing.Point(184, 304);
|
||||
this.button1.Location = new System.Drawing.Point(201, 347);
|
||||
this.button1.Name = "button1";
|
||||
this.button1.Size = new System.Drawing.Size(539, 85);
|
||||
this.button1.Size = new System.Drawing.Size(588, 98);
|
||||
this.button1.TabIndex = 4;
|
||||
this.button1.Text = "位置1";
|
||||
this.button1.UseVisualStyleBackColor = true;
|
||||
@@ -101,9 +101,9 @@
|
||||
//
|
||||
this.button2.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.button2.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.button2.Location = new System.Drawing.Point(910, 304);
|
||||
this.button2.Location = new System.Drawing.Point(993, 347);
|
||||
this.button2.Name = "button2";
|
||||
this.button2.Size = new System.Drawing.Size(539, 85);
|
||||
this.button2.Size = new System.Drawing.Size(588, 98);
|
||||
this.button2.TabIndex = 5;
|
||||
this.button2.Text = "位置2";
|
||||
this.button2.UseVisualStyleBackColor = true;
|
||||
@@ -116,9 +116,9 @@
|
||||
this.tableLayoutPanel1.SetColumnSpan(this.请扫描条码, 3);
|
||||
this.请扫描条码.Font = new System.Drawing.Font("宋体", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.请扫描条码.ForeColor = System.Drawing.Color.Red;
|
||||
this.请扫描条码.Location = new System.Drawing.Point(647, 47);
|
||||
this.请扫描条码.Location = new System.Drawing.Point(698, 54);
|
||||
this.请扫描条码.Name = "请扫描条码";
|
||||
this.请扫描条码.Size = new System.Drawing.Size(338, 56);
|
||||
this.请扫描条码.Size = new System.Drawing.Size(385, 64);
|
||||
this.请扫描条码.TabIndex = 0;
|
||||
this.请扫描条码.Text = "请扫描条码:";
|
||||
//
|
||||
@@ -128,9 +128,9 @@
|
||||
this.LOt号.AutoSize = true;
|
||||
this.tableLayoutPanel1.SetColumnSpan(this.LOt号, 3);
|
||||
this.LOt号.Font = new System.Drawing.Font("宋体", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.LOt号.Location = new System.Drawing.Point(544, 153);
|
||||
this.LOt号.Location = new System.Drawing.Point(581, 175);
|
||||
this.LOt号.Name = "LOt号";
|
||||
this.LOt号.Size = new System.Drawing.Size(544, 56);
|
||||
this.LOt号.Size = new System.Drawing.Size(619, 64);
|
||||
this.LOt号.TabIndex = 1;
|
||||
this.LOt号.Text = "LOt号:12112312312";
|
||||
//
|
||||
@@ -138,9 +138,9 @@
|
||||
//
|
||||
this.确认.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.确认.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.确认.Location = new System.Drawing.Point(184, 457);
|
||||
this.确认.Location = new System.Drawing.Point(201, 522);
|
||||
this.确认.Name = "确认";
|
||||
this.确认.Size = new System.Drawing.Size(539, 85);
|
||||
this.确认.Size = new System.Drawing.Size(588, 98);
|
||||
this.确认.TabIndex = 2;
|
||||
this.确认.Text = "上线";
|
||||
this.确认.UseVisualStyleBackColor = true;
|
||||
@@ -150,9 +150,9 @@
|
||||
//
|
||||
this.取消.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.取消.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.取消.Location = new System.Drawing.Point(910, 457);
|
||||
this.取消.Location = new System.Drawing.Point(993, 522);
|
||||
this.取消.Name = "取消";
|
||||
this.取消.Size = new System.Drawing.Size(539, 85);
|
||||
this.取消.Size = new System.Drawing.Size(588, 98);
|
||||
this.取消.TabIndex = 3;
|
||||
this.取消.Text = "下线";
|
||||
this.取消.UseVisualStyleBackColor = true;
|
||||
@@ -166,15 +166,16 @@
|
||||
//
|
||||
// ScanForm_SSQ
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(11F, 21F);
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(1647, 704);
|
||||
this.ClientSize = new System.Drawing.Size(1797, 805);
|
||||
this.Controls.Add(this.groupBox1);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
this.Name = "ScanForm_SSQ";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "扫码界面";
|
||||
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.ScanForm_SSQ_FormClosed);
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
this.tableLayoutPanel1.ResumeLayout(false);
|
||||
this.tableLayoutPanel1.PerformLayout();
|
||||
|
||||
@@ -12,6 +12,7 @@ using System.Windows.Forms;
|
||||
using WindowsFormsApp1.db;
|
||||
using WindowsFormsApp1.mod;
|
||||
using WindowsFormsApp1.mod.database;
|
||||
using WindowsFormsApp1.mod.server;
|
||||
using WindowsFormsApp1.server;
|
||||
using static System.Windows.Forms.VisualStyles.VisualStyleElement;
|
||||
|
||||
@@ -25,12 +26,12 @@ namespace WindowsFormsApp1
|
||||
/// </summary>
|
||||
int index = 0;
|
||||
public string ReturnValue { get; set; }
|
||||
public ApiClient ApiClient = new ApiClient();
|
||||
public ScanForm_SSQ()
|
||||
{
|
||||
InitializeComponent();
|
||||
//Init.ScanPort.DataReceived += SerialPort_DataReceived;
|
||||
Init.ScanPort.DataReceived += SerialPort_DataReceived_SSQ;
|
||||
LOt号.Visible = false;
|
||||
|
||||
}
|
||||
private void button1_Click(object sender, EventArgs e)
|
||||
{
|
||||
@@ -39,9 +40,25 @@ namespace WindowsFormsApp1
|
||||
MessageBox.Show("扫码为空,请确认!");
|
||||
return;
|
||||
}
|
||||
|
||||
LogExecute.logNet.WriteDebug($"{ReturnValue}上线点击");
|
||||
//this.Close();
|
||||
//请求后端接口,index代表位置
|
||||
//更新下数据库和init里面的keyvalue值
|
||||
var PlcData = new plcdata();
|
||||
var OtherData = new otherdata();
|
||||
OtherData.locationindex = index;
|
||||
OtherData.opindex = 1;
|
||||
OtherData.JS_SN = ReturnValue;
|
||||
|
||||
var result = ApiClient.CallFunctionByName("Glue_CheckOut", PlcData, OtherData);
|
||||
if (result.Success && result.Mesresult == mesresult.PASS)
|
||||
{
|
||||
this.Close();
|
||||
}
|
||||
else
|
||||
{
|
||||
//失败逻辑
|
||||
}
|
||||
//更新下数据库和init里面的keyvalue值,缓存
|
||||
}
|
||||
|
||||
private void button2_Click(object sender, EventArgs e)
|
||||
@@ -51,8 +68,25 @@ namespace WindowsFormsApp1
|
||||
MessageBox.Show("扫码为空,请确认!");
|
||||
return;
|
||||
}
|
||||
LogExecute.logNet.WriteDebug($"{ReturnValue}下线点击");
|
||||
this.Close();
|
||||
//请求后端接口,index代表位置
|
||||
//更新下数据库和init里面的keyvalue值
|
||||
var PlcData = new plcdata();
|
||||
var OtherData = new otherdata();
|
||||
OtherData.locationindex = index;
|
||||
OtherData.opindex = 1;
|
||||
OtherData.JS_SN = ReturnValue;
|
||||
|
||||
var result = ApiClient.CallFunctionByName("Glue_CheckOut", PlcData, OtherData);
|
||||
if (result.Success)
|
||||
{
|
||||
this.Close();
|
||||
}
|
||||
else
|
||||
{
|
||||
//失败逻辑
|
||||
}
|
||||
//更新下数据库和init里面的keyvalue值,删除缓存
|
||||
}
|
||||
|
||||
private void timer1_Tick(object sender, EventArgs e)
|
||||
@@ -67,7 +101,7 @@ namespace WindowsFormsApp1
|
||||
}
|
||||
}
|
||||
|
||||
public void SerialPort_DataReceived(object sender, SerialDataReceivedEventArgs e)
|
||||
public void SerialPort_DataReceived_SSQ(object sender, SerialDataReceivedEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -135,5 +169,10 @@ namespace WindowsFormsApp1
|
||||
button1.BackColor = SystemColors.Control;
|
||||
}
|
||||
}
|
||||
|
||||
private void ScanForm_SSQ_FormClosed(object sender, FormClosedEventArgs e)
|
||||
{
|
||||
FormHelp.RemoveAllEventHandlers(Init.ScanPort, "DataReceived");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -30,11 +30,11 @@ namespace WindowsFormsApp1.form
|
||||
MessageBox.Show("关键字不能为空");
|
||||
return;
|
||||
}
|
||||
if (string.IsNullOrWhiteSpace(值.Text))
|
||||
{
|
||||
MessageBox.Show("值不能为空");
|
||||
return;
|
||||
}
|
||||
//if (string.IsNullOrWhiteSpace(值.Text))
|
||||
//{
|
||||
// MessageBox.Show("值不能为空");
|
||||
// return;
|
||||
//}
|
||||
if (string.IsNullOrWhiteSpace(备注.Text))
|
||||
{
|
||||
MessageBox.Show("备注不能为空");
|
||||
|
||||
+73
-73
@@ -41,9 +41,9 @@
|
||||
this.label7 = new System.Windows.Forms.Label();
|
||||
this.产线编号 = new System.Windows.Forms.TextBox();
|
||||
this.关联流程 = new System.Windows.Forms.ComboBox();
|
||||
this.备用显示1 = new System.Windows.Forms.TextBox();
|
||||
this.备用显示2 = new System.Windows.Forms.TextBox();
|
||||
this.备用显示3 = new System.Windows.Forms.TextBox();
|
||||
this.Line = new System.Windows.Forms.TextBox();
|
||||
this.StationID = new System.Windows.Forms.TextBox();
|
||||
this.MachineID = new System.Windows.Forms.TextBox();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.label6 = new System.Windows.Forms.Label();
|
||||
this.label8 = new System.Windows.Forms.Label();
|
||||
@@ -73,9 +73,9 @@
|
||||
this.tableLayoutPanel1.Controls.Add(this.label7, 1, 2);
|
||||
this.tableLayoutPanel1.Controls.Add(this.产线编号, 2, 2);
|
||||
this.tableLayoutPanel1.Controls.Add(this.关联流程, 2, 5);
|
||||
this.tableLayoutPanel1.Controls.Add(this.备用显示1, 4, 1);
|
||||
this.tableLayoutPanel1.Controls.Add(this.备用显示2, 4, 2);
|
||||
this.tableLayoutPanel1.Controls.Add(this.备用显示3, 4, 3);
|
||||
this.tableLayoutPanel1.Controls.Add(this.Line, 4, 1);
|
||||
this.tableLayoutPanel1.Controls.Add(this.StationID, 4, 2);
|
||||
this.tableLayoutPanel1.Controls.Add(this.MachineID, 4, 3);
|
||||
this.tableLayoutPanel1.Controls.Add(this.label5, 3, 1);
|
||||
this.tableLayoutPanel1.Controls.Add(this.label6, 3, 2);
|
||||
this.tableLayoutPanel1.Controls.Add(this.label8, 3, 3);
|
||||
@@ -96,7 +96,7 @@
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F));
|
||||
this.tableLayoutPanel1.Size = new System.Drawing.Size(1087, 854);
|
||||
this.tableLayoutPanel1.Size = new System.Drawing.Size(1186, 976);
|
||||
this.tableLayoutPanel1.TabIndex = 0;
|
||||
//
|
||||
// label1
|
||||
@@ -104,9 +104,9 @@
|
||||
this.label1.Anchor = System.Windows.Forms.AnchorStyles.None;
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.label1.Location = new System.Drawing.Point(182, 113);
|
||||
this.label1.Location = new System.Drawing.Point(197, 129);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(68, 28);
|
||||
this.label1.Size = new System.Drawing.Size(79, 33);
|
||||
this.label1.TabIndex = 0;
|
||||
this.label1.Text = "名称";
|
||||
//
|
||||
@@ -115,9 +115,9 @@
|
||||
this.button1.Anchor = System.Windows.Forms.AnchorStyles.None;
|
||||
this.tableLayoutPanel1.SetColumnSpan(this.button1, 2);
|
||||
this.button1.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.button1.Location = new System.Drawing.Point(228, 683);
|
||||
this.button1.Location = new System.Drawing.Point(249, 779);
|
||||
this.button1.Name = "button1";
|
||||
this.button1.Size = new System.Drawing.Size(194, 79);
|
||||
this.button1.Size = new System.Drawing.Size(212, 90);
|
||||
this.button1.TabIndex = 14;
|
||||
this.button1.Text = "保存";
|
||||
this.button1.UseVisualStyleBackColor = true;
|
||||
@@ -128,9 +128,9 @@
|
||||
this.button2.Anchor = System.Windows.Forms.AnchorStyles.None;
|
||||
this.tableLayoutPanel1.SetColumnSpan(this.button2, 2);
|
||||
this.button2.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.button2.Location = new System.Drawing.Point(664, 683);
|
||||
this.button2.Location = new System.Drawing.Point(725, 779);
|
||||
this.button2.Name = "button2";
|
||||
this.button2.Size = new System.Drawing.Size(190, 79);
|
||||
this.button2.Size = new System.Drawing.Size(207, 90);
|
||||
this.button2.TabIndex = 15;
|
||||
this.button2.Text = "取消";
|
||||
this.button2.UseVisualStyleBackColor = true;
|
||||
@@ -140,9 +140,9 @@
|
||||
//
|
||||
this.名称.Anchor = System.Windows.Forms.AnchorStyles.None;
|
||||
this.名称.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.名称.Location = new System.Drawing.Point(328, 108);
|
||||
this.名称.Location = new System.Drawing.Point(358, 123);
|
||||
this.名称.Name = "名称";
|
||||
this.名称.Size = new System.Drawing.Size(211, 39);
|
||||
this.名称.Size = new System.Drawing.Size(230, 44);
|
||||
this.名称.TabIndex = 16;
|
||||
//
|
||||
// label4
|
||||
@@ -150,9 +150,9 @@
|
||||
this.label4.Anchor = System.Windows.Forms.AnchorStyles.None;
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.label4.Location = new System.Drawing.Point(154, 453);
|
||||
this.label4.Location = new System.Drawing.Point(165, 517);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(124, 28);
|
||||
this.label4.Size = new System.Drawing.Size(143, 33);
|
||||
this.label4.TabIndex = 3;
|
||||
this.label4.Text = "关联流程";
|
||||
//
|
||||
@@ -161,39 +161,39 @@
|
||||
this.label3.Anchor = System.Windows.Forms.AnchorStyles.None;
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.label3.Location = new System.Drawing.Point(182, 368);
|
||||
this.label3.Location = new System.Drawing.Point(197, 420);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(68, 28);
|
||||
this.label3.Size = new System.Drawing.Size(79, 33);
|
||||
this.label3.TabIndex = 2;
|
||||
this.label3.Text = "模组";
|
||||
this.label3.Text = "Mold";
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.Anchor = System.Windows.Forms.AnchorStyles.None;
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.label2.Location = new System.Drawing.Point(154, 283);
|
||||
this.label2.Location = new System.Drawing.Point(189, 323);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(124, 28);
|
||||
this.label2.Size = new System.Drawing.Size(95, 33);
|
||||
this.label2.TabIndex = 1;
|
||||
this.label2.Text = "产线类型";
|
||||
this.label2.Text = "FixSn";
|
||||
//
|
||||
// 模组
|
||||
//
|
||||
this.模组.Anchor = System.Windows.Forms.AnchorStyles.None;
|
||||
this.模组.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.模组.Location = new System.Drawing.Point(328, 363);
|
||||
this.模组.Location = new System.Drawing.Point(358, 414);
|
||||
this.模组.Name = "模组";
|
||||
this.模组.Size = new System.Drawing.Size(211, 39);
|
||||
this.模组.Size = new System.Drawing.Size(230, 44);
|
||||
this.模组.TabIndex = 20;
|
||||
//
|
||||
// 产线类型
|
||||
//
|
||||
this.产线类型.Anchor = System.Windows.Forms.AnchorStyles.None;
|
||||
this.产线类型.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.产线类型.Location = new System.Drawing.Point(328, 278);
|
||||
this.产线类型.Location = new System.Drawing.Point(358, 317);
|
||||
this.产线类型.Name = "产线类型";
|
||||
this.产线类型.Size = new System.Drawing.Size(211, 39);
|
||||
this.产线类型.Size = new System.Drawing.Size(230, 44);
|
||||
this.产线类型.TabIndex = 17;
|
||||
//
|
||||
// label7
|
||||
@@ -201,19 +201,19 @@
|
||||
this.label7.Anchor = System.Windows.Forms.AnchorStyles.None;
|
||||
this.label7.AutoSize = true;
|
||||
this.label7.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.label7.Location = new System.Drawing.Point(154, 198);
|
||||
this.label7.Location = new System.Drawing.Point(189, 226);
|
||||
this.label7.Name = "label7";
|
||||
this.label7.Size = new System.Drawing.Size(124, 28);
|
||||
this.label7.Size = new System.Drawing.Size(95, 33);
|
||||
this.label7.TabIndex = 29;
|
||||
this.label7.Text = "产线编号";
|
||||
this.label7.Text = "Token";
|
||||
//
|
||||
// 产线编号
|
||||
//
|
||||
this.产线编号.Anchor = System.Windows.Forms.AnchorStyles.None;
|
||||
this.产线编号.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.产线编号.Location = new System.Drawing.Point(328, 193);
|
||||
this.产线编号.Location = new System.Drawing.Point(358, 220);
|
||||
this.产线编号.Name = "产线编号";
|
||||
this.产线编号.Size = new System.Drawing.Size(211, 39);
|
||||
this.产线编号.Size = new System.Drawing.Size(230, 44);
|
||||
this.产线编号.TabIndex = 30;
|
||||
//
|
||||
// 关联流程
|
||||
@@ -222,79 +222,79 @@
|
||||
this.tableLayoutPanel1.SetColumnSpan(this.关联流程, 3);
|
||||
this.关联流程.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.关联流程.FormattingEnabled = true;
|
||||
this.关联流程.Location = new System.Drawing.Point(364, 453);
|
||||
this.关联流程.Location = new System.Drawing.Point(398, 517);
|
||||
this.关联流程.Name = "关联流程";
|
||||
this.关联流程.Size = new System.Drawing.Size(573, 36);
|
||||
this.关联流程.Size = new System.Drawing.Size(625, 41);
|
||||
this.关联流程.TabIndex = 31;
|
||||
//
|
||||
// 备用显示1
|
||||
// Line
|
||||
//
|
||||
this.备用显示1.Anchor = System.Windows.Forms.AnchorStyles.None;
|
||||
this.备用显示1.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.备用显示1.Location = new System.Drawing.Point(762, 108);
|
||||
this.备用显示1.Name = "备用显示1";
|
||||
this.备用显示1.Size = new System.Drawing.Size(211, 39);
|
||||
this.备用显示1.TabIndex = 32;
|
||||
this.Line.Anchor = System.Windows.Forms.AnchorStyles.None;
|
||||
this.Line.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.Line.Location = new System.Drawing.Point(832, 123);
|
||||
this.Line.Name = "Line";
|
||||
this.Line.Size = new System.Drawing.Size(230, 44);
|
||||
this.Line.TabIndex = 32;
|
||||
//
|
||||
// 备用显示2
|
||||
// StationID
|
||||
//
|
||||
this.备用显示2.Anchor = System.Windows.Forms.AnchorStyles.None;
|
||||
this.备用显示2.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.备用显示2.Location = new System.Drawing.Point(762, 193);
|
||||
this.备用显示2.Name = "备用显示2";
|
||||
this.备用显示2.Size = new System.Drawing.Size(211, 39);
|
||||
this.备用显示2.TabIndex = 33;
|
||||
this.StationID.Anchor = System.Windows.Forms.AnchorStyles.None;
|
||||
this.StationID.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.StationID.Location = new System.Drawing.Point(832, 220);
|
||||
this.StationID.Name = "StationID";
|
||||
this.StationID.Size = new System.Drawing.Size(230, 44);
|
||||
this.StationID.TabIndex = 33;
|
||||
//
|
||||
// 备用显示3
|
||||
// MachineID
|
||||
//
|
||||
this.备用显示3.Anchor = System.Windows.Forms.AnchorStyles.None;
|
||||
this.备用显示3.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.备用显示3.Location = new System.Drawing.Point(762, 278);
|
||||
this.备用显示3.Name = "备用显示3";
|
||||
this.备用显示3.Size = new System.Drawing.Size(211, 39);
|
||||
this.备用显示3.TabIndex = 34;
|
||||
this.MachineID.Anchor = System.Windows.Forms.AnchorStyles.None;
|
||||
this.MachineID.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.MachineID.Location = new System.Drawing.Point(832, 317);
|
||||
this.MachineID.Name = "MachineID";
|
||||
this.MachineID.Size = new System.Drawing.Size(230, 44);
|
||||
this.MachineID.TabIndex = 34;
|
||||
//
|
||||
// label5
|
||||
//
|
||||
this.label5.Anchor = System.Windows.Forms.AnchorStyles.None;
|
||||
this.label5.AutoSize = true;
|
||||
this.label5.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.label5.Location = new System.Drawing.Point(581, 113);
|
||||
this.label5.Location = new System.Drawing.Point(671, 129);
|
||||
this.label5.Name = "label5";
|
||||
this.label5.Size = new System.Drawing.Size(138, 28);
|
||||
this.label5.Size = new System.Drawing.Size(79, 33);
|
||||
this.label5.TabIndex = 35;
|
||||
this.label5.Text = "备用显示1";
|
||||
this.label5.Text = "Line";
|
||||
//
|
||||
// label6
|
||||
//
|
||||
this.label6.Anchor = System.Windows.Forms.AnchorStyles.None;
|
||||
this.label6.AutoSize = true;
|
||||
this.label6.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.label6.Location = new System.Drawing.Point(581, 198);
|
||||
this.label6.Location = new System.Drawing.Point(631, 226);
|
||||
this.label6.Name = "label6";
|
||||
this.label6.Size = new System.Drawing.Size(138, 28);
|
||||
this.label6.Size = new System.Drawing.Size(159, 33);
|
||||
this.label6.TabIndex = 36;
|
||||
this.label6.Text = "备用显示2";
|
||||
this.label6.Text = "StationID";
|
||||
//
|
||||
// label8
|
||||
//
|
||||
this.label8.Anchor = System.Windows.Forms.AnchorStyles.None;
|
||||
this.label8.AutoSize = true;
|
||||
this.label8.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.label8.Location = new System.Drawing.Point(581, 283);
|
||||
this.label8.Location = new System.Drawing.Point(631, 323);
|
||||
this.label8.Name = "label8";
|
||||
this.label8.Size = new System.Drawing.Size(138, 28);
|
||||
this.label8.Size = new System.Drawing.Size(159, 33);
|
||||
this.label8.TabIndex = 37;
|
||||
this.label8.Text = "备用显示3";
|
||||
this.label8.Text = "MachineID";
|
||||
//
|
||||
// label9
|
||||
//
|
||||
this.label9.Anchor = System.Windows.Forms.AnchorStyles.None;
|
||||
this.label9.AutoSize = true;
|
||||
this.label9.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.label9.Location = new System.Drawing.Point(161, 538);
|
||||
this.label9.Location = new System.Drawing.Point(173, 614);
|
||||
this.label9.Name = "label9";
|
||||
this.label9.Size = new System.Drawing.Size(110, 28);
|
||||
this.label9.Size = new System.Drawing.Size(127, 33);
|
||||
this.label9.TabIndex = 38;
|
||||
this.label9.Text = "关联PLC";
|
||||
//
|
||||
@@ -304,16 +304,16 @@
|
||||
this.tableLayoutPanel1.SetColumnSpan(this.关联PLC, 3);
|
||||
this.关联PLC.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.关联PLC.FormattingEnabled = true;
|
||||
this.关联PLC.Location = new System.Drawing.Point(364, 538);
|
||||
this.关联PLC.Location = new System.Drawing.Point(398, 614);
|
||||
this.关联PLC.Name = "关联PLC";
|
||||
this.关联PLC.Size = new System.Drawing.Size(573, 36);
|
||||
this.关联PLC.Size = new System.Drawing.Size(625, 41);
|
||||
this.关联PLC.TabIndex = 39;
|
||||
//
|
||||
// Line_Insert
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(11F, 21F);
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(1087, 854);
|
||||
this.ClientSize = new System.Drawing.Size(1186, 976);
|
||||
this.Controls.Add(this.tableLayoutPanel1);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.Name = "Line_Insert";
|
||||
@@ -340,9 +340,9 @@
|
||||
private System.Windows.Forms.Label label7;
|
||||
private System.Windows.Forms.TextBox 产线编号;
|
||||
private System.Windows.Forms.ComboBox 关联流程;
|
||||
private System.Windows.Forms.TextBox 备用显示1;
|
||||
private System.Windows.Forms.TextBox 备用显示2;
|
||||
private System.Windows.Forms.TextBox 备用显示3;
|
||||
private System.Windows.Forms.TextBox Line;
|
||||
private System.Windows.Forms.TextBox StationID;
|
||||
private System.Windows.Forms.TextBox MachineID;
|
||||
private System.Windows.Forms.Label label5;
|
||||
private System.Windows.Forms.Label label6;
|
||||
private System.Windows.Forms.Label label8;
|
||||
|
||||
@@ -31,36 +31,36 @@ namespace WindowsFormsApp1.form
|
||||
MessageBox.Show("名称不能为空");
|
||||
return;
|
||||
}
|
||||
if (string.IsNullOrWhiteSpace(产线类型.Text))
|
||||
{
|
||||
MessageBox.Show("产线类型不能为空");
|
||||
return;
|
||||
}
|
||||
if (string.IsNullOrWhiteSpace(产线编号.Text))
|
||||
{
|
||||
MessageBox.Show("产线编号不能为空");
|
||||
return;
|
||||
}
|
||||
if (string.IsNullOrWhiteSpace(模组.Text))
|
||||
{
|
||||
MessageBox.Show("模组不能为空");
|
||||
return;
|
||||
}
|
||||
if (string.IsNullOrWhiteSpace(备用显示1.Text))
|
||||
{
|
||||
MessageBox.Show("备用显示1不能为空");
|
||||
return;
|
||||
}
|
||||
if (string.IsNullOrWhiteSpace(备用显示2.Text))
|
||||
{
|
||||
MessageBox.Show("备用显示2不能为空");
|
||||
return;
|
||||
}
|
||||
if (string.IsNullOrWhiteSpace(备用显示3.Text))
|
||||
{
|
||||
MessageBox.Show("备用显示3不能为空");
|
||||
return;
|
||||
}
|
||||
//if (string.IsNullOrWhiteSpace(产线类型.Text))
|
||||
//{
|
||||
// MessageBox.Show("产线类型不能为空");
|
||||
// return;
|
||||
//}
|
||||
//if (string.IsNullOrWhiteSpace(产线编号.Text))
|
||||
//{
|
||||
// MessageBox.Show("产线编号不能为空");
|
||||
// return;
|
||||
//}
|
||||
//if (string.IsNullOrWhiteSpace(模组.Text))
|
||||
//{
|
||||
// MessageBox.Show("模组不能为空");
|
||||
// return;
|
||||
//}
|
||||
//if (string.IsNullOrWhiteSpace(Line.Text))
|
||||
//{
|
||||
// MessageBox.Show("Line不能为空");
|
||||
// return;
|
||||
//}
|
||||
//if (string.IsNullOrWhiteSpace(StationID.Text))
|
||||
//{
|
||||
// MessageBox.Show("StationID不能为空");
|
||||
// return;
|
||||
//}
|
||||
//if (string.IsNullOrWhiteSpace(MachineID.Text))
|
||||
//{
|
||||
// MessageBox.Show("MachineID不能为空");
|
||||
// return;
|
||||
//}
|
||||
if (关联流程.SelectedValue == null || (int)关联流程.SelectedValue == 0)
|
||||
{
|
||||
MessageBox.Show("关联流程不能为空");
|
||||
@@ -74,14 +74,17 @@ namespace WindowsFormsApp1.form
|
||||
|
||||
t_line t_Flow = new t_line();
|
||||
t_Flow.linename = 名称.Text;
|
||||
t_Flow.linetype = 产线类型.Text;
|
||||
t_Flow.linecode = 产线编号.Text;
|
||||
t_Flow.linemode = 模组.Text;
|
||||
//t_Flow.linetype = 产线类型.Text;
|
||||
//t_Flow.linecode = 产线编号.Text;
|
||||
//t_Flow.linemode = 模组.Text;
|
||||
t_Flow.flowid = (int)关联流程.SelectedValue;
|
||||
t_Flow.plcid = (int)关联PLC.SelectedValue;
|
||||
t_Flow.lineremark1 = 备用显示1.Text;
|
||||
t_Flow.lineremark2 = 备用显示2.Text;
|
||||
t_Flow.lineremark3 = 备用显示3.Text;
|
||||
t_Flow.lineremark1 = Line.Text;
|
||||
t_Flow.lineremark2 = StationID.Text;
|
||||
t_Flow.lineremark3 = MachineID.Text;
|
||||
t_Flow.lineremark4 = 产线编号.Text;
|
||||
t_Flow.lineremark5 = 产线类型.Text;
|
||||
t_Flow.lineremark6 = 模组.Text;
|
||||
|
||||
|
||||
SQLiteHelper<t_line> sQLiteHelper1 = new db.SQLiteHelper<t_line>();
|
||||
@@ -92,7 +95,7 @@ namespace WindowsFormsApp1.form
|
||||
}
|
||||
else
|
||||
{
|
||||
sQLiteHelper1.Insert(t_Flow);
|
||||
var re = sQLiteHelper1.Insert(t_Flow);
|
||||
}
|
||||
MessageBox.Show("保存成功");
|
||||
this.Close();
|
||||
@@ -158,12 +161,12 @@ namespace WindowsFormsApp1.form
|
||||
}
|
||||
var DataToEdit = result.Data;
|
||||
名称.Text = DataToEdit.linename;
|
||||
产线编号.Text = DataToEdit.linecode;
|
||||
产线类型.Text = DataToEdit.linetype;
|
||||
模组.Text = DataToEdit.linemode;
|
||||
备用显示1.Text = DataToEdit.lineremark1;
|
||||
备用显示2.Text = DataToEdit.lineremark2;
|
||||
备用显示3.Text = DataToEdit.lineremark3;
|
||||
产线编号.Text = DataToEdit.lineremark4;
|
||||
产线类型.Text = DataToEdit.lineremark5;
|
||||
模组.Text = DataToEdit.lineremark6;
|
||||
Line.Text = DataToEdit.lineremark1;
|
||||
StationID.Text = DataToEdit.lineremark2;
|
||||
MachineID.Text = DataToEdit.lineremark3;
|
||||
SelectItemByValue(关联流程, DataToEdit.flowid.ToString());
|
||||
SelectItemByValue2(关联PLC, DataToEdit.plcid.ToString());
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user