From 1e908cf72fe0610d8d4856c633484df358bb2020 Mon Sep 17 00:00:00 2001 From: XingCheng3 <1773407212@qq.com> Date: Tue, 12 May 2026 16:08:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B0=B4=E5=90=AB=E9=87=8F=E5=8D=95=E4=BD=8D?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=20ppm=20=E5=AE=9E=E6=97=B6=E9=87=8D=E9=87=8F?= =?UTF-8?q?=20=E4=B8=89=E4=BD=8D=E5=B0=8F=E6=95=B0=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SCADA/Pages/UC_Weighing.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/SCADA/Pages/UC_Weighing.cs b/SCADA/Pages/UC_Weighing.cs index 193e8af..05cfe4d 100644 --- a/SCADA/Pages/UC_Weighing.cs +++ b/SCADA/Pages/UC_Weighing.cs @@ -253,7 +253,7 @@ namespace MesWork.Pages ConfigureWeightCard(weightBox, weightTitle, weightValue, weightUnit, topCardWidth, 128, 41F); weightBox.Location = new Point(margin, weightY); - ConfigureMetricCard(station, waterBox, waterTitle, waterValue, waterUnit, "水含量", "%", margin + topCardWidth + gap, weightY, topCardWidth, 128, 28F); + ConfigureMetricCard(station, waterBox, waterTitle, waterValue, waterUnit, "水含量", "ppm", margin + topCardWidth + gap, weightY, topCardWidth, 128, 28F); metricBox.BackColor = Color.White; metricBox.Location = new Point(margin, metricY); @@ -339,7 +339,7 @@ namespace MesWork.Pages valueLabel.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(58)))), ((int)(((byte)(95))))); valueLabel.Location = new System.Drawing.Point(34, 20); valueLabel.Size = new System.Drawing.Size(Math.Max(150, width - 122), height - 40); - valueLabel.Text = "0.00"; + valueLabel.Text = "0.000"; valueLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; if (valueLabel.Parent != panel) panel.Controls.Add(valueLabel); @@ -382,7 +382,7 @@ namespace MesWork.Pages valueLabel.BackColor = panel.BackColor; valueLabel.Font = new System.Drawing.Font("微软雅黑", valueFontSize, System.Drawing.FontStyle.Bold); valueLabel.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(58)))), ((int)(((byte)(95))))); - int unitWidth = unit == "KG/L" ? 66 : 38; + int unitWidth = unit == "KG/L" ? 66 : (unit == "ppm" ? 58 : 38); int valueRightPadding = unitLabel == null ? 16 : unitWidth + 24; valueLabel.Location = new System.Drawing.Point(20, height >= 100 ? 24 : 20); valueLabel.Size = new System.Drawing.Size(Math.Max(72, width - 20 - valueRightPadding), height >= 100 ? height - 40 : height - 24); @@ -597,7 +597,7 @@ namespace MesWork.Pages waterValue.Font = new Font("微软雅黑", 18F, FontStyle.Bold); waterValue.Location = new Point(660, 401); waterValue.Size = new Size(599, 164); - waterValue.Text = "水含量:0.00"; + waterValue.Text = "水含量:0.00 ppm"; waterValue.TextAlign = ContentAlignment.MiddleCenter; waterValue.AutoSize = false; @@ -745,7 +745,7 @@ namespace MesWork.Pages { weight = calibratedWeight; } - string newTxt = Convert.ToDouble(weight).ToString("F2"); + string newTxt = Convert.ToDouble(weight).ToString("F3"); if (lblWeight.Text != newTxt) lblWeight.Text = newTxt; } } @@ -807,9 +807,9 @@ namespace MesWork.Pages { var lbl = station == 1 ? lbl_S1_Weight : lbl_S2_Weight; if (lbl.InvokeRequired) - lbl.Invoke(new Action(() => lbl.Text = weight.ToString("F2"))); + lbl.Invoke(new Action(() => lbl.Text = weight.ToString("F3"))); else - lbl.Text = weight.ToString("F2"); + lbl.Text = weight.ToString("F3"); } public void UpdateStationInfo(int station, string engineNo, string modelNo, string orderNo)