//user presses Go button on "your prescription" pane
 private void button2_Click(object sender, RoutedEventArgs e)
 {
     int index = prescription_listbox.SelectedIndex;
     if (index == -1)
     {
         MessageBox.Show("Please select an exercise first");
     }
     else
     {
         ExerciseScreen es = new ExerciseScreen(p.patient_prescription.prescription.ElementAt(index));
         es.Left = 250;
         es.Top = 10;
         es.ShowDialog();
     }
 }
 //user presses Go button on "all exercises" pane
 private void button3_Click(object sender, RoutedEventArgs e)
 {
     int index = allExercises_listbox.SelectedIndex;
     if (index == -1)
     {
         MessageBox.Show("Please select an exercise first");
     }
     else
     {
         ExerciseScreen es = new ExerciseScreen(allExPrescription.getExerciseAtLocation(index));
         es.Left = 250;
         es.Top = 10;
         es.ShowDialog();
     }
 }