After debugging a little I have pretty much narrowed it down to the reference ToTime(Time[0]). I use this all over the place in OnBarUpdate() but I assume I am doing something wrong in this subroutine.
privatevoid tsbtnStart_Click(object sender, EventArgs e)
{
if (ToTime(Time[0]) < dStartTime)
{
dStartTime = ToTime(Time[0]);
tsbtnStart.ForeColor = Color.Red;
DrawTextFixed("tag1","Manually Started at " + dStartTime, TextPosition.Center);
}
else
{
DrawTextFixed("tag1","Strat already running", TextPosition.Center);
}
}
2010-07-02 13:21:04:515 in OnUnhandledThreadException
2010-07-02 13:21:04:515 ********* exception trapped *********
2010-07-02 13:21:04:515 Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
Comment