Delay added to IValve and Pumps, no delay functionality yet
This commit is contained in:
@@ -53,6 +53,7 @@ namespace TBF.BenchControl.Elde.Pump
|
||||
nameTextBox.Text = config.Name;
|
||||
parentNameComboBox.Text = string.IsNullOrEmpty(config.ParentName) ? "---" : config.ParentName;
|
||||
bitPositionTextBox.Text = config.BitPosition.ToString();
|
||||
delayTextBox.Text = config.Delay.ToString();
|
||||
}
|
||||
|
||||
public void Unlock()
|
||||
@@ -60,6 +61,7 @@ namespace TBF.BenchControl.Elde.Pump
|
||||
nameTextBox.Enabled = true;
|
||||
parentNameComboBox.Enabled = true;
|
||||
bitPositionTextBox.Enabled = true;
|
||||
delayTextBox.Enabled = true;
|
||||
}
|
||||
|
||||
public void UpdateCfg()
|
||||
@@ -69,7 +71,8 @@ namespace TBF.BenchControl.Elde.Pump
|
||||
config.Name = nameTextBox.Text;
|
||||
config.ParentName = parentNameComboBox.Text.Equals("---") ? string.Empty : parentNameComboBox.Text;
|
||||
config.BitPosition = int.Parse(bitPositionTextBox.Text);
|
||||
}
|
||||
config.Delay = int.Parse(delayTextBox.Text);
|
||||
}
|
||||
|
||||
public CfgVerifyFlags VerifyCfg(ref string message)
|
||||
{
|
||||
@@ -86,7 +89,12 @@ namespace TBF.BenchControl.Elde.Pump
|
||||
flags |= CfgVerifyFlags.Error;
|
||||
message += Environment.NewLine + "'Bit Position' should be between 0 and 63";
|
||||
}
|
||||
return flags;
|
||||
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