Use a Workout class
public class Workout
{
public string Name { get; set; }
public int Time { get; set; }
public bool Complete { get; set; }
public int Id { get; set; }
}
In my example I'm using a simple label (lblWorkoutName) to show the current workout, you can keep your picture box. Next add a Timer to the form (I've left mine called "timer1" but you should give it a sensible name). The timer is then used to trigger when the next workout should be shown.
public partial class Form1 : Form
{
private List<Workout> workouts;
private int currentWorkout;
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
workouts = new List<Workout>
{
new Workout {Id = 1, Name = "Row Close", Time = 3},
new Workout {Id = 2, Name = "Arm Row Right", Time = 5}
};
currentWorkout = 1;
ShowWorkout(currentWorkout);
}
private void ShowWorkout(int id)
{
timer1.Stop();
Workout workout = workouts.SingleOrDefault(w => w.Id == id);
if (workout == null)
{
lblWorkoutName.Text = "Workout over";
return;
}
lblWorkoutName.Text = workout.Name;
timer1.Interval = workout.Time * 1000;
timer1.Start();
}
private void timer1_Tick(object sender, EventArgs e)
{
currentWorkout++;
ShowWorkout(currentWorkout);
}
}