(1) Verification whether Div ThresholdHI is greater then ThresholdLO, (2) Fixed a bug when no graph was selected and layout mode was changed.
This commit is contained in:
@@ -105,6 +105,9 @@ namespace TBF.BenchControl.Elde.Diverter
|
||||
CfgUpdateFlags flags = CfgUpdateFlags.None;
|
||||
|
||||
int dummy;
|
||||
int divLo;
|
||||
int divHi;
|
||||
|
||||
if (!parentNameComboBox.Items.Contains(parentNameComboBox.Text))
|
||||
{
|
||||
flags |= CfgUpdateFlags.Error;
|
||||
@@ -140,15 +143,22 @@ namespace TBF.BenchControl.Elde.Diverter
|
||||
flags |= CfgUpdateFlags.Error;
|
||||
message += Environment.NewLine + "'Starting Edge' should be between 0 and 100%";
|
||||
}
|
||||
if (!int.TryParse(thresholdLoTextBox.Text, out dummy) || dummy < 0 || dummy > 100)
|
||||
if (!int.TryParse(thresholdLoTextBox.Text, out divLo) || divLo < 0 || divLo > 100)
|
||||
{
|
||||
flags |= CfgUpdateFlags.Error;
|
||||
message += Environment.NewLine + "'Threshold LO' should be between 0 and 100%";
|
||||
}
|
||||
if (!int.TryParse(thresholdHiTextBox.Text, out dummy) || dummy < 0 || dummy > 100)
|
||||
if (!int.TryParse(thresholdHiTextBox.Text, out divHi) || dummy > 100 || divHi <= divLo)
|
||||
{
|
||||
flags |= CfgUpdateFlags.Error;
|
||||
message += Environment.NewLine + "'Threshold HI' should be between 0 and 100%";
|
||||
if (divHi <= divLo)
|
||||
{
|
||||
message += Environment.NewLine + "'Threshold HI' should greater then 'Threshold LO'";
|
||||
}
|
||||
else
|
||||
{
|
||||
message += Environment.NewLine + "'Threshold HI' should be between 0 and 100%";
|
||||
}
|
||||
}
|
||||
return flags;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user