Ejemplo n.º 1
0
 /* Called when the user pressed the add exercise button. Opens a ExerciseCreatorForm. 
  */
 private void addExerciseIcon_Click(object sender, EventArgs e)
 {
     ExerciseCreatorForm ecf = new ExerciseCreatorForm(this.db, UpdateExerciseList);
     ecf.Show(this);
 }
Ejemplo n.º 2
0
        /** The following methods are callbacks for the exercise right click menu **/

        /* Called when the user clicks to modify a exercise. Displays a popup similar to the exercise 
         * creator but with prefilled controls to let the user modify an existing exercise.
         */
        private void ModifyExerciseToolStripItemClick(object sender, EventArgs e)
        {
            if (this.selectedIndex == noMatches)
            {
                return;
            }
            Exercise selectedExercise = this.allExercises[this.selectedIndex];

            ExerciseCreatorForm ecf = new ExerciseCreatorForm(this.db, UpdateExerciseList);
            ecf.FillForm(selectedExercise);
            ecf.Show(this);
        }