本地存储Plc

dep
我叫锄头 11 months ago
parent d683ea84e0
commit f57ef0a2a4

@ -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);

@ -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

Loading…
Cancel
Save