添加项目文件。

This commit is contained in:
zhusenlin
2026-01-15 15:06:36 +08:00
parent 4602f42483
commit 63abae1cbe
319 changed files with 197251 additions and 0 deletions

View File

@@ -0,0 +1,857 @@
namespace CowainHmi.ProductionQty
{
partial class DlgProductionTimeEdit
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
PCHMI.InterLock interLock1 = new PCHMI.InterLock();
PCHMI.DrawStyle drawStyle1 = new PCHMI.DrawStyle();
PCHMI.OPTLOG optlog1 = new PCHMI.OPTLOG();
PCHMI.GLINT glint1 = new PCHMI.GLINT();
PCHMI.InterLock interLock2 = new PCHMI.InterLock();
PCHMI.INFORM inform1 = new PCHMI.INFORM();
PCHMI.InterLock interLock3 = new PCHMI.InterLock();
PCHMI.DrawStyle drawStyle2 = new PCHMI.DrawStyle();
PCHMI.OPTLOG optlog2 = new PCHMI.OPTLOG();
PCHMI.GLINT glint2 = new PCHMI.GLINT();
PCHMI.InterLock interLock4 = new PCHMI.InterLock();
PCHMI.INFORM inform2 = new PCHMI.INFORM();
PCHMI.InterLock interLock5 = new PCHMI.InterLock();
PCHMI.DrawStyle drawStyle3 = new PCHMI.DrawStyle();
PCHMI.OPTLOG optlog3 = new PCHMI.OPTLOG();
PCHMI.GLINT glint3 = new PCHMI.GLINT();
PCHMI.InterLock interLock6 = new PCHMI.InterLock();
PCHMI.INFORM inform3 = new PCHMI.INFORM();
PCHMI.InterLock interLock7 = new PCHMI.InterLock();
PCHMI.DrawStyle drawStyle4 = new PCHMI.DrawStyle();
PCHMI.OPTLOG optlog4 = new PCHMI.OPTLOG();
PCHMI.GLINT glint4 = new PCHMI.GLINT();
PCHMI.InterLock interLock8 = new PCHMI.InterLock();
PCHMI.INFORM inform4 = new PCHMI.INFORM();
PCHMI.InterLock interLock9 = new PCHMI.InterLock();
PCHMI.DrawStyle drawStyle5 = new PCHMI.DrawStyle();
PCHMI.OPTLOG optlog5 = new PCHMI.OPTLOG();
PCHMI.GLINT glint5 = new PCHMI.GLINT();
PCHMI.InterLock interLock10 = new PCHMI.InterLock();
PCHMI.INFORM inform5 = new PCHMI.INFORM();
PCHMI.InterLock interLock11 = new PCHMI.InterLock();
PCHMI.DrawStyle drawStyle6 = new PCHMI.DrawStyle();
PCHMI.OPTLOG optlog6 = new PCHMI.OPTLOG();
PCHMI.GLINT glint6 = new PCHMI.GLINT();
PCHMI.InterLock interLock12 = new PCHMI.InterLock();
PCHMI.INFORM inform6 = new PCHMI.INFORM();
this.btnCancel = new System.Windows.Forms.Button();
this.btnOk = new System.Windows.Forms.Button();
this.1 = new PCHMI.(this.components);
this.txtEndA = new PCHMI.();
this.22 = new PCHMI.(this.components);
this.txtStartA = new PCHMI.();
this.2 = new PCHMI.(this.components);
this.txtEndB = new PCHMI.();
this.3 = new PCHMI.(this.components);
this.txtStartB = new PCHMI.();
this.4 = new PCHMI.(this.components);
this.txtEndC = new PCHMI.();
this.5 = new PCHMI.(this.components);
this.txtStartC = new PCHMI.();
this.SuspendLayout();
//
// btnCancel
//
this.btnCancel.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCancel.Location = new System.Drawing.Point(181, 311);
this.btnCancel.Margin = new System.Windows.Forms.Padding(2);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(99, 42);
this.btnCancel.TabIndex = 594;
this.btnCancel.Text = "取消";
this.btnCancel.UseVisualStyleBackColor = true;
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
//
// btnOk
//
this.btnOk.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnOk.Location = new System.Drawing.Point(32, 311);
this.btnOk.Margin = new System.Windows.Forms.Padding(2);
this.btnOk.Name = "btnOk";
this.btnOk.Size = new System.Drawing.Size(99, 42);
this.btnOk.TabIndex = 593;
this.btnOk.Text = "确定";
this.btnOk.UseVisualStyleBackColor = true;
this.btnOk.Click += new System.EventHandler(this.btnOk_Click);
//
// 标签1
//
this.1.BackColor = System.Drawing.Color.Transparent;
this.1.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.1.HDADDR = "";
this.1.Image = null;
this.1.Location = new System.Drawing.Point(28, 77);
this.1.Name = "标签1";
this.1.PLC = ((uint)(0u));
this.1.Size = new System.Drawing.Size(144, 19);
this.1.TabIndex = 591;
this.1.Text = "A班结束时间";
this.1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.1.Value = ((ulong)(0ul));
interLock1.HDADDR = "";
interLock1.PLC = ((uint)(0u));
interLock1. = ((uint)(1u));
interLock1. = "";
interLock1. = null;
interLock1. = "LOCK";
interLock1. = PCHMI.InterLock.DatType.BIT;
this.1. = interLock1;
this.1. = false;
this.1. = "";
this.1. = PCHMI..TypeEnum.;
this.1. = "";
this.1. = new System.Drawing.Point(0, 0);
drawStyle1. = 15;
drawStyle1. = System.Drawing.Color.Empty;
drawStyle1. = System.Drawing.Color.Empty;
drawStyle1. = PCHMI.DrawStyle.STYPE.;
drawStyle1. = System.Drawing.Color.LightGray;
this.1. = drawStyle1;
this.1. = ((uint)(10u));
this.1. = ((uint)(0u));
this.1. = ((uint)(0u));
this.1..PLC = null;
this.1.. = null;
this.1.. = null;
this.1.. = null;
this.1. = "";
this.1. = ((uint)(8u));
this.1. = false;
this.1. = new string[] {
null,
null,
null,
null,
null,
null,
null,
null};
optlog1. = "";
optlog1. = "";
this.1. = optlog1;
this.1. = PCHMI..DatType.BIT;
this.1. = "yyyy-MM-dd";
this.1..BkImg = null;
this.1.. = PCHMI.Employee.STSW.;
this.1.. = null;
this.1..ID = ((uint)(0u));
this.1. = "100";
this.1. = "0";
this.1. = "";
this.1. = "null";
this.1. = ((uint)(0u));
glint1.HDADDR = "";
glint1.PLC = ((uint)(0u));
glint1. = "";
glint1. = System.Drawing.Color.Red;
glint1. = ((ushort)(1000));
this.1. = glint1;
this.1. = System.Drawing.Color.Black;
//
// txtEndA
//
this.txtEndA.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(0)))));
this.txtEndA.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtEndA.HDADDR = "";
this.txtEndA.Location = new System.Drawing.Point(181, 73);
this.txtEndA.Margin = new System.Windows.Forms.Padding(27, 16, 27, 16);
this.txtEndA.Name = "txtEndA";
this.txtEndA.PLC = ((uint)(0u));
this.txtEndA.Size = new System.Drawing.Size(91, 26);
this.txtEndA.TabIndex = 592;
this.txtEndA.Text = "0";
this.txtEndA.Value = ((ulong)(0ul));
interLock2.HDADDR = "";
interLock2.PLC = ((uint)(0u));
interLock2. = ((uint)(1u));
interLock2. = "";
interLock2. = null;
interLock2. = "LOCK";
interLock2. = PCHMI.InterLock.DatType.BIT;
this.txtEndA. = interLock2;
this.txtEndA.TAB键 = false;
this.txtEndA. = ((uint)(4u));
this.txtEndA. = ((uint)(0u));
this.txtEndA. = ((uint)(0u));
this.txtEndA. = ((uint)(8u));
this.txtEndA. = "";
inform1.HDADDR = "";
inform1.PLC = ((uint)(0u));
inform1.Value = ((ulong)(1ul));
inform1. = PCHMI.INFORM.DatType.UINT16;
this.txtEndA. = inform1;
this.txtEndA. = "NULL";
this.txtEndA. = PCHMI..DatType.SIEMENS_String;
this.txtEndA. = "32000000";
this.txtEndA. = "-30000000";
this.txtEndA. = "";
this.txtEndA. = PCHMI..INTYPE.;
this.txtEndA. = "NULL";
this.txtEndA. = PCHMI..KeyInMode.;
this.txtEndA. = false;
this.txtEndA. = false;
//
// 标签22
//
this.22.BackColor = System.Drawing.Color.Transparent;
this.22.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.22.HDADDR = "";
this.22.Image = null;
this.22.Location = new System.Drawing.Point(28, 36);
this.22.Name = "标签22";
this.22.PLC = ((uint)(0u));
this.22.Size = new System.Drawing.Size(148, 19);
this.22.TabIndex = 589;
this.22.Text = "A班开始时间";
this.22.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.22.Value = ((ulong)(0ul));
interLock3.HDADDR = "";
interLock3.PLC = ((uint)(0u));
interLock3. = ((uint)(1u));
interLock3. = "";
interLock3. = null;
interLock3. = "LOCK";
interLock3. = PCHMI.InterLock.DatType.BIT;
this.22. = interLock3;
this.22. = false;
this.22. = "";
this.22. = PCHMI..TypeEnum.;
this.22. = "";
this.22. = new System.Drawing.Point(0, 0);
drawStyle2. = 15;
drawStyle2. = System.Drawing.Color.Empty;
drawStyle2. = System.Drawing.Color.Empty;
drawStyle2. = PCHMI.DrawStyle.STYPE.;
drawStyle2. = System.Drawing.Color.LightGray;
this.22. = drawStyle2;
this.22. = ((uint)(10u));
this.22. = ((uint)(0u));
this.22. = ((uint)(0u));
this.22..PLC = null;
this.22.. = null;
this.22.. = null;
this.22.. = null;
this.22. = "";
this.22. = ((uint)(8u));
this.22. = false;
this.22. = new string[] {
null,
null,
null,
null,
null,
null,
null,
null};
optlog2. = "";
optlog2. = "";
this.22. = optlog2;
this.22. = PCHMI..DatType.BIT;
this.22. = "yyyy-MM-dd";
this.22..BkImg = null;
this.22.. = PCHMI.Employee.STSW.;
this.22.. = null;
this.22..ID = ((uint)(0u));
this.22. = "100";
this.22. = "0";
this.22. = "";
this.22. = "null";
this.22. = ((uint)(0u));
glint2.HDADDR = "";
glint2.PLC = ((uint)(0u));
glint2. = "";
glint2. = System.Drawing.Color.Red;
glint2. = ((ushort)(1000));
this.22. = glint2;
this.22. = System.Drawing.Color.Black;
//
// txtStartA
//
this.txtStartA.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(0)))));
this.txtStartA.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtStartA.HDADDR = "";
this.txtStartA.Location = new System.Drawing.Point(181, 32);
this.txtStartA.Margin = new System.Windows.Forms.Padding(27, 16, 27, 16);
this.txtStartA.Name = "txtStartA";
this.txtStartA.PLC = ((uint)(0u));
this.txtStartA.Size = new System.Drawing.Size(91, 26);
this.txtStartA.TabIndex = 590;
this.txtStartA.Text = "0";
this.txtStartA.Value = ((ulong)(0ul));
interLock4.HDADDR = "";
interLock4.PLC = ((uint)(0u));
interLock4. = ((uint)(1u));
interLock4. = "";
interLock4. = null;
interLock4. = "LOCK";
interLock4. = PCHMI.InterLock.DatType.BIT;
this.txtStartA. = interLock4;
this.txtStartA.TAB键 = false;
this.txtStartA. = ((uint)(4u));
this.txtStartA. = ((uint)(0u));
this.txtStartA. = ((uint)(0u));
this.txtStartA. = ((uint)(8u));
this.txtStartA. = "";
inform2.HDADDR = "";
inform2.PLC = ((uint)(0u));
inform2.Value = ((ulong)(1ul));
inform2. = PCHMI.INFORM.DatType.UINT16;
this.txtStartA. = inform2;
this.txtStartA. = "NULL";
this.txtStartA. = PCHMI..DatType.SIEMENS_String;
this.txtStartA. = "32000000";
this.txtStartA. = "-30000000";
this.txtStartA. = "";
this.txtStartA. = PCHMI..INTYPE.;
this.txtStartA. = "NULL";
this.txtStartA. = PCHMI..KeyInMode.;
this.txtStartA. = false;
this.txtStartA. = false;
//
// 标签2
//
this.2.BackColor = System.Drawing.Color.Transparent;
this.2.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.2.HDADDR = "";
this.2.Image = null;
this.2.Location = new System.Drawing.Point(28, 159);
this.2.Name = "标签2";
this.2.PLC = ((uint)(0u));
this.2.Size = new System.Drawing.Size(144, 19);
this.2.TabIndex = 597;
this.2.Text = "B班结束时间";
this.2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.2.Value = ((ulong)(0ul));
interLock5.HDADDR = "";
interLock5.PLC = ((uint)(0u));
interLock5. = ((uint)(1u));
interLock5. = "";
interLock5. = null;
interLock5. = "LOCK";
interLock5. = PCHMI.InterLock.DatType.BIT;
this.2. = interLock5;
this.2. = false;
this.2. = "";
this.2. = PCHMI..TypeEnum.;
this.2. = "";
this.2. = new System.Drawing.Point(0, 0);
drawStyle3. = 15;
drawStyle3. = System.Drawing.Color.Empty;
drawStyle3. = System.Drawing.Color.Empty;
drawStyle3. = PCHMI.DrawStyle.STYPE.;
drawStyle3. = System.Drawing.Color.LightGray;
this.2. = drawStyle3;
this.2. = ((uint)(10u));
this.2. = ((uint)(0u));
this.2. = ((uint)(0u));
this.2..PLC = null;
this.2.. = null;
this.2.. = null;
this.2.. = null;
this.2. = "";
this.2. = ((uint)(8u));
this.2. = false;
this.2. = new string[] {
null,
null,
null,
null,
null,
null,
null,
null};
optlog3. = "";
optlog3. = "";
this.2. = optlog3;
this.2. = PCHMI..DatType.BIT;
this.2. = "yyyy-MM-dd";
this.2..BkImg = null;
this.2.. = PCHMI.Employee.STSW.;
this.2.. = null;
this.2..ID = ((uint)(0u));
this.2. = "100";
this.2. = "0";
this.2. = "";
this.2. = "null";
this.2. = ((uint)(0u));
glint3.HDADDR = "";
glint3.PLC = ((uint)(0u));
glint3. = "";
glint3. = System.Drawing.Color.Red;
glint3. = ((ushort)(1000));
this.2. = glint3;
this.2. = System.Drawing.Color.Black;
//
// txtEndB
//
this.txtEndB.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(0)))));
this.txtEndB.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtEndB.HDADDR = "";
this.txtEndB.Location = new System.Drawing.Point(181, 155);
this.txtEndB.Margin = new System.Windows.Forms.Padding(27, 16, 27, 16);
this.txtEndB.Name = "txtEndB";
this.txtEndB.PLC = ((uint)(0u));
this.txtEndB.Size = new System.Drawing.Size(91, 26);
this.txtEndB.TabIndex = 598;
this.txtEndB.Text = "0";
this.txtEndB.Value = ((ulong)(0ul));
interLock6.HDADDR = "";
interLock6.PLC = ((uint)(0u));
interLock6. = ((uint)(1u));
interLock6. = "";
interLock6. = null;
interLock6. = "LOCK";
interLock6. = PCHMI.InterLock.DatType.BIT;
this.txtEndB. = interLock6;
this.txtEndB.TAB键 = false;
this.txtEndB. = ((uint)(4u));
this.txtEndB. = ((uint)(0u));
this.txtEndB. = ((uint)(0u));
this.txtEndB. = ((uint)(8u));
this.txtEndB. = "";
inform3.HDADDR = "";
inform3.PLC = ((uint)(0u));
inform3.Value = ((ulong)(1ul));
inform3. = PCHMI.INFORM.DatType.UINT16;
this.txtEndB. = inform3;
this.txtEndB. = "NULL";
this.txtEndB. = PCHMI..DatType.SIEMENS_String;
this.txtEndB. = "32000000";
this.txtEndB. = "-30000000";
this.txtEndB. = "";
this.txtEndB. = PCHMI..INTYPE.;
this.txtEndB. = "NULL";
this.txtEndB. = PCHMI..KeyInMode.;
this.txtEndB. = false;
this.txtEndB. = false;
//
// 标签3
//
this.3.BackColor = System.Drawing.Color.Transparent;
this.3.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.3.HDADDR = "";
this.3.Image = null;
this.3.Location = new System.Drawing.Point(28, 118);
this.3.Name = "标签3";
this.3.PLC = ((uint)(0u));
this.3.Size = new System.Drawing.Size(148, 19);
this.3.TabIndex = 595;
this.3.Text = "B班开始时间";
this.3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.3.Value = ((ulong)(0ul));
interLock7.HDADDR = "";
interLock7.PLC = ((uint)(0u));
interLock7. = ((uint)(1u));
interLock7. = "";
interLock7. = null;
interLock7. = "LOCK";
interLock7. = PCHMI.InterLock.DatType.BIT;
this.3. = interLock7;
this.3. = false;
this.3. = "";
this.3. = PCHMI..TypeEnum.;
this.3. = "";
this.3. = new System.Drawing.Point(0, 0);
drawStyle4. = 15;
drawStyle4. = System.Drawing.Color.Empty;
drawStyle4. = System.Drawing.Color.Empty;
drawStyle4. = PCHMI.DrawStyle.STYPE.;
drawStyle4. = System.Drawing.Color.LightGray;
this.3. = drawStyle4;
this.3. = ((uint)(10u));
this.3. = ((uint)(0u));
this.3. = ((uint)(0u));
this.3..PLC = null;
this.3.. = null;
this.3.. = null;
this.3.. = null;
this.3. = "";
this.3. = ((uint)(8u));
this.3. = false;
this.3. = new string[] {
null,
null,
null,
null,
null,
null,
null,
null};
optlog4. = "";
optlog4. = "";
this.3. = optlog4;
this.3. = PCHMI..DatType.BIT;
this.3. = "yyyy-MM-dd";
this.3..BkImg = null;
this.3.. = PCHMI.Employee.STSW.;
this.3.. = null;
this.3..ID = ((uint)(0u));
this.3. = "100";
this.3. = "0";
this.3. = "";
this.3. = "null";
this.3. = ((uint)(0u));
glint4.HDADDR = "";
glint4.PLC = ((uint)(0u));
glint4. = "";
glint4. = System.Drawing.Color.Red;
glint4. = ((ushort)(1000));
this.3. = glint4;
this.3. = System.Drawing.Color.Black;
//
// txtStartB
//
this.txtStartB.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(0)))));
this.txtStartB.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtStartB.HDADDR = "";
this.txtStartB.Location = new System.Drawing.Point(181, 114);
this.txtStartB.Margin = new System.Windows.Forms.Padding(27, 16, 27, 16);
this.txtStartB.Name = "txtStartB";
this.txtStartB.PLC = ((uint)(0u));
this.txtStartB.Size = new System.Drawing.Size(91, 26);
this.txtStartB.TabIndex = 596;
this.txtStartB.Text = "0";
this.txtStartB.Value = ((ulong)(0ul));
interLock8.HDADDR = "";
interLock8.PLC = ((uint)(0u));
interLock8. = ((uint)(1u));
interLock8. = "";
interLock8. = null;
interLock8. = "LOCK";
interLock8. = PCHMI.InterLock.DatType.BIT;
this.txtStartB. = interLock8;
this.txtStartB.TAB键 = false;
this.txtStartB. = ((uint)(4u));
this.txtStartB. = ((uint)(0u));
this.txtStartB. = ((uint)(0u));
this.txtStartB. = ((uint)(8u));
this.txtStartB. = "";
inform4.HDADDR = "";
inform4.PLC = ((uint)(0u));
inform4.Value = ((ulong)(1ul));
inform4. = PCHMI.INFORM.DatType.UINT16;
this.txtStartB. = inform4;
this.txtStartB. = "NULL";
this.txtStartB. = PCHMI..DatType.SIEMENS_String;
this.txtStartB. = "32000000";
this.txtStartB. = "-30000000";
this.txtStartB. = "";
this.txtStartB. = PCHMI..INTYPE.;
this.txtStartB. = "NULL";
this.txtStartB. = PCHMI..KeyInMode.;
this.txtStartB. = false;
this.txtStartB. = false;
//
// 标签4
//
this.4.BackColor = System.Drawing.Color.Transparent;
this.4.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.4.HDADDR = "";
this.4.Image = null;
this.4.Location = new System.Drawing.Point(28, 241);
this.4.Name = "标签4";
this.4.PLC = ((uint)(0u));
this.4.Size = new System.Drawing.Size(144, 19);
this.4.TabIndex = 601;
this.4.Text = "C班结束时间";
this.4.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.4.Value = ((ulong)(0ul));
interLock9.HDADDR = "";
interLock9.PLC = ((uint)(0u));
interLock9. = ((uint)(1u));
interLock9. = "";
interLock9. = null;
interLock9. = "LOCK";
interLock9. = PCHMI.InterLock.DatType.BIT;
this.4. = interLock9;
this.4. = false;
this.4. = "";
this.4. = PCHMI..TypeEnum.;
this.4. = "";
this.4. = new System.Drawing.Point(0, 0);
drawStyle5. = 15;
drawStyle5. = System.Drawing.Color.Empty;
drawStyle5. = System.Drawing.Color.Empty;
drawStyle5. = PCHMI.DrawStyle.STYPE.;
drawStyle5. = System.Drawing.Color.LightGray;
this.4. = drawStyle5;
this.4. = ((uint)(10u));
this.4. = ((uint)(0u));
this.4. = ((uint)(0u));
this.4..PLC = null;
this.4.. = null;
this.4.. = null;
this.4.. = null;
this.4. = "";
this.4. = ((uint)(8u));
this.4. = false;
this.4. = new string[] {
null,
null,
null,
null,
null,
null,
null,
null};
optlog5. = "";
optlog5. = "";
this.4. = optlog5;
this.4. = PCHMI..DatType.BIT;
this.4. = "yyyy-MM-dd";
this.4..BkImg = null;
this.4.. = PCHMI.Employee.STSW.;
this.4.. = null;
this.4..ID = ((uint)(0u));
this.4. = "100";
this.4. = "0";
this.4. = "";
this.4. = "null";
this.4. = ((uint)(0u));
glint5.HDADDR = "";
glint5.PLC = ((uint)(0u));
glint5. = "";
glint5. = System.Drawing.Color.Red;
glint5. = ((ushort)(1000));
this.4. = glint5;
this.4. = System.Drawing.Color.Black;
//
// txtEndC
//
this.txtEndC.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(0)))));
this.txtEndC.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtEndC.HDADDR = "";
this.txtEndC.Location = new System.Drawing.Point(181, 237);
this.txtEndC.Margin = new System.Windows.Forms.Padding(27, 16, 27, 16);
this.txtEndC.Name = "txtEndC";
this.txtEndC.PLC = ((uint)(0u));
this.txtEndC.Size = new System.Drawing.Size(91, 26);
this.txtEndC.TabIndex = 602;
this.txtEndC.Text = "0";
this.txtEndC.Value = ((ulong)(0ul));
interLock10.HDADDR = "";
interLock10.PLC = ((uint)(0u));
interLock10. = ((uint)(1u));
interLock10. = "";
interLock10. = null;
interLock10. = "LOCK";
interLock10. = PCHMI.InterLock.DatType.BIT;
this.txtEndC. = interLock10;
this.txtEndC.TAB键 = false;
this.txtEndC. = ((uint)(4u));
this.txtEndC. = ((uint)(0u));
this.txtEndC. = ((uint)(0u));
this.txtEndC. = ((uint)(8u));
this.txtEndC. = "";
inform5.HDADDR = "";
inform5.PLC = ((uint)(0u));
inform5.Value = ((ulong)(1ul));
inform5. = PCHMI.INFORM.DatType.UINT16;
this.txtEndC. = inform5;
this.txtEndC. = "NULL";
this.txtEndC. = PCHMI..DatType.SIEMENS_String;
this.txtEndC. = "32000000";
this.txtEndC. = "-30000000";
this.txtEndC. = "";
this.txtEndC. = PCHMI..INTYPE.;
this.txtEndC. = "NULL";
this.txtEndC. = PCHMI..KeyInMode.;
this.txtEndC. = false;
this.txtEndC. = false;
//
// 标签5
//
this.5.BackColor = System.Drawing.Color.Transparent;
this.5.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.5.HDADDR = "";
this.5.Image = null;
this.5.Location = new System.Drawing.Point(28, 200);
this.5.Name = "标签5";
this.5.PLC = ((uint)(0u));
this.5.Size = new System.Drawing.Size(148, 19);
this.5.TabIndex = 599;
this.5.Text = "C班开始时间";
this.5.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.5.Value = ((ulong)(0ul));
interLock11.HDADDR = "";
interLock11.PLC = ((uint)(0u));
interLock11. = ((uint)(1u));
interLock11. = "";
interLock11. = null;
interLock11. = "LOCK";
interLock11. = PCHMI.InterLock.DatType.BIT;
this.5. = interLock11;
this.5. = false;
this.5. = "";
this.5. = PCHMI..TypeEnum.;
this.5. = "";
this.5. = new System.Drawing.Point(0, 0);
drawStyle6. = 15;
drawStyle6. = System.Drawing.Color.Empty;
drawStyle6. = System.Drawing.Color.Empty;
drawStyle6. = PCHMI.DrawStyle.STYPE.;
drawStyle6. = System.Drawing.Color.LightGray;
this.5. = drawStyle6;
this.5. = ((uint)(10u));
this.5. = ((uint)(0u));
this.5. = ((uint)(0u));
this.5..PLC = null;
this.5.. = null;
this.5.. = null;
this.5.. = null;
this.5. = "";
this.5. = ((uint)(8u));
this.5. = false;
this.5. = new string[] {
null,
null,
null,
null,
null,
null,
null,
null};
optlog6. = "";
optlog6. = "";
this.5. = optlog6;
this.5. = PCHMI..DatType.BIT;
this.5. = "yyyy-MM-dd";
this.5..BkImg = null;
this.5.. = PCHMI.Employee.STSW.;
this.5.. = null;
this.5..ID = ((uint)(0u));
this.5. = "100";
this.5. = "0";
this.5. = "";
this.5. = "null";
this.5. = ((uint)(0u));
glint6.HDADDR = "";
glint6.PLC = ((uint)(0u));
glint6. = "";
glint6. = System.Drawing.Color.Red;
glint6. = ((ushort)(1000));
this.5. = glint6;
this.5. = System.Drawing.Color.Black;
//
// txtStartC
//
this.txtStartC.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(0)))));
this.txtStartC.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtStartC.HDADDR = "";
this.txtStartC.Location = new System.Drawing.Point(181, 196);
this.txtStartC.Margin = new System.Windows.Forms.Padding(27, 16, 27, 16);
this.txtStartC.Name = "txtStartC";
this.txtStartC.PLC = ((uint)(0u));
this.txtStartC.Size = new System.Drawing.Size(91, 26);
this.txtStartC.TabIndex = 600;
this.txtStartC.Text = "0";
this.txtStartC.Value = ((ulong)(0ul));
interLock12.HDADDR = "";
interLock12.PLC = ((uint)(0u));
interLock12. = ((uint)(1u));
interLock12. = "";
interLock12. = null;
interLock12. = "LOCK";
interLock12. = PCHMI.InterLock.DatType.BIT;
this.txtStartC. = interLock12;
this.txtStartC.TAB键 = false;
this.txtStartC. = ((uint)(4u));
this.txtStartC. = ((uint)(0u));
this.txtStartC. = ((uint)(0u));
this.txtStartC. = ((uint)(8u));
this.txtStartC. = "";
inform6.HDADDR = "";
inform6.PLC = ((uint)(0u));
inform6.Value = ((ulong)(1ul));
inform6. = PCHMI.INFORM.DatType.UINT16;
this.txtStartC. = inform6;
this.txtStartC. = "NULL";
this.txtStartC. = PCHMI..DatType.SIEMENS_String;
this.txtStartC. = "32000000";
this.txtStartC. = "-30000000";
this.txtStartC. = "";
this.txtStartC. = PCHMI..INTYPE.;
this.txtStartC. = "NULL";
this.txtStartC. = PCHMI..KeyInMode.;
this.txtStartC. = false;
this.txtStartC. = false;
//
// DlgProductionTimeEdit
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(312, 401);
this.Controls.Add(this.4);
this.Controls.Add(this.txtEndC);
this.Controls.Add(this.5);
this.Controls.Add(this.txtStartC);
this.Controls.Add(this.2);
this.Controls.Add(this.txtEndB);
this.Controls.Add(this.3);
this.Controls.Add(this.txtStartB);
this.Controls.Add(this.btnCancel);
this.Controls.Add(this.btnOk);
this.Controls.Add(this.1);
this.Controls.Add(this.txtEndA);
this.Controls.Add(this.22);
this.Controls.Add(this.txtStartA);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "DlgProductionTimeEdit";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "班次时间修改";
this.Load += new System.EventHandler(this.DlgProductionTimeEdit_Load);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Button btnCancel;
private System.Windows.Forms.Button btnOk;
private PCHMI. 1;
private PCHMI. txtEndA;
private PCHMI. 22;
private PCHMI. txtStartA;
private PCHMI. 2;
private PCHMI. txtEndB;
private PCHMI. 3;
private PCHMI. txtStartB;
private PCHMI. 4;
private PCHMI. txtEndC;
private PCHMI. 5;
private PCHMI. txtStartC;
}
}

