From 294d20e078cf4b8f12d64892870f2e0f84c1cc05 Mon Sep 17 00:00:00 2001 From: "ruoxing.wang" <88384874@qq.com> Date: Tue, 10 Dec 2024 16:12:52 +0800 Subject: [PATCH] =?UTF-8?q?=E5=96=B7=E6=B6=82=E8=8E=B7=E5=8F=96=E9=A2=9C?= =?UTF-8?q?=E8=89=B2,=E5=88=86=E5=89=B2=E4=B8=BA=E8=8B=B1=E6=96=87?= =?UTF-8?q?=E9=80=97=E5=8F=B7=E7=9A=84=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PaintingPC/FrmQuality.cs | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/PaintingPC/FrmQuality.cs b/PaintingPC/FrmQuality.cs index cf21b23..340996a 100644 --- a/PaintingPC/FrmQuality.cs +++ b/PaintingPC/FrmQuality.cs @@ -571,7 +571,20 @@ namespace PaintingPC /// bool CheckColor(ref string colorName,ref string partName) { - string[] ss = labProductInfo.Text.Split(','); + string[] ss = null; + if (string.IsNullOrEmpty(labProductInfo.Text)) + { + MessageBox.Show("颜色信息有误,请重新扫描"); + return false; + } + if (labProductInfo.Text.Contains(",")) + { + ss = labProductInfo.Text.Split(','); + } + else + { + ss = labProductInfo.Text.Split(','); + } if (ss.Length >= 1) { if (string.IsNullOrWhiteSpace(ss[0])) @@ -582,7 +595,7 @@ namespace PaintingPC } else { - MessageBox.Show("条码有误,请重新扫描"); + MessageBox.Show("颜色信息有误1,请重新扫描"); return false; } colorName = ss[0];