How to reproduce: The values of linked page are 0 and 0. Then you change the minimum into 23, the max will change to 23 as well. Then you change the min to 18 and you'll leave the page (to another station eg) an errors pops up telling zero is not valid (the value should lie between minimum and maximum).
This is the error in Dutch:
System.ArgumentOutOfRangeException: De waarde van 0 is niet geldig voor Value. Value moet tussen 'Minimum' en 'Maximum' liggen.
Parameternaam: Value
bij System.Windows.Forms.NumericUpDown.set_Value(Decimal value)
bij WebEPG_conf.fChannels.DoEvent(Object source, EventArgs e)
This is the solution:
In the beginning of "private void DoEvent(Object source, EventArgs e)" the minimum is set: nEnd.Minimum = nStart.Value;
In the same event method there is the folowing part:
If you change this into the folowing code, the problem should be solved.
Frank
This is the error in Dutch:
System.ArgumentOutOfRangeException: De waarde van 0 is niet geldig voor Value. Value moet tussen 'Minimum' en 'Maximum' liggen.
Parameternaam: Value
bij System.Windows.Forms.NumericUpDown.set_Value(Decimal value)
bij WebEPG_conf.fChannels.DoEvent(Object source, EventArgs e)
This is the solution:
In the beginning of "private void DoEvent(Object source, EventArgs e)" the minimum is set: nEnd.Minimum = nStart.Value;
In the same event method there is the folowing part:
Code:
if (gInfo.Linked)
{
cbLinked.Checked = info.Linked;
nStart.ReadOnly = !cbLinked.Checked;
nEnd.ReadOnly = !cbLinked.Checked;
nStart.Value = info.linkStart;
nEnd.Value = info.linkEnd;
}
If you change this into the folowing code, the problem should be solved.
Code:
if (gInfo.Linked)
{
cbLinked.Checked = info.Linked;
nStart.ReadOnly = !cbLinked.Checked;
nEnd.ReadOnly = !cbLinked.Checked;
nStart.Value = info.linkStart;
if (info.linkEnd < nEnd.Minimum)
{ nEnd.Value = nEnd.Minimum; }
else
{ nEnd.Value = info.linkEnd; }
}
Frank