View File

@@ -0,0 +1,70 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace CowainHmi.ProductionQty
{
public partial class DlgProductionTimeEdit : Form
{
private int plcId;
private List<string> timeAddrs;
private List<string> shiftTimeDuration = new List<string>();
public DlgProductionTimeEdit(int plcId, List<string> timeAddrs)
{
InitializeComponent();
this.plcId = plcId;
this.timeAddrs = timeAddrs;
if (timeAddrs == null || timeAddrs.Count != 6)
{
MessageBox.Show("时间参数不正常", "提示");
this.Close();
return;
}
}
private void btnOk_Click(object sender, EventArgs e)
{
PCHMI.RT.SEND_SIEMENS_STRING(plcId, timeAddrs[0], this.txtStartA.Text);
PCHMI.RT.SEND_SIEMENS_STRING(plcId, timeAddrs[1], this.txtEndA.Text);
PCHMI.RT.SEND_SIEMENS_STRING(plcId, timeAddrs[2], this.txtStartB.Text);
PCHMI.RT.SEND_SIEMENS_STRING(plcId, timeAddrs[3], this.txtEndB.Text);
PCHMI.RT.SEND_SIEMENS_STRING(plcId, timeAddrs[4], this.txtStartC.Text);
PCHMI.RT.SEND_SIEMENS_STRING(plcId, timeAddrs[5], this.txtEndC.Text);
this.DialogResult = DialogResult.OK;
}
private void btnCancel_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.Cancel;
}
private async void DlgProductionTimeEdit_Load(object sender, EventArgs e)
{
foreach (string timeAddr in timeAddrs)
{
PCHMI.VL.GET_SIEMENS_STRING(plcId, timeAddr, 4);
}
await Task.Delay(300);
foreach (string timeAddr in timeAddrs)
{
var t = PCHMI.VL.GET_SIEMENS_STRING(plcId, timeAddr, 4);
shiftTimeDuration.Add(t);
}
this.txtStartA.Text = shiftTimeDuration[0];
this.txtEndA.Text = shiftTimeDuration[1];
this.txtStartB.Text = shiftTimeDuration[2];
this.txtEndB.Text = shiftTimeDuration[3];
this.txtStartC.Text = shiftTimeDuration[4];
this.txtEndC.Text = shiftTimeDuration[5];
}
}
}

