so my code goes as followed
for(int i = 0; i < NumberOfTimers; i++)
{
StatusBox[i].Text = "valve is OFF";
if (DateTime.Now.Hour >= StartTimes[i].Value.Hour && DateTime.Now.Minute >= StartTimes[i].Value.Minute)
{
if (StartTimes[i].Value.Minute + DurationTimers[i].Value - 1 >= DateTime.Now.Minute)
{
StatusBox[i].Text = "valve is ON";
ValveStatus = true;
}
}
}
The problem is that no matter what length NumberOfTimers is, only the last statusBox in the array gets changed, this includes the "valve is OFF" part too.
what is going on?