From 697cf717fad3e32c8e06fd4e3ff19be9e873392b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=88=91=E5=8F=AB=E9=94=84=E5=A4=B4?= Date: Fri, 5 Apr 2024 16:41:09 +0800 Subject: [PATCH] yang --- ProductionSystem/Forms/SystemSetting/ParaSettingForm.cs | 8 ++++++-- .../ExtendedControls/MyParaControl.cs | 6 ++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ProductionSystem/Forms/SystemSetting/ParaSettingForm.cs b/ProductionSystem/Forms/SystemSetting/ParaSettingForm.cs index e50f30c..e785c09 100644 --- a/ProductionSystem/Forms/SystemSetting/ParaSettingForm.cs +++ b/ProductionSystem/Forms/SystemSetting/ParaSettingForm.cs @@ -165,7 +165,7 @@ namespace ProductionSystem.Forms.SystemSetting Name = $"layoutControlItem{j}", TextVisible = false }; - if (currentParaConfigs[j].ParaCode.Contains("protocol")) + if (currentParaConfigs[j].ParaCode.Contains("_DB")) { TextEdit textEdit = new TextEdit { @@ -175,13 +175,14 @@ namespace ProductionSystem.Forms.SystemSetting textEdit.Properties.Appearance.Font = new Font("Tahoma", 10.5F); textEdit.Properties.Appearance.Options.UseFont = true; textEdit.Properties.AutoHeight = false; - textEdit.Properties.NullValuePrompt = "请输入压缩机协议编码"; + textEdit.Properties.NullValuePrompt = "请输入"+ currentParaConfigs[j].ParaName; layoutControlItem.Control = textEdit; } else { MyParaControl myParaControl = new MyParaControl { + Name = $"myParaControl{j}", MaximumSize = new Size(700, 50), LblItemCode = currentParaConfigs[j].ParaCode, @@ -195,6 +196,9 @@ namespace ProductionSystem.Forms.SystemSetting CheckEditVisible = !currentParaConfigs[j].IsMust, TabIndex = j }; + + + layoutControlItem.Control = myParaControl; } layoutItemArr[j] = layoutControlItem; diff --git a/ProductionSystem_UserControl/ExtendedControls/MyParaControl.cs b/ProductionSystem_UserControl/ExtendedControls/MyParaControl.cs index 07ea74f..04a8563 100644 --- a/ProductionSystem_UserControl/ExtendedControls/MyParaControl.cs +++ b/ProductionSystem_UserControl/ExtendedControls/MyParaControl.cs @@ -15,6 +15,12 @@ namespace ProductionSystem_UserControl.ExtendedControls MaximumSize = new Size(480, 50); } + + public void HiderTargetVal() + { + txtTargetVal.ReadOnly = true; + } + #region 自定义属性 ///