View File

@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@@ -0,0 +1,551 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using static CowainHmi.LogSearch;
using System.IO;
using System.Runtime.InteropServices;
using PCHMI;
using static System.Windows.Forms.VisualStyles.VisualStyleElement.ProgressBar;
using System.Data.OleDb;
using CowainHmi.ProductionQty;
using System.Drawing.Design;
using System.Threading;
namespace CowainHmi
{
public partial class ProductionDisplay : UserControl
{
public ProductionDisplay()
{
InitializeComponent();
}
[Category("PCHMI"), Description("PLC编号")]
public int PLCId
{
get;
set;
}
// 定义并添加自定义属性
[Browsable(true)]
[Category("Custom Properties")]
[Description("产量文件路径")]
public string ProductionFolderPath
{
get;
set;
}
[Browsable(true)]
[Editor(typeof(StringText), typeof(UITypeEditor))]
[Category("Custom Properties")]
[Description("班别A开始时间")]
public string ShiftAStartAddress
{
get;
set;
}
[Browsable(true)]
[Editor(typeof(StringText), typeof(UITypeEditor))]
[Category("Custom Properties")]
[Description("班别A结束时间")]
public string ShiftAEndAddress
{
get;
set;
}
[Browsable(true)]
[Editor(typeof(StringText), typeof(UITypeEditor))]
[Category("Custom Properties")]
[Description("班别B开始时间")]
public string ShiftBStartAddress
{
get;
set;
}
[Browsable(true)]
[Editor(typeof(StringText), typeof(UITypeEditor))]
[Category("Custom Properties")]
[Description("班别B结束时间")]
public string ShiftBEndAddress
{
get;
set;
}
[Browsable(true)]
[Editor(typeof(StringText), typeof(UITypeEditor))]
[Category("Custom Properties")]
[Description("班别C开始时间")]
public string ShiftCStartAddress
{
get;
set;
}
[Browsable(true)]
[Editor(typeof(StringText), typeof(UITypeEditor))]
[Category("Custom Properties")]
[Description("班别C结束时间")]
public string ShiftCEndAddress
{
get;
set;
}
[Category("PCHMI"), Description("工站名称")]
public string StationName { get; set; }
[Editor(typeof(StringText), typeof(UITypeEditor))]
[Category("PCHMI"), Description("上传命令地址")]
public string UpCmdAddr { get; set; }
[Editor(typeof(StringText), typeof(UITypeEditor))]
[Category("PCHMI"), Description("上传命令计数地址")]
public string RetCmdAddr { get; set; }
[Editor(typeof(StringText), typeof(UITypeEditor))]
[Category("PCHMI"), Description("反馈命令计数地址")]
public string RetCountAddr { get; set; }
[Editor(typeof(StringText), typeof(UITypeEditor))]
[Category("PCHMI"), Description("上传工单地址")]
public string UpOrderAddr { get; set; }
[Editor(typeof(StringText), typeof(UITypeEditor))]
[Category("PCHMI"), Description("上传部件号地址")]
public string UpPartNumAddr { get; set; }
private void SetCombox()
{
string text = System.Windows.Forms.Application.StartupPath + @"\" + ProductionFolderPath;
if (!Directory.Exists(text) && text.Length > 0)
{
Directory.CreateDirectory(text);
}
string productionFile = text + @"\" + dateTimePicker1.Value.ToString("yyMMdd") + ".csv";
List<> productionData = ReadProductionData(productionFile);
//PartNum下拉框获取唯一的零部件编号
if (productionData.Count == 0)
{
partNum.DataSource = null;
return;
}
var listDown = (from item in productionData
where !string.IsNullOrWhiteSpace(item.)
select item.).Distinct().ToList();
listDown.Insert(0, "全部");
partNum.DataSource = listDown;
}
private void button1_Click(object sender, EventArgs e)
{
CalcProductionQty();
}
private void CalcProductionQty()
{
string text = System.Windows.Forms.Application.StartupPath + @"\" + ProductionFolderPath;
if (!Directory.Exists(text) && text.Length > 0)
{
Directory.CreateDirectory(text);
}
string productionFile = text + @"\" + dateTimePicker1.Value.ToString("yyMMdd") + ".csv";
List<> productionData = ReadProductionData(productionFile);
List<Hours> hoursList = new List<Hours>();
for (int i = 0; i < shiftTime.Count; i++)
{
var item = shiftTime[i];
DateTime shiftStartTime = item.;
while (shiftStartTime < item.)
{
DateTime nextShiftStartTime = item.;
// Check if there is a next shift
if (i + 1 < shiftTime.Count)
{
nextShiftStartTime = shiftTime[i + 1].;
}
DateTime endTime = shiftStartTime.AddHours(1);
// Adjust the end time if it overlaps with the next shift
if (endTime > nextShiftStartTime)
{
endTime = nextShiftStartTime;
}
Hours hours1 = new Hours()
{
= shiftStartTime,
= endTime,
= item.,
};
hoursList.Add(hours1);
shiftStartTime = endTime;
}
}
List<> shift = new List<>();
string partFilter = partNum.Text == "全部" ? "" : partNum.Text;
foreach (var item in hoursList)
{
var info = productionData
.Where(pd => pd. >= item. && pd. < item.
&& (partFilter == "" || pd. == partFilter));
production = new ()
{
= item.,
= info.Any() ? info.FirstOrDefault(). : "",
= info.Any() ? info.FirstOrDefault(). : "",
= item.,
= info.Any() ? info.Where(pd => pd. >= item. && pd. < item.).Count() : 0,
= info.Any() ? info.Where(pd => pd. >= item. && pd. < item. && pd. == 1).Count() : 0,
= info.Any() ? info.Where(pd => pd. >= item. && pd. < item. && pd. == 2).Count() : 0,
};
shift.Add(production);
};
dataGridView1.DataSource = shift;
//统计按班别的总产量,总合格,总不合格
var shiftSum = (from item in shift
group item by item. into g
select new
{
= g.Key,
= g.Sum(x => x.),
= g.Sum(x => x.),//合格=1则直接对1求和
= g.Sum(x => x.)//不合格=2则对2-1求和
}).ToList();
var shiftASum = shiftSum.FirstOrDefault(x => x. == "A");
var shiftBSum = shiftSum.FirstOrDefault(x => x. == "B");
var shiftCSum = shiftSum.FirstOrDefault(x => x. == "C");
totalA.Text = shiftASum..ToString();
totalB.Text = shiftBSum..ToString();
totalC.Text = shiftCSum..ToString();
OK_A.Text = shiftASum..ToString();
OK_B.Text = shiftBSum..ToString();
OK_C.Text = shiftCSum..ToString();
NG_A.Text = shiftASum..ToString();
NG_B.Text = shiftBSum..ToString();
NG_C.Text = shiftCSum..ToString();
}
public bool IsWithinShiftTime(int hour, double startTime, double endTime)
{
if (startTime < endTime)
{
// 普通时间段
return hour >= startTime && hour < endTime;
}
else
{
// 跨越午夜的时间段
return hour >= startTime || hour < endTime;
}
}
private List<> ReadProductionData(string filePath)
{
var productionData = new List<>();
if (!File.Exists(filePath))
{
return productionData;
}
int N = 1;
foreach (var line in File.ReadAllLines(filePath, Encoding.GetEncoding("GB2312")))
{
try
{
if (N == 1)
{
N++;
continue;
}
var parts = line.Split(',');
var time = DateTime.ParseExact(parts[0].Trim(), "yyyy/MM/dd HH:mm:ss", CultureInfo.InvariantCulture);
productionData.Add(new
{
= time,
= parts[1],
= parts[2],
= int.Parse(parts[3])
}
);
}
catch (Exception ex)
{
//throw;
}
N++;
}
return productionData;
}
public class
{
public string { get; set; }
public DateTime { get; set; }
public DateTime { get; set; }
}
public class Hours
{
public string { get; set; }
public DateTime { get; set; }
public DateTime { get; set; }
}
public class
{
public DateTime { get; set; }
public string { get; set; }
public string { get; set; }
public string { get; set; }
public int { get; set; }
public int { get; set; }
public int { get; set; }
public int SortOrder { get; set; } // 新增排序字段
}
public class
{
public DateTime { get; set; }
public string { get; set; }
public string { get; set; }
public int { get; set; }
}
static string ConvertTimeToFormattedString(string timeString)
{
if (string.IsNullOrWhiteSpace(timeString) || timeString.Length != 4)
{
throw new ArgumentException("Invalid time format. Please use 'HHmm' format.");
}
// 提取小时和分钟
int hour = int.Parse(timeString.Substring(0, 2));
int minute = int.Parse(timeString.Substring(2, 2));
// 创建TimeSpan对象
TimeSpan timeSpan = new TimeSpan(hour, minute, 0);
// 将TimeSpan转换为字符串
return timeSpan.ToString("hh\\:mm\\:ss");
}
public class CalcStartEndTime
{
public DateTime StartTime { get; set; }
public DateTime EndTime { get; set; }
}
private CalcStartEndTime GetDateTime(string startTimeChar, string endTimeChar, DateTime queryDateTime)
{
CalcStartEndTime calcStartEndTime = new CalcStartEndTime();
int startTime = int.Parse(startTimeChar.Substring(0, 2));
int endTime = int.Parse(endTimeChar.Substring(0, 2));
DateTime startDateTime;
DateTime endDateTime;
// Determine the start and end dates
if (startTime > endTime)
{
startDateTime = queryDateTime;
endDateTime = queryDateTime.AddDays(1);
}
else
{
if (startTime < 9 && endTime < 9)
{
startDateTime = queryDateTime.AddDays(1);
endDateTime = queryDateTime.AddDays(1);
}
else
{
startDateTime = queryDateTime;
endDateTime = queryDateTime;
}
}
// Parse the exact times
calcStartEndTime.StartTime = DateTime.ParseExact(startDateTime.ToString("yyyy-MM-dd ") + ConvertTimeToFormattedString(startTimeChar), "yyyy-MM-dd HH:mm:ss", null);
calcStartEndTime.EndTime = DateTime.ParseExact(endDateTime.ToString("yyyy-MM-dd ") + ConvertTimeToFormattedString(endTimeChar), "yyyy-MM-dd HH:mm:ss", null);
return calcStartEndTime;
}
private void SetShiftTime()
{
ReadShiftTime();
var shiftATime = GetDateTime(shiftTimePLC[0], shiftTimePLC[1], dateTimePicker1.Value);
var shiftBTime = GetDateTime(shiftTimePLC[2], shiftTimePLC[3], dateTimePicker1.Value);
var shiftCTime = GetDateTime(shiftTimePLC[4], shiftTimePLC[5], dateTimePicker1.Value);
shiftTime = new List<>()
{
new { ="A", = shiftATime.StartTime, = shiftATime.EndTime },
new { ="B", = shiftBTime.StartTime, = shiftBTime.EndTime },
new { ="C", = shiftCTime.StartTime, = shiftCTime.EndTime }
};
}
private List<string> shiftTimePLC = new List<string>();
private void ReadShiftTime()
{
if (!PClass.SystemRun)
{
return;
}
shiftTimePLC.Clear();
List<string> shiftTimeDuration = new List<string>()
{
PCHMI.VL.GET_SIEMENS_STRING(PLCId, ShiftAStartAddress,4),
PCHMI.VL.GET_SIEMENS_STRING(PLCId, ShiftAEndAddress,4),
PCHMI.VL.GET_SIEMENS_STRING(PLCId, ShiftBStartAddress, 4),
PCHMI.VL.GET_SIEMENS_STRING(PLCId, ShiftBEndAddress, 4),
PCHMI.VL.GET_SIEMENS_STRING(PLCId, ShiftCStartAddress, 4),
PCHMI.VL.GET_SIEMENS_STRING(PLCId, ShiftCEndAddress, 4),
};
foreach (var item in shiftTimeDuration)
{
if (!string.IsNullOrEmpty(item))
{
shiftTimePLC.Add(item);
}
}
if (shiftTimePLC.Count != 6)
{
shiftTimePLC.Clear();
shiftTimePLC.Add("0830");
shiftTimePLC.Add("1630");
shiftTimePLC.Add("1700");
shiftTimePLC.Add("0130");
shiftTimePLC.Add("0130");
shiftTimePLC.Add("0830");
}
}
/// <summary>
/// 根据当前时间,获取存储的文件名
/// </summary>
private string GetFileName()
{
var dateTime = DateTime.Now;
var shiftATime = GetDateTime(shiftTimePLC[0], shiftTimePLC[1], dateTime.AddDays(-1));
var shiftBTime = GetDateTime(shiftTimePLC[2], shiftTimePLC[3], dateTime.AddDays(-1));
var shiftCTime = GetDateTime(shiftTimePLC[4], shiftTimePLC[5], dateTime.AddDays(-1));
List<> shiftTimeLastDay = new List<>()
{
new { ="A", = shiftATime.StartTime, = shiftATime.EndTime },
new { ="B", = shiftBTime.StartTime, = shiftBTime.EndTime },
new { ="C", = shiftCTime.StartTime, = shiftCTime.EndTime }
};
var shiftDuration = shiftTimeLastDay.Where(item => item. <= dateTime && dateTime < item.);
if (shiftDuration.Any())
{
return shiftTimeLastDay[0]..ToString("yyMMdd");
}
return dateTime.ToString("yyMMdd");
}
private List<> shiftTime;
private async void ProductionDisplay_Load(object sender, EventArgs e)
{
if (!PClass.SystemRun)
{
return;
}
PCHMI.VL.GET_SIEMENS_STRING(PLCId, ShiftAStartAddress, 4);
PCHMI.VL.GET_SIEMENS_STRING(PLCId, ShiftAEndAddress, 4);
PCHMI.VL.GET_SIEMENS_STRING(PLCId, ShiftBStartAddress, 4);
PCHMI.VL.GET_SIEMENS_STRING(PLCId, ShiftBEndAddress, 4);
PCHMI.VL.GET_SIEMENS_STRING(PLCId, ShiftCStartAddress, 4);
PCHMI.VL.GET_SIEMENS_STRING(PLCId, ShiftCEndAddress, 4);
PCHMI.RT.GET_INT16s(PLCId, UpCmdAddr, 6);
PCHMI.RT.GET_SIEMENS_STRING(PLCId, UpOrderAddr, 30);
PCHMI.RT.GET_SIEMENS_STRING(PLCId, UpPartNumAddr, 50);
await Task.Delay(300);
SetShiftTime();
dataGridView1.AutoGenerateColumns = false;
SetCombox();
ReadShiftTime();
this.timer1.Enabled = true;
}
private void dateTimePicker1_ValueChanged(object sender, EventArgs e)
{
SetShiftTime();
}
private short retCountSave;
private void timer1_Tick(object sender, EventArgs e)
{
if (PClass.IsPlcLink(PLCId) && !string.IsNullOrEmpty(UpCmdAddr))
{
var ar = PCHMI.RT.GET_INT16s(PLCId, UpCmdAddr, 6);
var order = PCHMI.RT.GET_SIEMENS_STRING(PLCId, UpOrderAddr, 30);
var partNum = PCHMI.RT.GET_SIEMENS_STRING(PLCId, UpPartNumAddr, 50);
if (ar[0] == 1 && retCountSave != ar[1])
{
//PLC触发产量上传
string fileName = GetFileName();
string stName = string.Empty;
if (string.IsNullOrEmpty(StationName))
{
stName = this.Name;
}
else
{
stName = StationName;
}
SaveData(stName, fileName, order, partNum, ar[5]);
PCHMI.RT.SEND_INT16(PLCId, RetCmdAddr, 1);
PCHMI.RT.SEND_INT16(PLCId, RetCountAddr, ar[1]);
retCountSave = ar[1];
}
}
}
public void SaveData(string stationName, string fileName, string order, string partNum, short isPass)
{
if (PClass.SystemRun)
{
string text = System.Windows.Forms.Application.StartupPath + @"\" + ProductionFolderPath;
if (!Directory.Exists(text) && text.Length > 0)
{
Directory.CreateDirectory(text);
}
string productionFile = text + @"\" + fileName + ".csv";
if (!File.Exists(productionFile))
{
CsvHelper.CreateCsv(productionFile, new string[]
{
"时间",
"工单",
"零部件",
"合格否"
});
}
CsvHelper.WriteLine(productionFile, new List<string>() { DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss"), order, partNum, isPass.ToString() });
}
}
private void btnTimeEdit_Click(object sender, EventArgs e)
{
List<string> strings = new List<string>() { ShiftAStartAddress, ShiftAEndAddress, ShiftBStartAddress, ShiftBEndAddress, ShiftCStartAddress, ShiftCEndAddress };
DlgProductionTimeEdit dlg = new DlgProductionTimeEdit(PLCId, strings);
var result = dlg.ShowDialog();
if (result == DialogResult.OK)
{
SetShiftTime();
ReadShiftTime();
}
}
private void partNum_MouseDown(object sender, MouseEventArgs e)
{
SetCombox();
}
}
}

View File

@@ -0,0 +1,459 @@
namespace CowainHmi
{
partial class ProductionDisplay
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
this.label1 = new System.Windows.Forms.Label();
this.dateTimePicker1 = new System.Windows.Forms.DateTimePicker();
this.label2 = new System.Windows.Forms.Label();
this.partNum = new System.Windows.Forms.ComboBox();
this.button1 = new System.Windows.Forms.Button();
this.label3 = new System.Windows.Forms.Label();
this.totalA = new System.Windows.Forms.TextBox();
this.OK_A = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.NG_A = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.NG_B = new System.Windows.Forms.TextBox();
this.label6 = new System.Windows.Forms.Label();
this.OK_B = new System.Windows.Forms.TextBox();
this.label7 = new System.Windows.Forms.Label();
this.totalB = new System.Windows.Forms.TextBox();
this.label8 = new System.Windows.Forms.Label();
this.NG_C = new System.Windows.Forms.TextBox();
this.label9 = new System.Windows.Forms.Label();
this.OK_C = new System.Windows.Forms.TextBox();
this.label10 = new System.Windows.Forms.Label();
this.totalC = new System.Windows.Forms.TextBox();
this.label11 = new System.Windows.Forms.Label();
this.dataGridView1 = new System.Windows.Forms.DataGridView();
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.btnTimeEdit = new System.Windows.Forms.Button();
this. = new System.Windows.Forms.DataGridViewTextBoxColumn();
this. = new System.Windows.Forms.DataGridViewTextBoxColumn();
this. = new System.Windows.Forms.DataGridViewTextBoxColumn();
this. = new System.Windows.Forms.DataGridViewTextBoxColumn();
this. = new System.Windows.Forms.DataGridViewTextBoxColumn();
this. = new System.Windows.Forms.DataGridViewTextBoxColumn();
this. = new System.Windows.Forms.DataGridViewTextBoxColumn();
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
this.SuspendLayout();
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(22, 26);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(41, 12);
this.label1.TabIndex = 1;
this.label1.Text = "日期:";
//
// dateTimePicker1
//
this.dateTimePicker1.Location = new System.Drawing.Point(69, 22);
this.dateTimePicker1.Name = "dateTimePicker1";
this.dateTimePicker1.Size = new System.Drawing.Size(132, 21);
this.dateTimePicker1.TabIndex = 2;
this.dateTimePicker1.ValueChanged += new System.EventHandler(this.dateTimePicker1_ValueChanged);
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(10, 55);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(53, 12);
this.label2.TabIndex = 3;
this.label2.Text = "零部件:";
//
// partNum
//
this.partNum.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.partNum.FormattingEnabled = true;
this.partNum.Location = new System.Drawing.Point(69, 51);
this.partNum.Name = "partNum";
this.partNum.Size = new System.Drawing.Size(132, 20);
this.partNum.TabIndex = 4;
this.partNum.MouseDown += new System.Windows.Forms.MouseEventHandler(this.partNum_MouseDown);
//
// button1
//
this.button1.Location = new System.Drawing.Point(215, 34);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(89, 25);
this.button1.TabIndex = 5;
this.button1.Text = "查询";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// label3
//
this.label3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(483, 15);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(59, 12);
this.label3.TabIndex = 6;
this.label3.Text = "A班总数";
//
// totalA
//
this.totalA.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.totalA.Location = new System.Drawing.Point(548, 12);
this.totalA.Name = "totalA";
this.totalA.ReadOnly = true;
this.totalA.Size = new System.Drawing.Size(66, 21);
this.totalA.TabIndex = 7;
this.totalA.Text = "0";
//
// OK_A
//
this.OK_A.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.OK_A.Location = new System.Drawing.Point(699, 12);
this.OK_A.Name = "OK_A";
this.OK_A.ReadOnly = true;
this.OK_A.Size = new System.Drawing.Size(66, 21);
this.OK_A.TabIndex = 9;
this.OK_A.Text = "0";
//
// label4
//
this.label4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(635, 15);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(59, 12);
this.label4.TabIndex = 8;
this.label4.Text = "A班合格";
//
// NG_A
//
this.NG_A.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.NG_A.Location = new System.Drawing.Point(855, 14);
this.NG_A.Name = "NG_A";
this.NG_A.ReadOnly = true;
this.NG_A.Size = new System.Drawing.Size(66, 21);
this.NG_A.TabIndex = 11;
this.NG_A.Text = "0";
//
// label5
//
this.label5.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(783, 17);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(71, 12);
this.label5.TabIndex = 10;
this.label5.Text = "A班不合格";
//
// NG_B
//
this.NG_B.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.NG_B.Location = new System.Drawing.Point(855, 41);
this.NG_B.Name = "NG_B";
this.NG_B.ReadOnly = true;
this.NG_B.Size = new System.Drawing.Size(66, 21);
this.NG_B.TabIndex = 17;
this.NG_B.Text = "0";
//
// label6
//
this.label6.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(783, 44);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(71, 12);
this.label6.TabIndex = 16;
this.label6.Text = "B班不合格";
//
// OK_B
//
this.OK_B.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.OK_B.Location = new System.Drawing.Point(699, 39);
this.OK_B.Name = "OK_B";
this.OK_B.ReadOnly = true;
this.OK_B.Size = new System.Drawing.Size(66, 21);
this.OK_B.TabIndex = 15;
this.OK_B.Text = "0";
//
// label7
//
this.label7.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(635, 42);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(59, 12);
this.label7.TabIndex = 14;
this.label7.Text = "B班合格";
//
// totalB
//
this.totalB.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.totalB.Location = new System.Drawing.Point(548, 39);
this.totalB.Name = "totalB";
this.totalB.ReadOnly = true;
this.totalB.Size = new System.Drawing.Size(66, 21);
this.totalB.TabIndex = 13;
this.totalB.Text = "0";
//
// label8
//
this.label8.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(483, 42);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(59, 12);
this.label8.TabIndex = 12;
this.label8.Text = "B班总数";
//
// NG_C
//
this.NG_C.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.NG_C.Location = new System.Drawing.Point(855, 68);
this.NG_C.Name = "NG_C";
this.NG_C.ReadOnly = true;
this.NG_C.Size = new System.Drawing.Size(66, 21);
this.NG_C.TabIndex = 23;
this.NG_C.Text = "0";
//
// label9
//
this.label9.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(783, 71);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(71, 12);
this.label9.TabIndex = 22;
this.label9.Text = "C班不合格";
//
// OK_C
//
this.OK_C.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.OK_C.Location = new System.Drawing.Point(699, 66);
this.OK_C.Name = "OK_C";
this.OK_C.ReadOnly = true;
this.OK_C.Size = new System.Drawing.Size(66, 21);
this.OK_C.TabIndex = 21;
this.OK_C.Text = "0";
//
// label10
//
this.label10.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(635, 69);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(59, 12);
this.label10.TabIndex = 20;
this.label10.Text = "C班合格";
//
// totalC
//
this.totalC.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.totalC.Location = new System.Drawing.Point(548, 66);
this.totalC.Name = "totalC";
this.totalC.ReadOnly = true;
this.totalC.Size = new System.Drawing.Size(66, 21);
this.totalC.TabIndex = 19;
this.totalC.Text = "0";
//
// label11
//
this.label11.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.label11.AutoSize = true;
this.label11.Location = new System.Drawing.Point(483, 69);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(59, 12);
this.label11.TabIndex = 18;
this.label11.Text = "C班总数";
//
// dataGridView1
//
this.dataGridView1.AllowUserToAddRows = false;
this.dataGridView1.AllowUserToDeleteRows = false;
this.dataGridView1.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.dataGridView1.BackgroundColor = System.Drawing.Color.White;
this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.,
this.,
this.,
this.,
this.,
this.,
this.});
this.dataGridView1.Location = new System.Drawing.Point(12, 98);
this.dataGridView1.Name = "dataGridView1";
this.dataGridView1.ReadOnly = true;
this.dataGridView1.Size = new System.Drawing.Size(909, 487);
this.dataGridView1.TabIndex = 24;
//
// timer1
//
this.timer1.Interval = 200;
this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
//
// btnTimeEdit
//
this.btnTimeEdit.Location = new System.Drawing.Point(320, 34);
this.btnTimeEdit.Name = "btnTimeEdit";
this.btnTimeEdit.Size = new System.Drawing.Size(89, 25);
this.btnTimeEdit.TabIndex = 25;
this.btnTimeEdit.Text = "班次修改";
this.btnTimeEdit.UseVisualStyleBackColor = true;
this.btnTimeEdit.Click += new System.EventHandler(this.btnTimeEdit_Click);
//
// 时间
//
this..DataPropertyName = "时间";
dataGridViewCellStyle2.Format = "t";
dataGridViewCellStyle2.NullValue = null;
this..DefaultCellStyle = dataGridViewCellStyle2;
this..HeaderText = "时间";
this..Name = "时间";
this..ReadOnly = true;
//
// 工单
//
this..DataPropertyName = "工单";
this..HeaderText = "工单";
this..Name = "工单";
this..ReadOnly = true;
//
// 零部件
//
this..AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this..DataPropertyName = "零部件";
this..HeaderText = "零部件";
this..Name = "零部件";
this..ReadOnly = true;
//
// 班别
//
this..DataPropertyName = "班别";
this..HeaderText = "班别";
this..Name = "班别";
this..ReadOnly = true;
//
// 产量
//
this..DataPropertyName = "产量";
this..HeaderText = "产量";
this..Name = "产量";
this..ReadOnly = true;
//
// 合格
//
this..DataPropertyName = "合格";
this..HeaderText = "合格";
this..Name = "合格";
this..ReadOnly = true;
//
// 不合格
//
this..DataPropertyName = "不合格";
this..HeaderText = "不合格";
this..Name = "不合格";
this..ReadOnly = true;
//
// ProductionDisplay
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.btnTimeEdit);
this.Controls.Add(this.dataGridView1);
this.Controls.Add(this.NG_C);
this.Controls.Add(this.label9);
this.Controls.Add(this.OK_C);
this.Controls.Add(this.label10);
this.Controls.Add(this.totalC);
this.Controls.Add(this.label11);
this.Controls.Add(this.NG_B);
this.Controls.Add(this.label6);
this.Controls.Add(this.OK_B);
this.Controls.Add(this.label7);
this.Controls.Add(this.totalB);
this.Controls.Add(this.label8);
this.Controls.Add(this.NG_A);
this.Controls.Add(this.label5);
this.Controls.Add(this.OK_A);
this.Controls.Add(this.label4);
this.Controls.Add(this.totalA);
this.Controls.Add(this.label3);
this.Controls.Add(this.button1);
this.Controls.Add(this.partNum);
this.Controls.Add(this.label2);
this.Controls.Add(this.dateTimePicker1);
this.Controls.Add(this.label1);
this.Name = "ProductionDisplay";
this.Size = new System.Drawing.Size(933, 599);
this.Load += new System.EventHandler(this.ProductionDisplay_Load);
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label label1;
private System.Windows.Forms.DateTimePicker dateTimePicker1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.ComboBox partNum;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox totalA;
private System.Windows.Forms.TextBox OK_A;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.TextBox NG_A;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.TextBox NG_B;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.TextBox OK_B;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.TextBox totalB;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.TextBox NG_C;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.TextBox OK_C;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.TextBox totalC;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.DataGridView dataGridView1;
private System.Windows.Forms.Timer timer1;
private System.Windows.Forms.Button btnTimeEdit;
private System.Windows.Forms.DataGridViewTextBoxColumn ;
private System.Windows.Forms.DataGridViewTextBoxColumn ;
private System.Windows.Forms.DataGridViewTextBoxColumn ;
private System.Windows.Forms.DataGridViewTextBoxColumn ;
private System.Windows.Forms.DataGridViewTextBoxColumn ;
private System.Windows.Forms.DataGridViewTextBoxColumn ;
private System.Windows.Forms.DataGridViewTextBoxColumn ;
}
}

View File

@@ -0,0 +1,165 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="时间.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="工单.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="零部件.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="班别.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="产量.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="合格.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="不合格.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="时间.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="工单.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="零部件.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="班别.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="产量.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="合格.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="不合格.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>