From f1e0412c014b60cd0c9750a59c8c4e1d0c4cb8e6 Mon Sep 17 00:00:00 2001 From: bnala Date: Wed, 19 Feb 2025 16:13:49 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0COM=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E5=8F=8A=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WindowsFormsApp1/MES_PLC_Control.csproj | 10 + WindowsFormsApp1/MainForm.Designer.cs | 757 +++++++++--------- WindowsFormsApp1/MainForm.cs | 310 ++++--- WindowsFormsApp1/Program.cs | 2 +- WindowsFormsApp1/db/MES_PLC.db | Bin 139264 -> 139264 bytes WindowsFormsApp1/form/FLOW_Manage.Designer.cs | 150 ++-- WindowsFormsApp1/form/LINE_Manage.Designer.cs | 178 ++-- WindowsFormsApp1/form/MES_URL.Designer.cs | 121 +-- .../form/PLCADDRESS_Manage.Designer.cs | 206 ++--- WindowsFormsApp1/form/PLC_Manage.Designer.cs | 46 +- .../form/SerialPort_Manage.Designer.cs | 254 ++++++ WindowsFormsApp1/form/SerialPort_Manage.cs | 79 ++ WindowsFormsApp1/form/SerialPort_Manage.resx | 144 ++++ WindowsFormsApp1/form/USER_Manage.Designer.cs | 47 +- WindowsFormsApp1/mod/database/t_serialport.cs | 36 + WindowsFormsApp1/mod/server/otherdata.cs | 4 +- 16 files changed, 1513 insertions(+), 831 deletions(-) create mode 100644 WindowsFormsApp1/form/SerialPort_Manage.Designer.cs create mode 100644 WindowsFormsApp1/form/SerialPort_Manage.cs create mode 100644 WindowsFormsApp1/form/SerialPort_Manage.resx create mode 100644 WindowsFormsApp1/mod/database/t_serialport.cs diff --git a/WindowsFormsApp1/MES_PLC_Control.csproj b/WindowsFormsApp1/MES_PLC_Control.csproj index a99a225..b417f2d 100644 --- a/WindowsFormsApp1/MES_PLC_Control.csproj +++ b/WindowsFormsApp1/MES_PLC_Control.csproj @@ -69,6 +69,12 @@ LINE_Manage.cs + + Form + + + SerialPort_Manage.cs + Form @@ -110,6 +116,7 @@ + @@ -135,6 +142,9 @@ LINE_Manage.cs + + SerialPort_Manage.cs + PLCADDRESS_Manage.cs diff --git a/WindowsFormsApp1/MainForm.Designer.cs b/WindowsFormsApp1/MainForm.Designer.cs index 19081c1..fd69b8e 100644 --- a/WindowsFormsApp1/MainForm.Designer.cs +++ b/WindowsFormsApp1/MainForm.Designer.cs @@ -45,9 +45,35 @@ this.扭力曲线配置ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.系统参数配置ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); + this.tableLayoutPanel4 = new System.Windows.Forms.TableLayoutPanel(); + this.gropb = new System.Windows.Forms.GroupBox(); + this.tableLayoutPanel6 = new System.Windows.Forms.TableLayoutPanel(); + this.Tray盘 = new System.Windows.Forms.Label(); + this.Tray盘二维码 = new System.Windows.Forms.Label(); + this.原料包装LOT号 = new System.Windows.Forms.GroupBox(); + this.tableLayoutPanel5 = new System.Windows.Forms.TableLayoutPanel(); + this.LOT号扫描 = new System.Windows.Forms.Label(); + this.LOT号显示 = new System.Windows.Forms.Label(); + this.LOT号 = new System.Windows.Forms.Label(); + this.请扫描LOT号 = new System.Windows.Forms.Label(); + this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.tableLayoutPanel7 = new System.Windows.Forms.TableLayoutPanel(); + this.事件4时间 = new System.Windows.Forms.Label(); + this.事件3时间 = new System.Windows.Forms.Label(); + this.事件2时间 = new System.Windows.Forms.Label(); + this.事件1时间 = new System.Windows.Forms.Label(); + this.事件2 = new System.Windows.Forms.Label(); + this.事件1 = new System.Windows.Forms.Label(); + this.事件2结果 = new System.Windows.Forms.Label(); + this.事件1结果 = new System.Windows.Forms.Label(); + this.事件3结果 = new System.Windows.Forms.Label(); + this.事件3 = new System.Windows.Forms.Label(); + this.事件4 = new System.Windows.Forms.Label(); + this.事件4结果 = new System.Windows.Forms.Label(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.tableLayoutPanel3 = new System.Windows.Forms.TableLayoutPanel(); this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel(); + this.机台状态 = new System.Windows.Forms.Label(); this.PLC通讯时间 = new System.Windows.Forms.Label(); this.MES通讯时间 = new System.Windows.Forms.Label(); this.PLC链接状态 = new System.Windows.Forms.Label(); @@ -66,40 +92,9 @@ this.底部注释3 = new System.Windows.Forms.Label(); this.底部注释4 = new System.Windows.Forms.Label(); this.底部注释5 = new System.Windows.Forms.Label(); - this.tableLayoutPanel4 = new System.Windows.Forms.TableLayoutPanel(); - this.gropb = new System.Windows.Forms.GroupBox(); - this.tableLayoutPanel6 = new System.Windows.Forms.TableLayoutPanel(); - this.Tray盘 = new System.Windows.Forms.Label(); - this.Tray盘二维码 = new System.Windows.Forms.Label(); - this.原料包装LOT号 = new System.Windows.Forms.GroupBox(); - this.tableLayoutPanel5 = new System.Windows.Forms.TableLayoutPanel(); - this.LOT号显示 = new System.Windows.Forms.Label(); - this.LOT号 = new System.Windows.Forms.Label(); - this.请扫描LOT号 = new System.Windows.Forms.Label(); - this.groupBox2 = new System.Windows.Forms.GroupBox(); - this.tableLayoutPanel7 = new System.Windows.Forms.TableLayoutPanel(); - this.事件4 = new System.Windows.Forms.Label(); - this.事件3 = new System.Windows.Forms.Label(); - this.事件4结果 = new System.Windows.Forms.Label(); - this.事件3结果 = new System.Windows.Forms.Label(); - this.事件2 = new System.Windows.Forms.Label(); - this.事件1 = new System.Windows.Forms.Label(); - this.事件2结果 = new System.Windows.Forms.Label(); - this.事件1结果 = new System.Windows.Forms.Label(); this.timer1 = new System.Windows.Forms.Timer(this.components); - this.LOT号扫描 = new System.Windows.Forms.Label(); - this.事件1时间 = new System.Windows.Forms.Label(); - this.事件2时间 = new System.Windows.Forms.Label(); - this.事件3时间 = new System.Windows.Forms.Label(); - this.事件4时间 = new System.Windows.Forms.Label(); - this.机台状态 = new System.Windows.Forms.Label(); this.menuStrip1.SuspendLayout(); this.tableLayoutPanel1.SuspendLayout(); - this.groupBox1.SuspendLayout(); - this.tableLayoutPanel3.SuspendLayout(); - this.tableLayoutPanel2.SuspendLayout(); - this.groupBox3.SuspendLayout(); - this.tableLayoutPanel8.SuspendLayout(); this.tableLayoutPanel4.SuspendLayout(); this.gropb.SuspendLayout(); this.tableLayoutPanel6.SuspendLayout(); @@ -107,6 +102,11 @@ this.tableLayoutPanel5.SuspendLayout(); this.groupBox2.SuspendLayout(); this.tableLayoutPanel7.SuspendLayout(); + this.groupBox1.SuspendLayout(); + this.tableLayoutPanel3.SuspendLayout(); + this.tableLayoutPanel2.SuspendLayout(); + this.groupBox3.SuspendLayout(); + this.tableLayoutPanel8.SuspendLayout(); this.SuspendLayout(); // // menuStrip1 @@ -142,21 +142,21 @@ // 修改密码ToolStripMenuItem // this.修改密码ToolStripMenuItem.Name = "修改密码ToolStripMenuItem"; - this.修改密码ToolStripMenuItem.Size = new System.Drawing.Size(315, 44); + this.修改密码ToolStripMenuItem.Size = new System.Drawing.Size(247, 44); this.修改密码ToolStripMenuItem.Text = "修改密码"; this.修改密码ToolStripMenuItem.Click += new System.EventHandler(this.修改密码ToolStripMenuItem_Click); // // 切换用户ToolStripMenuItem // this.切换用户ToolStripMenuItem.Name = "切换用户ToolStripMenuItem"; - this.切换用户ToolStripMenuItem.Size = new System.Drawing.Size(315, 44); + this.切换用户ToolStripMenuItem.Size = new System.Drawing.Size(247, 44); this.切换用户ToolStripMenuItem.Text = "切换用户"; this.切换用户ToolStripMenuItem.Click += new System.EventHandler(this.切换用户ToolStripMenuItem_Click); // // 用户管理ToolStripMenuItem1 // this.用户管理ToolStripMenuItem1.Name = "用户管理ToolStripMenuItem1"; - this.用户管理ToolStripMenuItem1.Size = new System.Drawing.Size(315, 44); + this.用户管理ToolStripMenuItem1.Size = new System.Drawing.Size(247, 44); this.用户管理ToolStripMenuItem1.Text = "用户管理"; this.用户管理ToolStripMenuItem1.Click += new System.EventHandler(this.用户管理ToolStripMenuItem1_Click); // @@ -179,14 +179,14 @@ // pLC通讯设置ToolStripMenuItem // this.pLC通讯设置ToolStripMenuItem.Name = "pLC通讯设置ToolStripMenuItem"; - this.pLC通讯设置ToolStripMenuItem.Size = new System.Drawing.Size(315, 44); + this.pLC通讯设置ToolStripMenuItem.Size = new System.Drawing.Size(297, 44); this.pLC通讯设置ToolStripMenuItem.Text = "PLC通讯设置"; this.pLC通讯设置ToolStripMenuItem.Click += new System.EventHandler(this.pLC通讯设置ToolStripMenuItem_Click); // // pLC地址设置ToolStripMenuItem // this.pLC地址设置ToolStripMenuItem.Name = "pLC地址设置ToolStripMenuItem"; - this.pLC地址设置ToolStripMenuItem.Size = new System.Drawing.Size(315, 44); + this.pLC地址设置ToolStripMenuItem.Size = new System.Drawing.Size(297, 44); this.pLC地址设置ToolStripMenuItem.Text = "PLC地址设置"; this.pLC地址设置ToolStripMenuItem.Click += new System.EventHandler(this.pLC地址设置ToolStripMenuItem_Click); // @@ -218,6 +218,7 @@ this.扫码枪配置ToolStripMenuItem1.Name = "扫码枪配置ToolStripMenuItem1"; this.扫码枪配置ToolStripMenuItem1.Size = new System.Drawing.Size(315, 44); this.扫码枪配置ToolStripMenuItem1.Text = "扫码枪配置"; + this.扫码枪配置ToolStripMenuItem1.Click += new System.EventHandler(this.扫码枪配置ToolStripMenuItem1_Click); // // 扭力曲线配置ToolStripMenuItem // @@ -251,6 +252,328 @@ this.tableLayoutPanel1.Size = new System.Drawing.Size(1613, 935); this.tableLayoutPanel1.TabIndex = 6; // + // tableLayoutPanel4 + // + this.tableLayoutPanel4.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.tableLayoutPanel4.ColumnCount = 2; + this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 76.54172F)); + this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 23.45828F)); + this.tableLayoutPanel4.Controls.Add(this.gropb, 0, 1); + this.tableLayoutPanel4.Controls.Add(this.原料包装LOT号, 0, 0); + this.tableLayoutPanel4.Controls.Add(this.groupBox2, 1, 0); + this.tableLayoutPanel4.Location = new System.Drawing.Point(3, 131); + this.tableLayoutPanel4.Name = "tableLayoutPanel4"; + this.tableLayoutPanel4.RowCount = 2; + this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 60.04619F)); + this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 39.95381F)); + this.tableLayoutPanel4.Size = new System.Drawing.Size(1607, 455); + this.tableLayoutPanel4.TabIndex = 8; + // + // gropb + // + this.gropb.Controls.Add(this.tableLayoutPanel6); + this.gropb.Dock = System.Windows.Forms.DockStyle.Fill; + this.gropb.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.gropb.Location = new System.Drawing.Point(3, 276); + this.gropb.Name = "gropb"; + this.gropb.Size = new System.Drawing.Size(1224, 176); + this.gropb.TabIndex = 1; + this.gropb.TabStop = false; + this.gropb.Text = "Tray盘二维码"; + // + // tableLayoutPanel6 + // + this.tableLayoutPanel6.CellBorderStyle = System.Windows.Forms.TableLayoutPanelCellBorderStyle.Single; + this.tableLayoutPanel6.ColumnCount = 2; + this.tableLayoutPanel6.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20F)); + this.tableLayoutPanel6.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 80F)); + this.tableLayoutPanel6.Controls.Add(this.Tray盘, 0, 0); + this.tableLayoutPanel6.Controls.Add(this.Tray盘二维码, 1, 0); + this.tableLayoutPanel6.Dock = System.Windows.Forms.DockStyle.Fill; + this.tableLayoutPanel6.Location = new System.Drawing.Point(3, 35); + this.tableLayoutPanel6.Name = "tableLayoutPanel6"; + this.tableLayoutPanel6.RowCount = 1; + this.tableLayoutPanel6.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.tableLayoutPanel6.Size = new System.Drawing.Size(1218, 138); + this.tableLayoutPanel6.TabIndex = 1; + // + // Tray盘 + // + this.Tray盘.Anchor = System.Windows.Forms.AnchorStyles.None; + this.Tray盘.AutoSize = true; + this.Tray盘.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.Tray盘.Location = new System.Drawing.Point(8, 27); + this.Tray盘.Name = "Tray盘"; + this.Tray盘.Size = new System.Drawing.Size(228, 84); + this.Tray盘.TabIndex = 3; + this.Tray盘.Text = "Tray盘二维码:"; + // + // Tray盘二维码 + // + this.Tray盘二维码.Anchor = System.Windows.Forms.AnchorStyles.None; + this.Tray盘二维码.AutoSize = true; + this.Tray盘二维码.Font = new System.Drawing.Font("宋体", 26.14286F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.Tray盘二维码.Location = new System.Drawing.Point(397, 7); + this.Tray盘二维码.Name = "Tray盘二维码"; + this.Tray盘二维码.Size = new System.Drawing.Size(667, 124); + this.Tray盘二维码.TabIndex = 2; + this.Tray盘二维码.Text = "Tray盘二维码:92139129312381928938"; + // + // 原料包装LOT号 + // + this.原料包装LOT号.Controls.Add(this.tableLayoutPanel5); + this.原料包装LOT号.Dock = System.Windows.Forms.DockStyle.Fill; + this.原料包装LOT号.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.原料包装LOT号.Location = new System.Drawing.Point(3, 3); + this.原料包装LOT号.Name = "原料包装LOT号"; + this.原料包装LOT号.Size = new System.Drawing.Size(1224, 267); + this.原料包装LOT号.TabIndex = 0; + this.原料包装LOT号.TabStop = false; + this.原料包装LOT号.Text = "原料包装LOT号"; + // + // tableLayoutPanel5 + // + this.tableLayoutPanel5.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; + this.tableLayoutPanel5.CellBorderStyle = System.Windows.Forms.TableLayoutPanelCellBorderStyle.Single; + this.tableLayoutPanel5.ColumnCount = 2; + this.tableLayoutPanel5.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20F)); + this.tableLayoutPanel5.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 80F)); + this.tableLayoutPanel5.Controls.Add(this.LOT号扫描, 0, 0); + this.tableLayoutPanel5.Controls.Add(this.LOT号显示, 0, 1); + this.tableLayoutPanel5.Controls.Add(this.LOT号, 1, 1); + this.tableLayoutPanel5.Controls.Add(this.请扫描LOT号, 1, 0); + this.tableLayoutPanel5.Dock = System.Windows.Forms.DockStyle.Fill; + this.tableLayoutPanel5.Location = new System.Drawing.Point(3, 35); + this.tableLayoutPanel5.Name = "tableLayoutPanel5"; + this.tableLayoutPanel5.RowCount = 2; + this.tableLayoutPanel5.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); + this.tableLayoutPanel5.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); + this.tableLayoutPanel5.Size = new System.Drawing.Size(1218, 229); + this.tableLayoutPanel5.TabIndex = 0; + // + // LOT号扫描 + // + this.LOT号扫描.Anchor = System.Windows.Forms.AnchorStyles.None; + this.LOT号扫描.AutoSize = true; + this.LOT号扫描.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.LOT号扫描.Location = new System.Drawing.Point(40, 15); + this.LOT号扫描.Name = "LOT号扫描"; + this.LOT号扫描.Size = new System.Drawing.Size(165, 84); + this.LOT号扫描.TabIndex = 3; + this.LOT号扫描.Text = "LOT号扫描:"; + // + // LOT号显示 + // + this.LOT号显示.Anchor = System.Windows.Forms.AnchorStyles.None; + this.LOT号显示.AutoSize = true; + this.LOT号显示.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.LOT号显示.Location = new System.Drawing.Point(40, 129); + this.LOT号显示.Name = "LOT号显示"; + this.LOT号显示.Size = new System.Drawing.Size(165, 84); + this.LOT号显示.TabIndex = 2; + this.LOT号显示.Text = "LOT号显示:"; + // + // LOT号 + // + this.LOT号.Anchor = System.Windows.Forms.AnchorStyles.None; + this.LOT号.AutoSize = true; + this.LOT号.Font = new System.Drawing.Font("宋体", 26.14286F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.LOT号.Location = new System.Drawing.Point(270, 140); + this.LOT号.Name = "LOT号"; + this.LOT号.Size = new System.Drawing.Size(921, 62); + this.LOT号.TabIndex = 0; + this.LOT号.Text = "LOT号:231321919199191919191"; + // + // 请扫描LOT号 + // + this.请扫描LOT号.Anchor = System.Windows.Forms.AnchorStyles.None; + this.请扫描LOT号.AutoSize = true; + this.请扫描LOT号.Font = new System.Drawing.Font("宋体", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.请扫描LOT号.ForeColor = System.Drawing.Color.Red; + this.请扫描LOT号.Location = new System.Drawing.Point(476, 29); + this.请扫描LOT号.Name = "请扫描LOT号"; + this.请扫描LOT号.Size = new System.Drawing.Size(510, 56); + this.请扫描LOT号.TabIndex = 1; + this.请扫描LOT号.Text = "请员工扫描LOT号:"; + // + // groupBox2 + // + this.groupBox2.Controls.Add(this.tableLayoutPanel7); + this.groupBox2.Dock = System.Windows.Forms.DockStyle.Fill; + this.groupBox2.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.groupBox2.Location = new System.Drawing.Point(1233, 3); + this.groupBox2.Name = "groupBox2"; + this.tableLayoutPanel4.SetRowSpan(this.groupBox2, 2); + this.groupBox2.Size = new System.Drawing.Size(371, 449); + this.groupBox2.TabIndex = 2; + this.groupBox2.TabStop = false; + this.groupBox2.Text = "MES事件结果"; + // + // tableLayoutPanel7 + // + this.tableLayoutPanel7.CellBorderStyle = System.Windows.Forms.TableLayoutPanelCellBorderStyle.Single; + this.tableLayoutPanel7.ColumnCount = 2; + this.tableLayoutPanel7.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); + this.tableLayoutPanel7.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); + this.tableLayoutPanel7.Controls.Add(this.事件4时间, 1, 5); + this.tableLayoutPanel7.Controls.Add(this.事件3时间, 0, 5); + this.tableLayoutPanel7.Controls.Add(this.事件2时间, 1, 2); + this.tableLayoutPanel7.Controls.Add(this.事件1时间, 0, 2); + this.tableLayoutPanel7.Controls.Add(this.事件2, 1, 1); + this.tableLayoutPanel7.Controls.Add(this.事件1, 0, 1); + this.tableLayoutPanel7.Controls.Add(this.事件2结果, 1, 0); + this.tableLayoutPanel7.Controls.Add(this.事件1结果, 0, 0); + this.tableLayoutPanel7.Controls.Add(this.事件3结果, 0, 3); + this.tableLayoutPanel7.Controls.Add(this.事件3, 0, 4); + this.tableLayoutPanel7.Controls.Add(this.事件4, 1, 4); + this.tableLayoutPanel7.Controls.Add(this.事件4结果, 1, 3); + this.tableLayoutPanel7.Dock = System.Windows.Forms.DockStyle.Fill; + this.tableLayoutPanel7.Location = new System.Drawing.Point(3, 35); + this.tableLayoutPanel7.Name = "tableLayoutPanel7"; + this.tableLayoutPanel7.RowCount = 6; + this.tableLayoutPanel7.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 30F)); + this.tableLayoutPanel7.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F)); + this.tableLayoutPanel7.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F)); + this.tableLayoutPanel7.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 30F)); + this.tableLayoutPanel7.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F)); + this.tableLayoutPanel7.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F)); + this.tableLayoutPanel7.Size = new System.Drawing.Size(365, 411); + this.tableLayoutPanel7.TabIndex = 0; + // + // 事件4时间 + // + this.事件4时间.Anchor = System.Windows.Forms.AnchorStyles.None; + this.事件4时间.AutoSize = true; + this.事件4时间.Font = new System.Drawing.Font("宋体", 14.14286F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.事件4时间.Location = new System.Drawing.Point(189, 372); + this.事件4时间.Name = "事件4时间"; + this.事件4时间.Size = new System.Drawing.Size(168, 34); + this.事件4时间.TabIndex = 11; + this.事件4时间.Text = "事件4时间"; + // + // 事件3时间 + // + this.事件3时间.Anchor = System.Windows.Forms.AnchorStyles.None; + this.事件3时间.AutoSize = true; + this.事件3时间.Font = new System.Drawing.Font("宋体", 14.14286F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.事件3时间.Location = new System.Drawing.Point(7, 372); + this.事件3时间.Name = "事件3时间"; + this.事件3时间.Size = new System.Drawing.Size(168, 34); + this.事件3时间.TabIndex = 10; + this.事件3时间.Text = "事件3时间"; + // + // 事件2时间 + // + this.事件2时间.Anchor = System.Windows.Forms.AnchorStyles.None; + this.事件2时间.AutoSize = true; + this.事件2时间.Font = new System.Drawing.Font("宋体", 14.14286F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.事件2时间.Location = new System.Drawing.Point(189, 167); + this.事件2时间.Name = "事件2时间"; + this.事件2时间.Size = new System.Drawing.Size(168, 34); + this.事件2时间.TabIndex = 9; + this.事件2时间.Text = "事件2时间"; + // + // 事件1时间 + // + this.事件1时间.Anchor = System.Windows.Forms.AnchorStyles.None; + this.事件1时间.AutoSize = true; + this.事件1时间.Font = new System.Drawing.Font("宋体", 14.14286F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.事件1时间.Location = new System.Drawing.Point(7, 167); + this.事件1时间.Name = "事件1时间"; + this.事件1时间.Size = new System.Drawing.Size(168, 34); + this.事件1时间.TabIndex = 8; + this.事件1时间.Text = "事件1时间"; + // + // 事件2 + // + this.事件2.Anchor = System.Windows.Forms.AnchorStyles.None; + this.事件2.AutoSize = true; + this.事件2.Font = new System.Drawing.Font("宋体", 14.14286F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.事件2.Location = new System.Drawing.Point(223, 126); + this.事件2.Name = "事件2"; + this.事件2.Size = new System.Drawing.Size(100, 34); + this.事件2.TabIndex = 3; + this.事件2.Text = "事件2"; + // + // 事件1 + // + this.事件1.Anchor = System.Windows.Forms.AnchorStyles.None; + this.事件1.AutoSize = true; + this.事件1.Font = new System.Drawing.Font("宋体", 14.14286F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.事件1.Location = new System.Drawing.Point(41, 126); + this.事件1.Name = "事件1"; + this.事件1.Size = new System.Drawing.Size(100, 34); + this.事件1.TabIndex = 2; + this.事件1.Text = "事件1"; + // + // 事件2结果 + // + this.事件2结果.Anchor = System.Windows.Forms.AnchorStyles.None; + this.事件2结果.AutoSize = true; + this.事件2结果.Font = new System.Drawing.Font("宋体", 26.14286F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.事件2结果.Location = new System.Drawing.Point(228, 30); + this.事件2结果.Name = "事件2结果"; + this.事件2结果.Size = new System.Drawing.Size(91, 62); + this.事件2结果.TabIndex = 1; + this.事件2结果.Text = "OK"; + // + // 事件1结果 + // + this.事件1结果.Anchor = System.Windows.Forms.AnchorStyles.None; + this.事件1结果.AutoSize = true; + this.事件1结果.Font = new System.Drawing.Font("宋体", 26.14286F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.事件1结果.Location = new System.Drawing.Point(46, 30); + this.事件1结果.Name = "事件1结果"; + this.事件1结果.Size = new System.Drawing.Size(91, 62); + this.事件1结果.TabIndex = 0; + this.事件1结果.Text = "OK"; + // + // 事件3结果 + // + this.事件3结果.Anchor = System.Windows.Forms.AnchorStyles.None; + this.事件3结果.AutoSize = true; + this.事件3结果.Font = new System.Drawing.Font("宋体", 26.14286F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.事件3结果.Location = new System.Drawing.Point(46, 234); + this.事件3结果.Name = "事件3结果"; + this.事件3结果.Size = new System.Drawing.Size(91, 62); + this.事件3结果.TabIndex = 4; + this.事件3结果.Text = "OK"; + // + // 事件3 + // + this.事件3.Anchor = System.Windows.Forms.AnchorStyles.None; + this.事件3.AutoSize = true; + this.事件3.Font = new System.Drawing.Font("宋体", 14.14286F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.事件3.Location = new System.Drawing.Point(41, 330); + this.事件3.Name = "事件3"; + this.事件3.Size = new System.Drawing.Size(100, 34); + this.事件3.TabIndex = 6; + this.事件3.Text = "事件3"; + // + // 事件4 + // + this.事件4.Anchor = System.Windows.Forms.AnchorStyles.None; + this.事件4.AutoSize = true; + this.事件4.Font = new System.Drawing.Font("宋体", 14.14286F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.事件4.Location = new System.Drawing.Point(223, 330); + this.事件4.Name = "事件4"; + this.事件4.Size = new System.Drawing.Size(100, 34); + this.事件4.TabIndex = 7; + this.事件4.Text = "事件4"; + // + // 事件4结果 + // + this.事件4结果.Anchor = System.Windows.Forms.AnchorStyles.None; + this.事件4结果.AutoSize = true; + this.事件4结果.Font = new System.Drawing.Font("宋体", 26.14286F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.事件4结果.Location = new System.Drawing.Point(228, 234); + this.事件4结果.Name = "事件4结果"; + this.事件4结果.Size = new System.Drawing.Size(91, 62); + this.事件4结果.TabIndex = 5; + this.事件4结果.Text = "OK"; + // // groupBox1 // this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) @@ -325,6 +648,19 @@ this.tableLayoutPanel2.Size = new System.Drawing.Size(1411, 58); this.tableLayoutPanel2.TabIndex = 3; // + // 机台状态 + // + this.机台状态.AutoSize = true; + this.机台状态.Dock = System.Windows.Forms.DockStyle.Fill; + this.机台状态.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.机台状态.Location = new System.Drawing.Point(852, 29); + this.机台状态.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); + this.机台状态.Name = "机台状态"; + this.机台状态.Size = new System.Drawing.Size(271, 28); + this.机台状态.TabIndex = 17; + this.机台状态.Text = "机台状态:None"; + this.机台状态.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // // PLC通讯时间 // this.PLC通讯时间.AutoSize = true; @@ -556,347 +892,12 @@ this.底部注释5.TabIndex = 4; this.底部注释5.Text = "底部注释5"; // - // tableLayoutPanel4 - // - this.tableLayoutPanel4.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.tableLayoutPanel4.ColumnCount = 2; - this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 76.54172F)); - this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 23.45828F)); - this.tableLayoutPanel4.Controls.Add(this.gropb, 0, 1); - this.tableLayoutPanel4.Controls.Add(this.原料包装LOT号, 0, 0); - this.tableLayoutPanel4.Controls.Add(this.groupBox2, 1, 0); - this.tableLayoutPanel4.Location = new System.Drawing.Point(3, 131); - this.tableLayoutPanel4.Name = "tableLayoutPanel4"; - this.tableLayoutPanel4.RowCount = 2; - this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 60.04619F)); - this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 39.95381F)); - this.tableLayoutPanel4.Size = new System.Drawing.Size(1607, 455); - this.tableLayoutPanel4.TabIndex = 8; - // - // gropb - // - this.gropb.Controls.Add(this.tableLayoutPanel6); - this.gropb.Dock = System.Windows.Forms.DockStyle.Fill; - this.gropb.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.gropb.Location = new System.Drawing.Point(3, 276); - this.gropb.Name = "gropb"; - this.gropb.Size = new System.Drawing.Size(1224, 176); - this.gropb.TabIndex = 1; - this.gropb.TabStop = false; - this.gropb.Text = "Tray盘二维码"; - // - // tableLayoutPanel6 - // - this.tableLayoutPanel6.CellBorderStyle = System.Windows.Forms.TableLayoutPanelCellBorderStyle.Single; - this.tableLayoutPanel6.ColumnCount = 2; - this.tableLayoutPanel6.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20F)); - this.tableLayoutPanel6.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 80F)); - this.tableLayoutPanel6.Controls.Add(this.Tray盘, 0, 0); - this.tableLayoutPanel6.Controls.Add(this.Tray盘二维码, 1, 0); - this.tableLayoutPanel6.Dock = System.Windows.Forms.DockStyle.Fill; - this.tableLayoutPanel6.Location = new System.Drawing.Point(3, 35); - this.tableLayoutPanel6.Name = "tableLayoutPanel6"; - this.tableLayoutPanel6.RowCount = 1; - this.tableLayoutPanel6.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tableLayoutPanel6.Size = new System.Drawing.Size(1218, 138); - this.tableLayoutPanel6.TabIndex = 1; - // - // Tray盘 - // - this.Tray盘.Anchor = System.Windows.Forms.AnchorStyles.None; - this.Tray盘.AutoSize = true; - this.Tray盘.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.Tray盘.Location = new System.Drawing.Point(8, 27); - this.Tray盘.Name = "Tray盘"; - this.Tray盘.Size = new System.Drawing.Size(228, 84); - this.Tray盘.TabIndex = 3; - this.Tray盘.Text = "Tray盘二维码:"; - // - // Tray盘二维码 - // - this.Tray盘二维码.Anchor = System.Windows.Forms.AnchorStyles.None; - this.Tray盘二维码.AutoSize = true; - this.Tray盘二维码.Font = new System.Drawing.Font("宋体", 26.14286F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.Tray盘二维码.Location = new System.Drawing.Point(397, 8); - this.Tray盘二维码.Name = "Tray盘二维码"; - this.Tray盘二维码.Size = new System.Drawing.Size(667, 122); - this.Tray盘二维码.TabIndex = 2; - this.Tray盘二维码.Text = "Tray盘二维码:92139129312381928938"; - // - // 原料包装LOT号 - // - this.原料包装LOT号.Controls.Add(this.tableLayoutPanel5); - this.原料包装LOT号.Dock = System.Windows.Forms.DockStyle.Fill; - this.原料包装LOT号.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.原料包装LOT号.Location = new System.Drawing.Point(3, 3); - this.原料包装LOT号.Name = "原料包装LOT号"; - this.原料包装LOT号.Size = new System.Drawing.Size(1224, 267); - this.原料包装LOT号.TabIndex = 0; - this.原料包装LOT号.TabStop = false; - this.原料包装LOT号.Text = "原料包装LOT号"; - // - // tableLayoutPanel5 - // - this.tableLayoutPanel5.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; - this.tableLayoutPanel5.CellBorderStyle = System.Windows.Forms.TableLayoutPanelCellBorderStyle.Single; - this.tableLayoutPanel5.ColumnCount = 2; - this.tableLayoutPanel5.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20F)); - this.tableLayoutPanel5.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 80F)); - this.tableLayoutPanel5.Controls.Add(this.LOT号扫描, 0, 0); - this.tableLayoutPanel5.Controls.Add(this.LOT号显示, 0, 1); - this.tableLayoutPanel5.Controls.Add(this.LOT号, 1, 1); - this.tableLayoutPanel5.Controls.Add(this.请扫描LOT号, 1, 0); - this.tableLayoutPanel5.Dock = System.Windows.Forms.DockStyle.Fill; - this.tableLayoutPanel5.Location = new System.Drawing.Point(3, 35); - this.tableLayoutPanel5.Name = "tableLayoutPanel5"; - this.tableLayoutPanel5.RowCount = 2; - this.tableLayoutPanel5.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); - this.tableLayoutPanel5.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); - this.tableLayoutPanel5.Size = new System.Drawing.Size(1218, 229); - this.tableLayoutPanel5.TabIndex = 0; - // - // LOT号显示 - // - this.LOT号显示.Anchor = System.Windows.Forms.AnchorStyles.None; - this.LOT号显示.AutoSize = true; - this.LOT号显示.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.LOT号显示.Location = new System.Drawing.Point(40, 129); - this.LOT号显示.Name = "LOT号显示"; - this.LOT号显示.Size = new System.Drawing.Size(165, 84); - this.LOT号显示.TabIndex = 2; - this.LOT号显示.Text = "LOT号显示:"; - // - // LOT号 - // - this.LOT号.Anchor = System.Windows.Forms.AnchorStyles.None; - this.LOT号.AutoSize = true; - this.LOT号.Font = new System.Drawing.Font("宋体", 26.14286F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.LOT号.Location = new System.Drawing.Point(271, 141); - this.LOT号.Name = "LOT号"; - this.LOT号.Size = new System.Drawing.Size(919, 61); - this.LOT号.TabIndex = 0; - this.LOT号.Text = "LOT号:231321919199191919191"; - // - // 请扫描LOT号 - // - this.请扫描LOT号.Anchor = System.Windows.Forms.AnchorStyles.None; - this.请扫描LOT号.AutoSize = true; - this.请扫描LOT号.Font = new System.Drawing.Font("宋体", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.请扫描LOT号.ForeColor = System.Drawing.Color.Red; - this.请扫描LOT号.Location = new System.Drawing.Point(476, 29); - this.请扫描LOT号.Name = "请扫描LOT号"; - this.请扫描LOT号.Size = new System.Drawing.Size(510, 56); - this.请扫描LOT号.TabIndex = 1; - this.请扫描LOT号.Text = "请员工扫描LOT号:"; - // - // groupBox2 - // - this.groupBox2.Controls.Add(this.tableLayoutPanel7); - this.groupBox2.Dock = System.Windows.Forms.DockStyle.Fill; - this.groupBox2.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.groupBox2.Location = new System.Drawing.Point(1233, 3); - this.groupBox2.Name = "groupBox2"; - this.tableLayoutPanel4.SetRowSpan(this.groupBox2, 2); - this.groupBox2.Size = new System.Drawing.Size(371, 449); - this.groupBox2.TabIndex = 2; - this.groupBox2.TabStop = false; - this.groupBox2.Text = "MES事件结果"; - // - // tableLayoutPanel7 - // - this.tableLayoutPanel7.CellBorderStyle = System.Windows.Forms.TableLayoutPanelCellBorderStyle.Single; - this.tableLayoutPanel7.ColumnCount = 2; - this.tableLayoutPanel7.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); - this.tableLayoutPanel7.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); - this.tableLayoutPanel7.Controls.Add(this.事件4时间, 1, 5); - this.tableLayoutPanel7.Controls.Add(this.事件3时间, 0, 5); - this.tableLayoutPanel7.Controls.Add(this.事件2时间, 1, 2); - this.tableLayoutPanel7.Controls.Add(this.事件1时间, 0, 2); - this.tableLayoutPanel7.Controls.Add(this.事件2, 1, 1); - this.tableLayoutPanel7.Controls.Add(this.事件1, 0, 1); - this.tableLayoutPanel7.Controls.Add(this.事件2结果, 1, 0); - this.tableLayoutPanel7.Controls.Add(this.事件1结果, 0, 0); - this.tableLayoutPanel7.Controls.Add(this.事件3结果, 0, 3); - this.tableLayoutPanel7.Controls.Add(this.事件3, 0, 4); - this.tableLayoutPanel7.Controls.Add(this.事件4, 1, 4); - this.tableLayoutPanel7.Controls.Add(this.事件4结果, 1, 3); - this.tableLayoutPanel7.Dock = System.Windows.Forms.DockStyle.Fill; - this.tableLayoutPanel7.Location = new System.Drawing.Point(3, 35); - this.tableLayoutPanel7.Name = "tableLayoutPanel7"; - this.tableLayoutPanel7.RowCount = 6; - this.tableLayoutPanel7.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 30F)); - this.tableLayoutPanel7.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F)); - this.tableLayoutPanel7.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F)); - this.tableLayoutPanel7.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 30F)); - this.tableLayoutPanel7.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F)); - this.tableLayoutPanel7.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F)); - this.tableLayoutPanel7.Size = new System.Drawing.Size(365, 411); - this.tableLayoutPanel7.TabIndex = 0; - // - // 事件4 - // - this.事件4.Anchor = System.Windows.Forms.AnchorStyles.None; - this.事件4.AutoSize = true; - this.事件4.Font = new System.Drawing.Font("宋体", 14.14286F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.事件4.Location = new System.Drawing.Point(224, 330); - this.事件4.Name = "事件4"; - this.事件4.Size = new System.Drawing.Size(98, 33); - this.事件4.TabIndex = 7; - this.事件4.Text = "事件4"; - // - // 事件3 - // - this.事件3.Anchor = System.Windows.Forms.AnchorStyles.None; - this.事件3.AutoSize = true; - this.事件3.Font = new System.Drawing.Font("宋体", 14.14286F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.事件3.Location = new System.Drawing.Point(42, 330); - this.事件3.Name = "事件3"; - this.事件3.Size = new System.Drawing.Size(98, 33); - this.事件3.TabIndex = 6; - this.事件3.Text = "事件3"; - // - // 事件4结果 - // - this.事件4结果.Anchor = System.Windows.Forms.AnchorStyles.None; - this.事件4结果.AutoSize = true; - this.事件4结果.Font = new System.Drawing.Font("宋体", 26.14286F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.事件4结果.Location = new System.Drawing.Point(228, 234); - this.事件4结果.Name = "事件4结果"; - this.事件4结果.Size = new System.Drawing.Size(91, 62); - this.事件4结果.TabIndex = 5; - this.事件4结果.Text = "OK"; - // - // 事件3结果 - // - this.事件3结果.Anchor = System.Windows.Forms.AnchorStyles.None; - this.事件3结果.AutoSize = true; - this.事件3结果.Font = new System.Drawing.Font("宋体", 26.14286F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.事件3结果.Location = new System.Drawing.Point(46, 234); - this.事件3结果.Name = "事件3结果"; - this.事件3结果.Size = new System.Drawing.Size(91, 62); - this.事件3结果.TabIndex = 4; - this.事件3结果.Text = "OK"; - // - // 事件2 - // - this.事件2.Anchor = System.Windows.Forms.AnchorStyles.None; - this.事件2.AutoSize = true; - this.事件2.Font = new System.Drawing.Font("宋体", 14.14286F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.事件2.Location = new System.Drawing.Point(224, 126); - this.事件2.Name = "事件2"; - this.事件2.Size = new System.Drawing.Size(98, 33); - this.事件2.TabIndex = 3; - this.事件2.Text = "事件2"; - // - // 事件1 - // - this.事件1.Anchor = System.Windows.Forms.AnchorStyles.None; - this.事件1.AutoSize = true; - this.事件1.Font = new System.Drawing.Font("宋体", 14.14286F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.事件1.Location = new System.Drawing.Point(42, 126); - this.事件1.Name = "事件1"; - this.事件1.Size = new System.Drawing.Size(98, 33); - this.事件1.TabIndex = 2; - this.事件1.Text = "事件1"; - // - // 事件2结果 - // - this.事件2结果.Anchor = System.Windows.Forms.AnchorStyles.None; - this.事件2结果.AutoSize = true; - this.事件2结果.Font = new System.Drawing.Font("宋体", 26.14286F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.事件2结果.Location = new System.Drawing.Point(228, 30); - this.事件2结果.Name = "事件2结果"; - this.事件2结果.Size = new System.Drawing.Size(91, 62); - this.事件2结果.TabIndex = 1; - this.事件2结果.Text = "OK"; - // - // 事件1结果 - // - this.事件1结果.Anchor = System.Windows.Forms.AnchorStyles.None; - this.事件1结果.AutoSize = true; - this.事件1结果.Font = new System.Drawing.Font("宋体", 26.14286F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.事件1结果.Location = new System.Drawing.Point(46, 30); - this.事件1结果.Name = "事件1结果"; - this.事件1结果.Size = new System.Drawing.Size(91, 62); - this.事件1结果.TabIndex = 0; - this.事件1结果.Text = "OK"; - // // timer1 // this.timer1.Enabled = true; this.timer1.Interval = 1000; this.timer1.Tick += new System.EventHandler(this.timer1_Tick); // - // LOT号扫描 - // - this.LOT号扫描.Anchor = System.Windows.Forms.AnchorStyles.None; - this.LOT号扫描.AutoSize = true; - this.LOT号扫描.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.LOT号扫描.Location = new System.Drawing.Point(40, 15); - this.LOT号扫描.Name = "LOT号扫描"; - this.LOT号扫描.Size = new System.Drawing.Size(165, 84); - this.LOT号扫描.TabIndex = 3; - this.LOT号扫描.Text = "LOT号扫描:"; - // - // 事件1时间 - // - this.事件1时间.Anchor = System.Windows.Forms.AnchorStyles.None; - this.事件1时间.AutoSize = true; - this.事件1时间.Font = new System.Drawing.Font("宋体", 14.14286F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.事件1时间.Location = new System.Drawing.Point(9, 167); - this.事件1时间.Name = "事件1时间"; - this.事件1时间.Size = new System.Drawing.Size(164, 33); - this.事件1时间.TabIndex = 8; - this.事件1时间.Text = "事件1时间"; - // - // 事件2时间 - // - this.事件2时间.Anchor = System.Windows.Forms.AnchorStyles.None; - this.事件2时间.AutoSize = true; - this.事件2时间.Font = new System.Drawing.Font("宋体", 14.14286F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.事件2时间.Location = new System.Drawing.Point(191, 167); - this.事件2时间.Name = "事件2时间"; - this.事件2时间.Size = new System.Drawing.Size(164, 33); - this.事件2时间.TabIndex = 9; - this.事件2时间.Text = "事件2时间"; - // - // 事件3时间 - // - this.事件3时间.Anchor = System.Windows.Forms.AnchorStyles.None; - this.事件3时间.AutoSize = true; - this.事件3时间.Font = new System.Drawing.Font("宋体", 14.14286F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.事件3时间.Location = new System.Drawing.Point(9, 372); - this.事件3时间.Name = "事件3时间"; - this.事件3时间.Size = new System.Drawing.Size(164, 33); - this.事件3时间.TabIndex = 10; - this.事件3时间.Text = "事件3时间"; - // - // 事件4时间 - // - this.事件4时间.Anchor = System.Windows.Forms.AnchorStyles.None; - this.事件4时间.AutoSize = true; - this.事件4时间.Font = new System.Drawing.Font("宋体", 14.14286F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.事件4时间.Location = new System.Drawing.Point(191, 372); - this.事件4时间.Name = "事件4时间"; - this.事件4时间.Size = new System.Drawing.Size(164, 33); - this.事件4时间.TabIndex = 11; - this.事件4时间.Text = "事件4时间"; - // - // 机台状态 - // - this.机台状态.AutoSize = true; - this.机台状态.Dock = System.Windows.Forms.DockStyle.Fill; - this.机台状态.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.机台状态.Location = new System.Drawing.Point(852, 29); - this.机台状态.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); - this.机台状态.Name = "机台状态"; - this.机台状态.Size = new System.Drawing.Size(271, 28); - this.机台状态.TabIndex = 17; - this.机台状态.Text = "机台状态:None"; - this.机台状态.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // // MainForm // this.AutoScaleDimensions = new System.Drawing.SizeF(11F, 21F); @@ -914,13 +915,6 @@ this.menuStrip1.ResumeLayout(false); this.menuStrip1.PerformLayout(); this.tableLayoutPanel1.ResumeLayout(false); - this.groupBox1.ResumeLayout(false); - this.tableLayoutPanel3.ResumeLayout(false); - this.tableLayoutPanel2.ResumeLayout(false); - this.tableLayoutPanel2.PerformLayout(); - this.groupBox3.ResumeLayout(false); - this.tableLayoutPanel8.ResumeLayout(false); - this.tableLayoutPanel8.PerformLayout(); this.tableLayoutPanel4.ResumeLayout(false); this.gropb.ResumeLayout(false); this.tableLayoutPanel6.ResumeLayout(false); @@ -931,6 +925,13 @@ this.groupBox2.ResumeLayout(false); this.tableLayoutPanel7.ResumeLayout(false); this.tableLayoutPanel7.PerformLayout(); + this.groupBox1.ResumeLayout(false); + this.tableLayoutPanel3.ResumeLayout(false); + this.tableLayoutPanel2.ResumeLayout(false); + this.tableLayoutPanel2.PerformLayout(); + this.groupBox3.ResumeLayout(false); + this.tableLayoutPanel8.ResumeLayout(false); + this.tableLayoutPanel8.PerformLayout(); this.ResumeLayout(false); this.PerformLayout(); diff --git a/WindowsFormsApp1/MainForm.cs b/WindowsFormsApp1/MainForm.cs index 2c05e3b..fddd083 100644 --- a/WindowsFormsApp1/MainForm.cs +++ b/WindowsFormsApp1/MainForm.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; +using System.IO.Ports; using System.Linq; using System.Reflection; using System.Reflection.Emit; @@ -17,6 +18,7 @@ using HslCommunication.LogNet; using WindowsFormsApp1.db; using WindowsFormsApp1.form; using WindowsFormsApp1.mod; +using WindowsFormsApp1.mod.database; using WindowsFormsApp1.mod.server; using WindowsFormsApp1.server; using static SQLite.SQLite3; @@ -27,6 +29,22 @@ namespace WindowsFormsApp1 { private Thread thread_plc1; private Thread thread_plc2; + private SerialPort ScanPort; + /* + * + * COM1 -- COM口名称 + * 9600 波特率 + * 校验位 Parity.None == 无 + * 数据位 :8 + * + * 测试称重 + * 解除注释 + * //port.DataReceived += new SerialDataReceivedEventHandler(port_Receive); + * //port.Open(); + * //port.WriteLine("SI"); + * + */ + public MainForm() { InitializeComponent(); @@ -41,6 +59,10 @@ namespace WindowsFormsApp1 Formrecover(); + + + + 线别.Text = "线别:" + Init.t_Line.linename; 段别.Text = "段别:" + Init.t_Line.linemode; 机台编号.Text = "机台编号:" + Init.t_Line.linecode; @@ -63,6 +85,7 @@ namespace WindowsFormsApp1 continue; } + #region PLC链接及读取 SiemensHelp siemensHelp = Plc.plchelp; var openresult = siemensHelp.OpenConn(); @@ -102,7 +125,74 @@ namespace WindowsFormsApp1 PLC链接状态.Text = "PLC链接状态:OK"; PLC链接状态.BackColor = SystemColors.Control; PLC通讯时间.Text = "PLC通讯时间:" + Plc_Time.ToString("MM-dd HH:mm:ss"); + #endregion + ApiClient apiClient = new ApiClient(); + otherdata otherdata = new otherdata(); + + #region 机台状态及报警 + //机台状态 + 机台状态.Text = "机台状态:" + Enum.GetName(typeof(plcstatus), Init.Plcstatus); + int oldstatus = Init.Plcstatus; + DateTime oldPlcstatus_LastTime = Init.Plcstatus_LastTime; + //状态+报警 + if (oldstatus != PlcData.Read_Status || (Plc_Time - oldPlcstatus_LastTime).TotalSeconds > 5) + { + //反馈状态 + otherdata.Plc_Status = PlcData.Read_Status; + var statusresult = apiClient.CallFunctionByName("Status", PlcData, otherdata); + if (statusresult.Success) + { + Init.Plcstatus = PlcData.Read_Status; + Init.Plcstatus_LastTime = DateTime.Now; + MES链接状态.Text = "MES链接状态:OK"; + MES链接状态.BackColor = SystemColors.Control; + MES通讯时间.Text = "MES通讯时间:" + DateTime.Now.ToString("MM-dd HH:mm:ss"); + MES_MsgfORM("Status", statusresult.Mesresult, statusresult.Requesttime); + } + else + { + MES链接状态.Text = "MES链接状态:NG"; + MES链接状态.BackColor = Color.Red; + LogExecute.logNet.WriteError($"MES通讯异常!"); + } + } + //机台报警 + if (PlcData.Read_Status == (short)plcstatus.停机) + { + 机台状态.BackColor = Color.Red; + if (oldstatus != (short)plcstatus.停机) + { + //反馈报警 + List list = new List(); +///////////////////////////////测试用 + list.Add("M03CVSO-01"); + otherdata.Plc_ErrorMsgs = list; + var statusresult = apiClient.CallFunctionByName("Alarm", PlcData, otherdata); + if (statusresult.Success) + { + Init.Plcstatus = PlcData.Read_Status; + Init.Plcstatus_LastTime = DateTime.Now; + MES链接状态.Text = "MES链接状态:OK"; + MES链接状态.BackColor = SystemColors.Control; + MES通讯时间.Text = "MES通讯时间:" + DateTime.Now.ToString("MM-dd HH:mm:ss"); + MES_MsgfORM("Alarm", statusresult.Mesresult, statusresult.Requesttime); + } + else + { + MES链接状态.Text = "MES链接状态:NG"; + MES链接状态.BackColor = Color.Red; + LogExecute.logNet.WriteError($"MES通讯异常!"); + } + } + continue; + } + else + { + 机台状态.BackColor = SystemColors.Control; + } + #endregion + #region 判断及查找流程 if (PlcData.Read_Trigger == 0 && PlcData.Write_Status == 0) { continue; @@ -123,64 +213,6 @@ namespace WindowsFormsApp1 } continue; } - ApiClient apiClient = new ApiClient(); - otherdata otherdata = new otherdata(); - otherdata.JS_SN = "12345"; - - - - - //状态+报警 - if (Init.Plcstatus != PlcData.Read_Status || (Plc_Time - Init.Plcstatus_LastTime).TotalSeconds > 15) - { - //反馈状态 - var statusresult = apiClient.CallFunctionByName("Status", PlcData, otherdata); - if (statusresult.Success) - { - MES链接状态.Text = "MES链接状态:OK"; - MES链接状态.BackColor = SystemColors.Control; - MES通讯时间.Text = "MES通讯时间:" + DateTime.Now.ToString("MM-dd HH:mm:ss"); - MES_MsgfORM("Status", statusresult.Mesresult, statusresult.Requesttime); - } - else - { - MES链接状态.Text = "MES链接状态:NG"; - MES链接状态.BackColor = Color.Red; - LogExecute.logNet.WriteError($"MES通讯异常!"); - } - } - if (Init.Plcstatus == (short)plcstatus.运行 && PlcData.Read_Status == (short)plcstatus.停机) - { - 机台状态.BackColor = Color.Red; - //反馈报警 - var statusresult = apiClient.CallFunctionByName("Alarm", PlcData, otherdata); - if (statusresult.Success) - { - MES链接状态.Text = "MES链接状态:OK"; - MES链接状态.BackColor = SystemColors.Control; - MES通讯时间.Text = "MES通讯时间:" + DateTime.Now.ToString("MM-dd HH:mm:ss"); - MES_MsgfORM("Alarm", statusresult.Mesresult, statusresult.Requesttime); - } - else - { - MES链接状态.Text = "MES链接状态:NG"; - MES链接状态.BackColor = Color.Red; - LogExecute.logNet.WriteError($"MES通讯异常!"); - } - continue; - } - else - { - 机台状态.BackColor = SystemColors.Control; - } - - Init.Plcstatus = PlcData.Read_Status; - Init.Plcstatus_LastTime = DateTime.Now; - 机台状态.Text = Enum.GetName(typeof(plcstatus), Init.Plcstatus); - - - - var nowflow = Init.t_Flows.FirstOrDefault(a => a.hopestatus == PlcData.Read_Trigger); if (nowflow == null) { @@ -193,12 +225,21 @@ namespace WindowsFormsApp1 LogExecute.logNet.WriteError($"未找到当前期望接口ID {nowflow.hopeinterfaceid},对应的接口!"); continue; } + #endregion + + if(nowinterface.code == "SN_CheckIN") + { + 请扫描LOT号.Enabled = true; + ScanPort.Read(); + + + } + + - - var result = apiClient.CallFunctionByName(nowinterface.code,PlcData, otherdata); if (result.Success) { @@ -284,6 +325,42 @@ namespace WindowsFormsApp1 return; } + + SQLiteHelper sQLiteHelper_serialport = new db.SQLiteHelper(); + var serialport_result = sQLiteHelper_serialport.QueryAll(); + if (!serialport_result.Success) + { + MessageBox.Show("无法初始化COM口信息,无法开始处理!"); + return; + } + + try + { + var scanport = serialport_result.Data.FirstOrDefault(a=>a.name == "Scan"); + if (scanport != null) + { + if (scanport.enable) + { + Enum.TryParse(scanport.parity, out Parity parity); + ScanPort = new SerialPort(scanport.portName, scanport.baudRate, parity, scanport.dataBits); + if (!ScanPort.IsOpen) + { + //port?.Open(); + 底部注释1.Text = "扫码枪COM-Ready"; + 底部注释1.Visible = true; + } + } + } + + } + catch(Exception ex) + { + MessageBox.Show("无法开启扫码枪,无法开始处理!" + ex.Message); + return; + } + + + Init.t_Plc1 = plc_result.Data; Init.t_Plc1.plchelp = new SiemensHelp(Init.t_Plc1.plcip, Init.t_Plc1.timeout); Init.t_Plc2 = plc_result2.Data; @@ -335,6 +412,9 @@ namespace WindowsFormsApp1 } Init.isrunning2 = false; + ScanPort?.Close(); + + Thread.Sleep(500); 开始处理.Text = "开始处理"; 开始处理.BackColor = Color.Green; @@ -391,6 +471,12 @@ namespace WindowsFormsApp1 USER_Manage uSER_Manage = new USER_Manage(); uSER_Manage.ShowDialog(); } + + private void 扫码枪配置ToolStripMenuItem1_Click(object sender, EventArgs e) + { + SerialPort_Manage serialPort_Manage = new SerialPort_Manage(); + serialPort_Manage.ShowDialog(); + } #endregion #region 页面-布局、日志等 private void LogNet_BeforeSaveToFile(object sender, HslEventArgs e) @@ -439,8 +525,6 @@ namespace WindowsFormsApp1 { 当前时间.Text = "当前时间:" + DateTime.Now.ToString("MM-dd HH:mm:ss"); } - #endregion - public void Formrecover() { MES链接状态.Text = "MES链接状态:None"; @@ -487,9 +571,9 @@ namespace WindowsFormsApp1 } - public void MES_MsgfORM(string name,mesresult result,DateTime dateTime) + public void MES_MsgfORM(string name, mesresult result, DateTime dateTime) { - if (事件1.Text.Contains("事件")) + if (事件1.Text == name) { 事件1.Visible = true; 事件1结果.Visible = true; @@ -498,7 +582,7 @@ namespace WindowsFormsApp1 事件1时间.Text = dateTime.ToString("MM-dd HH:mm:ss"); 事件1结果.Text = result.ToString(); } - else if (事件2.Text.Contains("事件")) + else if (事件2.Text == name) { 事件2.Visible = true; 事件2结果.Visible = true; @@ -507,7 +591,7 @@ namespace WindowsFormsApp1 事件2时间.Text = dateTime.ToString("MM-dd HH:mm:ss"); 事件2结果.Text = result.ToString(); } - else if (事件3.Text.Contains("事件")) + else if (事件3.Text == name) { 事件3.Visible = true; 事件3结果.Visible = true; @@ -516,7 +600,7 @@ namespace WindowsFormsApp1 事件3时间.Text = dateTime.ToString("MM-dd HH:mm:ss"); 事件3结果.Text = result.ToString(); } - else if (事件4.Text.Contains("事件")) + else if (事件4.Text == name) { 事件4.Visible = true; 事件4结果.Visible = true; @@ -527,37 +611,75 @@ namespace WindowsFormsApp1 } else { - 事件1.Visible = true; - 事件1结果.Visible = true; - 事件1时间.Visible = true; - 事件1.Text = name; - 事件1时间.Text = dateTime.ToString("MM-dd HH:mm:ss"); - 事件1结果.Text = result.ToString(); + if (事件1.Text.Contains("事件")) + { + 事件1.Visible = true; + 事件1结果.Visible = true; + 事件1时间.Visible = true; + 事件1.Text = name; + 事件1时间.Text = dateTime.ToString("MM-dd HH:mm:ss"); + 事件1结果.Text = result.ToString(); + } + else if (事件2.Text.Contains("事件")) + { + 事件2.Visible = true; + 事件2结果.Visible = true; + 事件2时间.Visible = true; + 事件2.Text = name; + 事件2时间.Text = dateTime.ToString("MM-dd HH:mm:ss"); + 事件2结果.Text = result.ToString(); + } + else if (事件3.Text.Contains("事件")) + { + 事件3.Visible = true; + 事件3结果.Visible = true; + 事件3时间.Visible = true; + 事件3.Text = name; + 事件3时间.Text = dateTime.ToString("MM-dd HH:mm:ss"); + 事件3结果.Text = result.ToString(); + } + else if (事件4.Text.Contains("事件")) + { + 事件4.Visible = true; + 事件4结果.Visible = true; + 事件4时间.Visible = true; + 事件4.Text = name; + 事件4时间.Text = dateTime.ToString("MM-dd HH:mm:ss"); + 事件4结果.Text = result.ToString(); + } + else + { + 事件1.Visible = true; + 事件1结果.Visible = true; + 事件1时间.Visible = true; + 事件1.Text = name; + 事件1时间.Text = dateTime.ToString("MM-dd HH:mm:ss"); + 事件1结果.Text = result.ToString(); - 事件2.Visible = false; - 事件2结果.Visible = false; - 事件2时间.Visible = false; - 事件2.Text = "事件2"; - 事件2时间.Text = "事件2时间"; - 事件2结果.Text = "OK"; + 事件2.Visible = false; + 事件2结果.Visible = false; + 事件2时间.Visible = false; + 事件2.Text = "事件2"; + 事件2时间.Text = "事件2时间"; + 事件2结果.Text = "OK"; - 事件3.Visible = false; - 事件3结果.Visible = false; - 事件3时间.Visible = false; - 事件3.Text = "事件3"; - 事件3时间.Text = "事件3时间"; - 事件3结果.Text = "OK"; - - 事件4.Visible = false; - 事件4结果.Visible = false; - 事件4时间.Visible = false; - 事件4.Text = "事件4"; - 事件4时间.Text = "事件4时间"; - 事件4结果.Text = "OK"; + 事件3.Visible = false; + 事件3结果.Visible = false; + 事件3时间.Visible = false; + 事件3.Text = "事件3"; + 事件3时间.Text = "事件3时间"; + 事件3结果.Text = "OK"; + 事件4.Visible = false; + 事件4结果.Visible = false; + 事件4时间.Visible = false; + 事件4.Text = "事件4"; + 事件4时间.Text = "事件4时间"; + 事件4结果.Text = "OK"; + } } - - } + #endregion + } } diff --git a/WindowsFormsApp1/Program.cs b/WindowsFormsApp1/Program.cs index dd8be8a..d649712 100644 --- a/WindowsFormsApp1/Program.cs +++ b/WindowsFormsApp1/Program.cs @@ -51,7 +51,7 @@ namespace WindowsFormsApp1 public static int errinterface1 = 0; public static int errinterface2 = 0; - public static short Plcstatus = 0; + public static short Plcstatus = -1; public static DateTime Plcstatus_LastTime = DateTime.Now; } diff --git a/WindowsFormsApp1/db/MES_PLC.db b/WindowsFormsApp1/db/MES_PLC.db index fbf34b1662205a6e887b910577189685c93afd70..b20bc4b993fda414ac6374da50ef9077ed830a42 100644 GIT binary patch delta 1793 zcmZoTz|nAkV}i8cRt5$JB_QSmVi6#Yo2X-~xs^fBzm}KHh=G?yor!-Pj~#nGt0l`i z7IkiJt}M1(P6xgg-Y5=d7WK`F3iFvatF!PiFyeRY3_!*9x+=n(@p$r^ z5l(*^u@mV}qk-^eQcivnFg*t_v59MIGe&|VbMtO~cLBLO3_Scito+~j`}te>FY#CN zFXVs0zm-3R--cg?p9fejz2U3plVn!pN90LEISFP*ew-m;Y$zv=Pu|E-R*cz^6Q_Pd z4nbyN!GfG*BQp+uW>Lnp$=&)|0@9+)w#a%WAJtcvW6VyiEKAHOO=aTX1ggx*%uChe z1r|Jv{P!66?`;+|xWccez{tTMD#|3vFCUzonCI;8YpmMfm!Fqv@vL+8^97C1=B)zh zVB(+4z<-E;E>O=zepO{ARt8y7L$}PF)PTg23>T}Im}k@4pX}cDbnT31Q}#Wbv*GF7 zhRKKg?YJPe-C^Lr1JrqmUr&jV6KWeHF6(?DdTuiC-vsJ8$8V&q3fClxOOr7WK=j>Z z;J*vhcbQ*X5w49Bmo{i2EIgT`L7P_!$Ws7fP&K7E*`Yz5l?BLR0~$7kf6@UKHb#E9 W*~&1p8RgN;=70xV(}HCS7#jdsy%2Q( delta 368 zcmZoTz|nAkV}i8cG6n_)B_QSmVhJD)nW$r|xr{;2zm}KHh=G$uor!-Pj~#nGt0l`i z7IkiJwqsmbEb1`0Sy5p=^JaAxJ|@N~6DLm4Ycx}27q_%zY+^4-Ov*`(&rYo@OUx-v zjnB_Xi8nGZGBq$Vw1kUJp3f%B0aG&h7@OzhJ6uweYuI-%F + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); + this.保存 = new System.Windows.Forms.Button(); + this.查询 = new System.Windows.Forms.Button(); + this.dataGridView1 = new System.Windows.Forms.DataGridView(); + this.关闭 = new System.Windows.Forms.Button(); + this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); + this.id = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.name = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.portName = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.baudRate = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.parity = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.dataBits = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.enable = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.reamrk = new System.Windows.Forms.DataGridViewTextBoxColumn(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit(); + this.tableLayoutPanel1.SuspendLayout(); + this.SuspendLayout(); + // + // 保存 + // + 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(1488, 528); + this.保存.Margin = new System.Windows.Forms.Padding(6, 5, 6, 5); + this.保存.Name = "保存"; + this.保存.Size = new System.Drawing.Size(153, 56); + this.保存.TabIndex = 1; + this.保存.Text = "保存"; + this.保存.UseVisualStyleBackColor = true; + this.保存.Click += new System.EventHandler(this.保存_Click); + // + // 查询 + // + 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(1488, 51); + this.查询.Margin = new System.Windows.Forms.Padding(6, 5, 6, 5); + this.查询.Name = "查询"; + this.查询.Size = new System.Drawing.Size(153, 56); + this.查询.TabIndex = 3; + this.查询.Text = "查询"; + this.查询.UseVisualStyleBackColor = true; + this.查询.Click += new System.EventHandler(this.查询_Click); + // + // dataGridView1 + // + this.dataGridView1.AllowUserToAddRows = false; + this.dataGridView1.AllowUserToDeleteRows = false; + dataGridViewCellStyle1.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.dataGridView1.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; + dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2; + this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.id, + this.name, + this.portName, + this.baudRate, + this.parity, + this.dataBits, + this.enable, + this.reamrk}); + dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle3.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridView1.DefaultCellStyle = dataGridViewCellStyle3; + this.dataGridView1.Dock = System.Windows.Forms.DockStyle.Fill; + this.dataGridView1.Location = new System.Drawing.Point(6, 5); + this.dataGridView1.Margin = new System.Windows.Forms.Padding(6, 5, 6, 5); + this.dataGridView1.Name = "dataGridView1"; + this.dataGridView1.RowHeadersWidth = 72; + this.tableLayoutPanel1.SetRowSpan(this.dataGridView1, 4); + this.dataGridView1.RowTemplate.Height = 23; + this.dataGridView1.Size = new System.Drawing.Size(1470, 785); + this.dataGridView1.TabIndex = 0; + // + // 关闭 + // + 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(1488, 687); + this.关闭.Margin = new System.Windows.Forms.Padding(6, 5, 6, 5); + this.关闭.Name = "关闭"; + this.关闭.Size = new System.Drawing.Size(153, 56); + this.关闭.TabIndex = 2; + this.关闭.Text = "关闭"; + this.关闭.UseVisualStyleBackColor = true; + this.关闭.Click += new System.EventHandler(this.关闭_Click); + // + // tableLayoutPanel1 + // + this.tableLayoutPanel1.ColumnCount = 2; + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 90F)); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 10F)); + this.tableLayoutPanel1.Controls.Add(this.dataGridView1, 0, 0); + this.tableLayoutPanel1.Controls.Add(this.查询, 1, 0); + this.tableLayoutPanel1.Controls.Add(this.关闭, 1, 3); + this.tableLayoutPanel1.Controls.Add(this.保存, 1, 2); + this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0); + this.tableLayoutPanel1.Margin = new System.Windows.Forms.Padding(6, 5, 6, 5); + this.tableLayoutPanel1.Name = "tableLayoutPanel1"; + this.tableLayoutPanel1.RowCount = 4; + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 40F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20F)); + this.tableLayoutPanel1.Size = new System.Drawing.Size(1647, 795); + this.tableLayoutPanel1.TabIndex = 4; + // + // id + // + this.id.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.id.DataPropertyName = "id"; + this.id.HeaderText = "序号"; + this.id.MinimumWidth = 9; + this.id.Name = "id"; + this.id.ReadOnly = true; + // + // name + // + this.name.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.name.DataPropertyName = "name"; + this.name.HeaderText = "名称"; + this.name.MinimumWidth = 9; + this.name.Name = "name"; + this.name.ReadOnly = true; + // + // portName + // + this.portName.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.portName.DataPropertyName = "portName"; + this.portName.HeaderText = "COM口"; + this.portName.MinimumWidth = 9; + this.portName.Name = "portName"; + this.portName.ReadOnly = true; + // + // baudRate + // + this.baudRate.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.baudRate.DataPropertyName = "baudRate"; + this.baudRate.HeaderText = "波特率"; + this.baudRate.MinimumWidth = 9; + this.baudRate.Name = "baudRate"; + // + // parity + // + this.parity.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.parity.DataPropertyName = "parity"; + this.parity.HeaderText = "奇偶校验位"; + this.parity.MinimumWidth = 9; + this.parity.Name = "parity"; + // + // dataBits + // + this.dataBits.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.dataBits.DataPropertyName = "dataBits"; + this.dataBits.HeaderText = "数据位"; + this.dataBits.MinimumWidth = 9; + this.dataBits.Name = "dataBits"; + // + // enable + // + this.enable.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.enable.DataPropertyName = "enable"; + this.enable.HeaderText = "是否启用"; + this.enable.MinimumWidth = 9; + this.enable.Name = "enable"; + this.enable.Resizable = System.Windows.Forms.DataGridViewTriState.True; + // + // reamrk + // + this.reamrk.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.reamrk.DataPropertyName = "reamrk"; + this.reamrk.HeaderText = "备注"; + this.reamrk.MinimumWidth = 9; + this.reamrk.Name = "reamrk"; + // + // SerialPort_Manage + // + this.AutoScaleDimensions = new System.Drawing.SizeF(11F, 21F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(1647, 795); + this.Controls.Add(this.tableLayoutPanel1); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; + this.Margin = new System.Windows.Forms.Padding(6, 5, 6, 5); + this.Name = "SerialPort_Manage"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "SerialPort_Manage"; + this.Load += new System.EventHandler(this.MES_URL_Load); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit(); + this.tableLayoutPanel1.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + private System.Windows.Forms.Button 保存; + private System.Windows.Forms.Button 查询; + private System.Windows.Forms.DataGridView dataGridView1; + private System.Windows.Forms.Button 关闭; + private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; + private System.Windows.Forms.DataGridViewTextBoxColumn id; + private System.Windows.Forms.DataGridViewTextBoxColumn name; + private System.Windows.Forms.DataGridViewTextBoxColumn portName; + private System.Windows.Forms.DataGridViewTextBoxColumn baudRate; + private System.Windows.Forms.DataGridViewTextBoxColumn parity; + private System.Windows.Forms.DataGridViewTextBoxColumn dataBits; + private System.Windows.Forms.DataGridViewTextBoxColumn enable; + private System.Windows.Forms.DataGridViewTextBoxColumn reamrk; + } +} \ No newline at end of file diff --git a/WindowsFormsApp1/form/SerialPort_Manage.cs b/WindowsFormsApp1/form/SerialPort_Manage.cs new file mode 100644 index 0000000..a80396e --- /dev/null +++ b/WindowsFormsApp1/form/SerialPort_Manage.cs @@ -0,0 +1,79 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using WindowsFormsApp1.db; +using WindowsFormsApp1.mod; +using WindowsFormsApp1.mod.database; + +namespace WindowsFormsApp1 +{ + public partial class SerialPort_Manage : Form + { + public SerialPort_Manage() + { + InitializeComponent(); + } + + private void MES_URL_Load(object sender, EventArgs e) + { + dataGridView1.AutoGenerateColumns = false; + GetInfo(); + } + + private void 保存_Click(object sender, EventArgs e) + { + try + { + SQLiteHelper sQLiteHelper = new db.SQLiteHelper(); + var result = sQLiteHelper.UpdateAll((List)dataGridView1.DataSource); + if (result.Success) + { + MessageBox.Show("更新成功"); + GetInfo(); + } + else + { + MessageBox.Show("更新失败"); + } + } + catch (Exception ex) + { + MessageBox.Show($"更新失败,错误原因{ex.Message}"); + } + } + + private void 关闭_Click(object sender, EventArgs e) + { + this.Close(); + } + + private void 查询_Click(object sender, EventArgs e) + { + GetInfo(); + } + + public void GetInfo() + { + try + { + SQLiteHelper sQLiteHelper = new db.SQLiteHelper(); + var result = sQLiteHelper.QueryAll(); + if (result.Success) + { + dataGridView1.DataSource = null; + dataGridView1.DataSource = result.Data; + dataGridView1.Refresh(); + } + } + catch (Exception ex) + { + } + } + } +} diff --git a/WindowsFormsApp1/form/SerialPort_Manage.resx b/WindowsFormsApp1/form/SerialPort_Manage.resx new file mode 100644 index 0000000..444a170 --- /dev/null +++ b/WindowsFormsApp1/form/SerialPort_Manage.resx @@ -0,0 +1,144 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + \ No newline at end of file diff --git a/WindowsFormsApp1/form/USER_Manage.Designer.cs b/WindowsFormsApp1/form/USER_Manage.Designer.cs index ffa3046..fbfea84 100644 --- a/WindowsFormsApp1/form/USER_Manage.Designer.cs +++ b/WindowsFormsApp1/form/USER_Manage.Designer.cs @@ -68,21 +68,24 @@ dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.HighlightText; dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.False; this.dataGridView1.DefaultCellStyle = dataGridViewCellStyle3; - this.dataGridView1.Location = new System.Drawing.Point(3, 3); + this.dataGridView1.Dock = System.Windows.Forms.DockStyle.Fill; + this.dataGridView1.Location = new System.Drawing.Point(6, 5); + this.dataGridView1.Margin = new System.Windows.Forms.Padding(6, 5, 6, 5); this.dataGridView1.Name = "dataGridView1"; this.dataGridView1.RowHeadersWidth = 72; this.tableLayoutPanel1.SetRowSpan(this.dataGridView1, 4); this.dataGridView1.RowTemplate.Height = 23; - this.dataGridView1.Size = new System.Drawing.Size(1685, 1011); + this.dataGridView1.Size = new System.Drawing.Size(1475, 711); this.dataGridView1.TabIndex = 0; // // 查询 // 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(1739, 34); + this.查询.Location = new System.Drawing.Point(1493, 36); + this.查询.Margin = new System.Windows.Forms.Padding(6, 5, 6, 5); this.查询.Name = "查询"; - this.查询.Size = new System.Drawing.Size(92, 41); + this.查询.Size = new System.Drawing.Size(154, 72); this.查询.TabIndex = 1; this.查询.Text = "查询"; this.查询.UseVisualStyleBackColor = true; @@ -92,9 +95,10 @@ // 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(1739, 861); + this.保存.Location = new System.Drawing.Point(1493, 468); + this.保存.Margin = new System.Windows.Forms.Padding(6, 5, 6, 5); this.保存.Name = "保存"; - this.保存.Size = new System.Drawing.Size(92, 41); + this.保存.Size = new System.Drawing.Size(154, 72); this.保存.TabIndex = 2; this.保存.Text = "保存"; this.保存.UseVisualStyleBackColor = true; @@ -104,9 +108,10 @@ // 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(1739, 952); + this.关闭.Location = new System.Drawing.Point(1493, 612); + this.关闭.Margin = new System.Windows.Forms.Padding(6, 5, 6, 5); this.关闭.Name = "关闭"; - this.关闭.Size = new System.Drawing.Size(92, 41); + this.关闭.Size = new System.Drawing.Size(154, 72); this.关闭.TabIndex = 3; this.关闭.Text = "关闭"; this.关闭.UseVisualStyleBackColor = true; @@ -117,53 +122,55 @@ this.tableLayoutPanel1.ColumnCount = 2; this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 90F)); this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 10F)); - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F)); this.tableLayoutPanel1.Controls.Add(this.关闭, 1, 3); this.tableLayoutPanel1.Controls.Add(this.dataGridView1, 0, 0); this.tableLayoutPanel1.Controls.Add(this.保存, 1, 2); this.tableLayoutPanel1.Controls.Add(this.查询, 1, 0); - this.tableLayoutPanel1.Location = new System.Drawing.Point(13, 12); + this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0); + this.tableLayoutPanel1.Margin = new System.Windows.Forms.Padding(6, 5, 6, 5); this.tableLayoutPanel1.Name = "tableLayoutPanel1"; this.tableLayoutPanel1.RowCount = 4; - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 13.08411F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 86.91589F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 94F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 87F)); - this.tableLayoutPanel1.Size = new System.Drawing.Size(1879, 1017); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 40F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20F)); + this.tableLayoutPanel1.Size = new System.Drawing.Size(1653, 721); this.tableLayoutPanel1.TabIndex = 4; // // id // + this.id.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; this.id.DataPropertyName = "id"; this.id.HeaderText = "序号"; this.id.MinimumWidth = 9; this.id.Name = "id"; this.id.ReadOnly = true; - this.id.Width = 175; // // username // + this.username.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; this.username.DataPropertyName = "username"; this.username.HeaderText = "用户名"; this.username.MinimumWidth = 9; this.username.Name = "username"; - this.username.Width = 175; // // password // + this.password.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; this.password.DataPropertyName = "password"; this.password.HeaderText = "密码"; this.password.MinimumWidth = 9; this.password.Name = "password"; - this.password.Width = 175; // // USER_Manage // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleDimensions = new System.Drawing.SizeF(11F, 21F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(1904, 1041); + this.ClientSize = new System.Drawing.Size(1653, 721); this.Controls.Add(this.tableLayoutPanel1); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; + this.Margin = new System.Windows.Forms.Padding(6, 5, 6, 5); this.Name = "USER_Manage"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "USER_Manage"; diff --git a/WindowsFormsApp1/mod/database/t_serialport.cs b/WindowsFormsApp1/mod/database/t_serialport.cs new file mode 100644 index 0000000..0a49d29 --- /dev/null +++ b/WindowsFormsApp1/mod/database/t_serialport.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using SQLite; + +namespace WindowsFormsApp1.mod.database +{ + [Table("serialport")] + public class t_serialport + { + [PrimaryKey, AutoIncrement] + public int id { get; set; } + public string name { get; set; } + + /// + /// COM口 + /// + public string portName { get; set; } + /// + /// 波特率 + /// + public int baudRate { get; set; } + /// + /// 奇偶校验 + /// + public string parity { get; set; } + /// + /// 数据位 + /// + public int dataBits { get; set; } + public string reamrk { get; set; } + public bool enable { get; set; } + } +} diff --git a/WindowsFormsApp1/mod/server/otherdata.cs b/WindowsFormsApp1/mod/server/otherdata.cs index 8e7b040..e3d2532 100644 --- a/WindowsFormsApp1/mod/server/otherdata.cs +++ b/WindowsFormsApp1/mod/server/otherdata.cs @@ -11,12 +11,12 @@ namespace WindowsFormsApp1.mod.server /// /// PLC反馈的机台状态 /// - public plcstatus Plc_Status { get; set; } + public int Plc_Status { get; set; } /// /// PLC反馈的机台报警 /// - public string Plc_ErrorMsg { get; set; } + public List Plc_ErrorMsgs { get; set; } /// /// 文件上传地址