public ExerciseScreen(String username,int exercisenum) { user = username; inprog = new ExerciseSession(exercisenum); InitializeComponent(); label5.Text = inprog.getRepCount().ToString(); label7.Text = inprog.getRepsLeft().ToString(); }
public Debug(String username) { user = username; inprog = new ExerciseSession(); InitializeComponent(); label5.Text = inprog.getRepCount().ToString(); label7.Text = inprog.getRepsLeft().ToString(); }
public ExerciseScreen(String username, ExerciseSession current) { user = username; inprog = current; InitializeComponent(); }
//This constructor is for copying an existing ExerciseSession, and cancelling the old session ExerciseSession(ExerciseSession old) { this.user = old.user; this.type = old.type; this.state = old.state; old.state = exerciseState.cancelled; this.attempts = old.attempts; this.addedDate = DateTime.Now; old.lastModified = DateTime.Now; this.reps = old.reps; this.completedReps = 0; }
//Constructor to handle data pulled from exercise database //Copy ExerciseSession, used by health care professional, probably to repeat an exercise public ExerciseSession copyExerciseSession() { ExerciseSession copy = new ExerciseSession(); copy.user = this.user; copy.type = this.type; copy.state = exerciseState.incomplete; copy.attempts = 0; copy.addedDate = DateTime.Now; copy.reps = this.reps; this.completedReps = 0; return copy; }