From 3aebbfb4160120b2fa142abcafc68bb32d915d56 Mon Sep 17 00:00:00 2001 From: Tyrone CT Date: Wed, 22 Apr 2026 14:35:43 +0800 Subject: [PATCH] =?UTF-8?q?1.SCR=E7=BB=84=E7=AB=8B=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E5=99=A8G=E5=9E=8B=E5=8A=A8=E9=9D=99=E7=9B=98=E7=BB=84?= =?UTF-8?q?=E8=A3=85=E5=B2=97=E4=BD=8D=EF=BC=8C=E4=B8=80=E4=BD=93=E6=9C=BA?= =?UTF-8?q?=E4=B8=8A=E8=A6=81=E5=A2=9E=E5=8A=A0=E4=B8=80=E4=B8=AA=E6=8C=89?= =?UTF-8?q?=E9=94=AE=EF=BC=8C=E5=90=8D=E5=AD=97=E5=8F=AB=E5=8A=A8=E7=9B=98?= =?UTF-8?q?=E4=B8=8E=E6=94=AF=E6=9E=B6=E7=AD=89=E7=BA=A7=E5=8C=B9=E9=85=8D?= =?UTF-8?q?ok=EF=BC=8C=E8=BF=99=E4=B8=AA=E8=A6=81=E5=85=B3=E8=81=94?= =?UTF-8?q?=E5=88=B0=E6=9C=BA=E7=A7=8D=E7=99=BB=E5=BD=95=E9=87=8C=E9=9D=A2?= =?UTF-8?q?=EF=BC=8C=E7=9B=AE=E5=89=8D=E5=8F=AA=E6=9C=89=E4=B8=80=E4=B8=AA?= =?UTF-8?q?=E6=9C=BA=E7=A7=8D=E4=BC=9A=E8=A6=81=E8=BF=99=E4=B8=AA=E6=8C=89?= =?UTF-8?q?=E9=94=AE=EF=BC=8C=E6=AF=8F=E4=B8=AA=E5=B7=A5=E4=BB=B6=E9=83=BD?= =?UTF-8?q?=E8=A6=81=E7=82=B9=E8=BF=99=E4=B8=AA=E6=8C=89=E9=94=AE=EF=BC=8C?= =?UTF-8?q?=E9=9C=80=E8=A6=81=E5=85=B3=E8=81=94=E5=88=B0=E7=BB=99=E6=88=91?= =?UTF-8?q?PLC=E7=9A=84=E6=94=BE=E8=A1=8C=E4=BF=A1=E5=8F=B7=E9=87=8C?= =?UTF-8?q?=E9=9D=A2=202.SCR=E7=BB=84=E7=AB=8B=E6=9C=8D=E5=8A=A1=E5=99=A8G?= =?UTF-8?q?=E5=9E=8B=E7=AD=92=E4=BD=93=E7=83=A7=E5=B5=8C=E5=B2=97=E4=BD=8D?= =?UTF-8?q?=EF=BC=8C=E9=9C=80=E8=A6=81=E5=A2=9E=E5=8A=A0=E4=B8=80=E4=B8=AA?= =?UTF-8?q?=E6=B2=BB=E5=85=B7=E5=8F=B7=EF=BC=8C13=E4=BD=8D=E5=AD=97?= =?UTF-8?q?=E7=AC=A6=E4=B8=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- EleBox.App/Main.Designer.cs | 17 ++++++ EleBox.App/Main.cs | 35 ++++++++++++ EleBox.App/Main.resx | 2 +- EleBox.App/Model/DynStatDiskModel.cs | 6 +++ EleBox.App/frmMachineModelConfig.Designer.cs | 57 ++++++++++++++------ EleBox.App/frmMachineModelConfig.cs | 48 +++++++++++++---- EleBox.App/frmMachineModelConfig.resx | 2 +- 7 files changed, 140 insertions(+), 27 deletions(-) diff --git a/EleBox.App/Main.Designer.cs b/EleBox.App/Main.Designer.cs index d663f83..016da65 100644 --- a/EleBox.App/Main.Designer.cs +++ b/EleBox.App/Main.Designer.cs @@ -148,6 +148,7 @@ this.cbxDefaultOK = new System.Windows.Forms.CheckBox(); this.label15 = new System.Windows.Forms.Label(); this.MeterSeria = new System.IO.Ports.SerialPort(this.components); + this.btnDyDiskBrackMatch = new System.Windows.Forms.Button(); this.statusStrip1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); this.splitContainer1.Panel1.SuspendLayout(); @@ -459,6 +460,7 @@ // // groupBox4 // + this.groupBox4.Controls.Add(this.btnDyDiskBrackMatch); this.groupBox4.Controls.Add(this.PanelOther); this.groupBox4.Controls.Add(this.lblCylinderNoAlarmMsg); this.groupBox4.Controls.Add(this.lblTongZhiGui); @@ -1555,6 +1557,20 @@ // this.MeterSeria.DataReceived += new System.IO.Ports.SerialDataReceivedEventHandler(this.MeterSeria_DataReceived); // + // btnDyDiskBrackMatch + // + this.btnDyDiskBrackMatch.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(64)))), ((int)(((byte)(0))))); + this.btnDyDiskBrackMatch.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnDyDiskBrackMatch.ForeColor = System.Drawing.Color.White; + this.btnDyDiskBrackMatch.Location = new System.Drawing.Point(396, 337); + this.btnDyDiskBrackMatch.Name = "btnDyDiskBrackMatch"; + this.btnDyDiskBrackMatch.Size = new System.Drawing.Size(128, 63); + this.btnDyDiskBrackMatch.TabIndex = 45; + this.btnDyDiskBrackMatch.Text = "动盘与支架\r\n等级匹配OK"; + this.btnDyDiskBrackMatch.UseVisualStyleBackColor = false; + this.btnDyDiskBrackMatch.Visible = false; + this.btnDyDiskBrackMatch.Click += new System.EventHandler(this.btnDyDiskBrackMatch_Click); + // // Main // this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F); @@ -1738,5 +1754,6 @@ private System.Windows.Forms.Label lblCylinderNoAlarmMsg; private System.Windows.Forms.Panel PanelOther; private System.Windows.Forms.Label lblMeterDataState; + private System.Windows.Forms.Button btnDyDiskBrackMatch; } } \ No newline at end of file diff --git a/EleBox.App/Main.cs b/EleBox.App/Main.cs index 37dad2d..c0caa94 100644 --- a/EleBox.App/Main.cs +++ b/EleBox.App/Main.cs @@ -726,6 +726,12 @@ namespace DynStatDisk.App lblCylinderNoAlarmMsg.Visible = false; + // 托盘流走后,隐藏动静盘支架匹配按钮 + if (LocationInfo == MachineLocation.G) + { + btnDyDiskBrackMatch.Visible = false; + } + //间隙数据删除 txtOtherGapGroup.Text = ""; txtOtherGapValue.Text = ""; @@ -2063,6 +2069,25 @@ namespace DynStatDisk.App })); } + // 只在 MachineLocation.G 时生效 + if (LocationInfo == MachineLocation.G) + { + if (Data.FirstOrDefault().DyDiskBrackMatch == "检测") + { + BeginInvoke(new Action(() => + { + btnDyDiskBrackMatch.Visible = true; + })); + } + else + { + BeginInvoke(new Action(() => + { + btnDyDiskBrackMatch.Visible = false; + })); + } + } + txtEuroSeriesNo.Focus(); } else @@ -2625,5 +2650,15 @@ namespace DynStatDisk.App { txtExhCoveBatch.BackColor = SystemColors.Window; } + + /// + /// 动盘与支架等级匹配ok + /// + /// + /// + private void btnDyDiskBrackMatch_Click(object sender, EventArgs e) + { + + } } } diff --git a/EleBox.App/Main.resx b/EleBox.App/Main.resx index de701da..db29104 100644 --- a/EleBox.App/Main.resx +++ b/EleBox.App/Main.resx @@ -128,7 +128,7 @@ AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAACm - BwAAAk1TRnQBSQFMAwEBAAFQAQABUAEAARABAAEQAQAE/wEJAQAI/wFCAU0BNgEEBgABNgEEAgABKAMA + BwAAAk1TRnQBSQFMAwEBAAFYAQABWAEAARABAAEQAQAE/wEJAQAI/wFCAU0BNgEEBgABNgEEAgABKAMA AUADAAEQAwABAQEAAQgGAAEEGAABgAIAAYADAAKAAQABgAMAAYABAAGAAQACgAIAA8ABAAHAAdwBwAEA AfABygGmAQABMwUAATMBAAEzAQABMwEAAjMCAAMWAQADHAEAAyIBAAMpAQADVQEAA00BAANCAQADOQEA AYABfAH/AQACUAH/AQABkwEAAdYBAAH/AewBzAEAAcYB1gHvAQAB1gLnAQABkAGpAa0CAAH/ATMDAAFm diff --git a/EleBox.App/Model/DynStatDiskModel.cs b/EleBox.App/Model/DynStatDiskModel.cs index 5eadbfc..c72b304 100644 --- a/EleBox.App/Model/DynStatDiskModel.cs +++ b/EleBox.App/Model/DynStatDiskModel.cs @@ -38,6 +38,12 @@ namespace DynStatDisk.App.Model [Column(Name = "DynStatDiskKeyMatch", IsNullable = true, StringLength = 10)] public string DynStatDiskKeyMatch { get; set; } + /// + /// 动静盘支架匹配 + /// + [Column(Name = "DyDiskBrackMatch", IsNullable = false, StringLength = 10)] + public string DyDiskBrackMatch { get; set; } + ///// ///// 电器盒盖 ///// diff --git a/EleBox.App/frmMachineModelConfig.Designer.cs b/EleBox.App/frmMachineModelConfig.Designer.cs index 0132658..bae6c89 100644 --- a/EleBox.App/frmMachineModelConfig.Designer.cs +++ b/EleBox.App/frmMachineModelConfig.Designer.cs @@ -36,14 +36,16 @@ this.btnAdd = new System.Windows.Forms.Button(); this.btnEdit = new System.Windows.Forms.Button(); this.panel3 = new System.Windows.Forms.Panel(); + this.label1 = new System.Windows.Forms.Label(); + this.txtDynStatDiskKeyMatch = new System.Windows.Forms.TextBox(); this.cbxGapTest = new System.Windows.Forms.ComboBox(); this.label2 = new System.Windows.Forms.Label(); this.txtModelNo = new System.Windows.Forms.TextBox(); this.label5 = new System.Windows.Forms.Label(); this.listView1 = new System.Windows.Forms.ListView(); this.imageList1 = new System.Windows.Forms.ImageList(this.components); - this.txtDynStatDiskKeyMatch = new System.Windows.Forms.TextBox(); - this.label1 = new System.Windows.Forms.Label(); + this.label3 = new System.Windows.Forms.Label(); + this.cbxDyDiskBrackMatch = new System.Windows.Forms.ComboBox(); this.groupBox1.SuspendLayout(); this.panel3.SuspendLayout(); this.SuspendLayout(); @@ -110,6 +112,8 @@ // panel3 // this.panel3.BackColor = System.Drawing.SystemColors.ControlLight; + this.panel3.Controls.Add(this.cbxDyDiskBrackMatch); + this.panel3.Controls.Add(this.label3); this.panel3.Controls.Add(this.label1); this.panel3.Controls.Add(this.txtDynStatDiskKeyMatch); this.panel3.Controls.Add(this.cbxGapTest); @@ -121,6 +125,24 @@ this.panel3.Size = new System.Drawing.Size(975, 74); this.panel3.TabIndex = 26; // + // label1 + // + this.label1.AutoSize = true; + this.label1.Font = new System.Drawing.Font("微软雅黑", 12F); + this.label1.Location = new System.Drawing.Point(229, 12); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(90, 21); + this.label1.TabIndex = 23; + this.label1.Text = "动静盘符号"; + // + // txtDynStatDiskKeyMatch + // + this.txtDynStatDiskKeyMatch.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.txtDynStatDiskKeyMatch.Location = new System.Drawing.Point(224, 36); + this.txtDynStatDiskKeyMatch.Name = "txtDynStatDiskKeyMatch"; + this.txtDynStatDiskKeyMatch.Size = new System.Drawing.Size(100, 33); + this.txtDynStatDiskKeyMatch.TabIndex = 22; + // // cbxGapTest // this.cbxGapTest.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); @@ -178,23 +200,24 @@ this.imageList1.TransparentColor = System.Drawing.Color.Transparent; this.imageList1.Images.SetKeyName(0, "About.png"); // - // txtDynStatDiskKeyMatch + // label3 // - this.txtDynStatDiskKeyMatch.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.txtDynStatDiskKeyMatch.Location = new System.Drawing.Point(224, 36); - this.txtDynStatDiskKeyMatch.Name = "txtDynStatDiskKeyMatch"; - this.txtDynStatDiskKeyMatch.Size = new System.Drawing.Size(100, 33); - this.txtDynStatDiskKeyMatch.TabIndex = 22; + this.label3.AutoSize = true; + this.label3.Font = new System.Drawing.Font("微软雅黑", 12F); + this.label3.Location = new System.Drawing.Point(331, 12); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(154, 21); + this.label3.TabIndex = 25; + this.label3.Text = "动盘与支架等级匹配"; // - // label1 + // cbxDyDiskBrackMatch // - this.label1.AutoSize = true; - this.label1.Font = new System.Drawing.Font("微软雅黑", 12F); - this.label1.Location = new System.Drawing.Point(229, 12); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(90, 21); - this.label1.TabIndex = 23; - this.label1.Text = "动静盘符号"; + this.cbxDyDiskBrackMatch.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.cbxDyDiskBrackMatch.FormattingEnabled = true; + this.cbxDyDiskBrackMatch.Location = new System.Drawing.Point(327, 36); + this.cbxDyDiskBrackMatch.Name = "cbxDyDiskBrackMatch"; + this.cbxDyDiskBrackMatch.Size = new System.Drawing.Size(160, 33); + this.cbxDyDiskBrackMatch.TabIndex = 26; // // frmMachineModelConfig // @@ -235,5 +258,7 @@ private System.Windows.Forms.ImageList imageList1; private System.Windows.Forms.TextBox txtDynStatDiskKeyMatch; private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.ComboBox cbxDyDiskBrackMatch; } } \ No newline at end of file diff --git a/EleBox.App/frmMachineModelConfig.cs b/EleBox.App/frmMachineModelConfig.cs index 9d205d9..0c1e7f7 100644 --- a/EleBox.App/frmMachineModelConfig.cs +++ b/EleBox.App/frmMachineModelConfig.cs @@ -65,6 +65,7 @@ namespace DynStatDisk.App ColumnHeader h11 = new ColumnHeader(); ColumnHeader h12 = new ColumnHeader(); ColumnHeader h13 = new ColumnHeader(); + ColumnHeader h14 = new ColumnHeader(); h1.TextAlign = HorizontalAlignment.Center; h2.TextAlign = HorizontalAlignment.Center; @@ -79,6 +80,7 @@ namespace DynStatDisk.App h11.TextAlign = HorizontalAlignment.Center; h12.TextAlign = HorizontalAlignment.Center; h13.TextAlign = HorizontalAlignment.Center; + h14.TextAlign = HorizontalAlignment.Center; h0.Width = 20; h1.Width = 100; @@ -94,6 +96,7 @@ namespace DynStatDisk.App h11.Width = 100; h12.Width = 100; h13.Width = 0; + h14.Width = 100; h0.Text = ""; h1.Text = "机种番号"; @@ -110,21 +113,22 @@ namespace DynStatDisk.App h11.Text = "吸油管压入"; h12.Text = "创建时间"; h13.Text = ""; - //h14.Text = ""; + h14.Text = "动静盘支架匹配"; - listView1.Columns.AddRange(new ColumnHeader[] { h0, h1, h2, h3, h4 }); + listView1.Columns.AddRange(new ColumnHeader[] { h0, h1, h2, h3, h4, h14 }); listView1.View = View.Details; } - private void InsertlistView1Result(long guid, string ModelNo, string GapInfo, string DynStatDiskKeyMatch) + private void InsertlistView1Result(long guid, string ModelNo, string GapInfo, string DynStatDiskKeyMatch, string DyDiskBrackMatch) { ListViewItem lvi = new ListViewItem(); lvi.ImageIndex = 0; lvi.Text = ""; lvi.SubItems.Add(ModelNo.ToString()); lvi.SubItems.Add(GapInfo.ToString()); - lvi.SubItems.Add(DynStatDiskKeyMatch!=null ?DynStatDiskKeyMatch.ToString():""); + lvi.SubItems.Add(DynStatDiskKeyMatch != null ? DynStatDiskKeyMatch.ToString() : ""); lvi.SubItems.Add(guid.ToString()); + lvi.SubItems.Add(DyDiskBrackMatch != null ? DyDiskBrackMatch.ToString() : ""); this.listView1.Items.Add(lvi); } @@ -144,7 +148,8 @@ namespace DynStatDisk.App InsertlistView1Result(item.Id, item.ModelNo, item.GapInfo, - item.DynStatDiskKeyMatch + item.DynStatDiskKeyMatch, + item.DyDiskBrackMatch ); } } @@ -169,6 +174,16 @@ namespace DynStatDisk.App this.cbxGapTest.SelectedIndex = -1;//默认显示LHK + this.cbxDyDiskBrackMatch.Items.Clear(); + + this.cbxDyDiskBrackMatch.Items.Add("检测");//赋值 + this.cbxDyDiskBrackMatch.SelectedIndex = 0;//设置下标 + + this.cbxDyDiskBrackMatch.Items.Add("不检测");//赋值 + this.cbxDyDiskBrackMatch.SelectedIndex = 1;//下标 + + this.cbxDyDiskBrackMatch.SelectedIndex = -1; + //this.cbxInsulatPad.Items.Clear(); //this.cbxInsulatPad.Items.Add("A");//赋值 @@ -240,7 +255,19 @@ namespace DynStatDisk.App break; } - txtDynStatDiskKeyMatch.Text= listView1.FocusedItem.SubItems[3].Text; + txtDynStatDiskKeyMatch.Text = listView1.FocusedItem.SubItems[3].Text; + + switch (listView1.FocusedItem.SubItems[5].Text) + { + case "检测": + cbxDyDiskBrackMatch.SelectedIndex = 0; + break; + case "不检测": + cbxDyDiskBrackMatch.SelectedIndex = 1; + break; + default: + break; + } //switch (listView1.FocusedItem.SubItems[3].Text) //{ @@ -298,7 +325,8 @@ namespace DynStatDisk.App { if (!string.IsNullOrEmpty(txtModelNo.Text.Trim()) && //!string.IsNullOrEmpty(txtESOPPath.Text.Trim()) && - !string.IsNullOrEmpty(cbxGapTest.SelectedItem.ToString().Trim()) + !string.IsNullOrEmpty(cbxGapTest.SelectedItem.ToString().Trim()) && + !string.IsNullOrEmpty(cbxDyDiskBrackMatch.SelectedItem.ToString().Trim()) //!string.IsNullOrEmpty(cbxInsulatPad.SelectedItem.ToString().Trim()) && //!string.IsNullOrEmpty(cbxDynStatDiskConver.SelectedItem.ToString().Trim()) ) @@ -308,7 +336,8 @@ namespace DynStatDisk.App { ModelNo = txtModelNo.Text.Trim(), GapInfo = cbxGapTest.SelectedItem.ToString().Trim(), - DynStatDiskKeyMatch= txtDynStatDiskKeyMatch.Text.Trim(), + DynStatDiskKeyMatch = txtDynStatDiskKeyMatch.Text.Trim(), + DyDiskBrackMatch = cbxDyDiskBrackMatch.SelectedItem.ToString().Trim(), //InsulatPad = cbxInsulatPad.SelectedItem.ToString().Trim(), //DynStatDiskConver = cbxDynStatDiskConver.SelectedItem.ToString().Trim(), //ESOPPath = txtESOPPath.Text.ToString().Trim() @@ -331,6 +360,7 @@ namespace DynStatDisk.App .Set(a => a.ModelNo, txtModelNo.Text.Trim()) .Set(a => a.GapInfo, cbxGapTest.SelectedItem.ToString().Trim()) .Set(a => a.DynStatDiskKeyMatch, txtDynStatDiskKeyMatch.Text.Trim()) + .Set(a => a.DyDiskBrackMatch, cbxDyDiskBrackMatch.SelectedItem.ToString().Trim()) //.Set(a => a.DynStatDiskConver, cbxDynStatDiskConver.SelectedItem.ToString().Trim()) //.Set(a => a.ESOPPath, txtESOPPath.Text.ToString().Trim()) .Where(a => a.Id == SelectedId) @@ -357,7 +387,7 @@ namespace DynStatDisk.App private void btnClose_Click(object sender, EventArgs e) { - MachineModelConfigChanged(this,new EventArgs()); + MachineModelConfigChanged(this, new EventArgs()); this.Close(); } diff --git a/EleBox.App/frmMachineModelConfig.resx b/EleBox.App/frmMachineModelConfig.resx index b82d62f..8f95d18 100644 --- a/EleBox.App/frmMachineModelConfig.resx +++ b/EleBox.App/frmMachineModelConfig.resx @@ -125,7 +125,7 @@ AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAACm - BwAAAk1TRnQBSQFMAwEBAAEoAQABKAEAARABAAEQAQAE/wEJAQAI/wFCAU0BNgEEBgABNgEEAgABKAMA + BwAAAk1TRnQBSQFMAwEBAAEwAQABMAEAARABAAEQAQAE/wEJAQAI/wFCAU0BNgEEBgABNgEEAgABKAMA AUADAAEQAwABAQEAAQgGAAEEGAABgAIAAYADAAKAAQABgAMAAYABAAGAAQACgAIAA8ABAAHAAdwBwAEA AfABygGmAQABMwUAATMBAAEzAQABMwEAAjMCAAMWAQADHAEAAyIBAAMpAQADVQEAA00BAANCAQADOQEA AYABfAH/AQACUAH/AQABkwEAAdYBAAH/AewBzAEAAcYB1gHvAQAB1gLnAQABkAGpAa0CAAH/ATMDAAFm