views:

39

answers:

1

I have a timer control and a grid with a List of coordinates for the grid. I was wondering how I could use the timer control or any other control in order to execute code in the interval, coordinate.Time as it varies for each coordinate. Also, thread.sleep(time) is not an option for me.

foreach (Coordinate coordinate in this.Macro)
            {
                coordinate.Time;
                coordinate.Initial;
                coordinate.Final;

                ... executecode @ coordinate.Time.
            }
A: 

Just create a new Thread per each coordinate with a Timer set to the specified interval.

Vinko Vrsalovic
I was hoping for a solution with a timer control since I haven't delved into multithreading yet.
Gio Borje
You just cannot do it with a single timer control.
Vinko Vrsalovic