diff --git a/ProductionSystem/Forms/SystemSetting/ParaSettingForm.cs b/ProductionSystem/Forms/SystemSetting/ParaSettingForm.cs index eb5c575..e50f30c 100644 --- a/ProductionSystem/Forms/SystemSetting/ParaSettingForm.cs +++ b/ProductionSystem/Forms/SystemSetting/ParaSettingForm.cs @@ -82,6 +82,8 @@ namespace ProductionSystem.Forms.SystemSetting myparaControls[j].MaxText = paraConfig.MaxVal?.ToString(); myparaControls[j].MinText = paraConfig.MinVal?.ToString(); myparaControls[j].CkIsActiveChecked = paraConfig.IsMust; + myparaControls[j].WaitTime = paraConfig.WaitTime.ToString(); + myparaControls[j].TestTime = paraConfig.TestTime.ToString(); } } } @@ -299,6 +301,39 @@ namespace ProductionSystem.Forms.SystemSetting } #endregion + + #region 下限值 + var waitTimeTxt = myparaControls[j].WaitTime.Trim(); + if (!string.IsNullOrEmpty(waitTimeTxt)) + { + bool minParseResult = decimal.TryParse(waitTimeTxt, out decimal minVal); + if (minParseResult) + { + t_ParaConfig.WaitTime = Convert.ToInt32(minVal); + } + else + { + errorMsg += $"下限值:【{waitTimeTxt}】格式错误!"; + } + } + #endregion + + #region 下限值 + var testTimeTxt = myparaControls[j].TestTime.Trim(); + if (!string.IsNullOrEmpty(testTimeTxt)) + { + bool minParseResult = decimal.TryParse(testTimeTxt, out decimal minVal); + if (minParseResult) + { + t_ParaConfig.TestTime = Convert.ToInt32(minVal); + } + else + { + errorMsg += $"下限值:【{testTimeTxt}】格式错误!"; + } + } + #endregion + if (!string.IsNullOrEmpty(errorMsg)) { errorMsg.Insert(0, groupControls[i].Text); diff --git a/ProductionSystem_UserControl/ExtendedControls/MyParaControl.cs b/ProductionSystem_UserControl/ExtendedControls/MyParaControl.cs index 9a168a0..07ea74f 100644 --- a/ProductionSystem_UserControl/ExtendedControls/MyParaControl.cs +++ b/ProductionSystem_UserControl/ExtendedControls/MyParaControl.cs @@ -104,6 +104,41 @@ namespace ProductionSystem_UserControl.ExtendedControls + + private string _waitTime = ""; + + public string WaitTime + { + get + { + return this.txtWaitTime.Text; + } + set + { + _waitTestText = value; + txtWaitTime.Text = _waitTime; + } + } + + + + private string _testTime = ""; + + public string TestTime + { + get + { + return this.txtTestTime.Text; + } + set + { + _testTime = value; + txtTestTime.Text = _testTime; + } + } + + + private string _waitTimeText = ""; [Category("自定义属性"), Description("等待时间")] public string WaitTimeText