Example #1
0
 public ExerciseScreen(String username,int exercisenum)
 {
     user = username;
     inprog = new ExerciseSession(exercisenum);
     InitializeComponent();
     label5.Text = inprog.getRepCount().ToString();
     label7.Text = inprog.getRepsLeft().ToString();
 }
Example #2
0
 public Debug(String username)
 {
     user = username;
     inprog = new ExerciseSession();
     InitializeComponent();
     label5.Text = inprog.getRepCount().ToString();
     label7.Text = inprog.getRepsLeft().ToString();
 }
Example #3
0
 public ExerciseScreen(String username, ExerciseSession current)
 {
     user = username;
     inprog = current;
     InitializeComponent();
 }
Example #4
0
 //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;
 }
Example #5
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;
        }