Delay added to IValve and Pumps, no delay functionality yet
This commit is contained in:
@@ -54,6 +54,7 @@ namespace TBF.BenchControl.Elde.PumpWithFM
|
||||
parentNameComboBox.Text = string.IsNullOrEmpty(config.ParentName) ? "---" : config.ParentName;
|
||||
bitPositionTextBox.Text = config.BitPosition.ToString();
|
||||
fmIndexTextBox.Text = config.FMIndex.ToString();
|
||||
delayTextBox.Text = config.Delay.ToString();
|
||||
}
|
||||
|
||||
public void Unlock()
|
||||
@@ -62,6 +63,7 @@ namespace TBF.BenchControl.Elde.PumpWithFM
|
||||
parentNameComboBox.Enabled = true;
|
||||
bitPositionTextBox.Enabled = true;
|
||||
fmIndexTextBox.Enabled = true;
|
||||
delayTextBox.Enabled = true;
|
||||
}
|
||||
|
||||
public void UpdateCfg()
|
||||
@@ -72,6 +74,7 @@ namespace TBF.BenchControl.Elde.PumpWithFM
|
||||
config.ParentName = parentNameComboBox.Text.Equals("---") ? string.Empty : parentNameComboBox.Text;
|
||||
config.BitPosition = int.Parse(bitPositionTextBox.Text);
|
||||
config.FMIndex = int.Parse(fmIndexTextBox.Text);
|
||||
config.Delay = int.Parse(delayTextBox.Text);
|
||||
}
|
||||
|
||||
public CfgVerifyFlags VerifyCfg(ref string message)
|
||||
@@ -94,6 +97,11 @@ namespace TBF.BenchControl.Elde.PumpWithFM
|
||||
flags |= CfgVerifyFlags.Error;
|
||||
message += Environment.NewLine + "'FM Index' should be between 0 and FMPumpsCount - 1";
|
||||
}
|
||||
if (!int.TryParse(delayTextBox.Text, out dummy) || dummy < 0 || dummy >= 300)
|
||||
{
|
||||
flags |= CfgVerifyFlags.Error;
|
||||
message += Environment.NewLine + "'Delay' should be between 0 and 300s (5min)";
|
||||
}
|
||||
return flags;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user