コード例 #1
0
ファイル: ExerciseScreen.cs プロジェクト: NeilSokol/syde461
 public ExerciseScreen(String username,int exercisenum)
 {
     user = username;
     inprog = new ExerciseSession(exercisenum);
     InitializeComponent();
     label5.Text = inprog.getRepCount().ToString();
     label7.Text = inprog.getRepsLeft().ToString();
 }
コード例 #2
0
ファイル: Debug.cs プロジェクト: NeilSokol/syde461
 public Debug(String username)
 {
     user = username;
     inprog = new ExerciseSession();
     InitializeComponent();
     label5.Text = inprog.getRepCount().ToString();
     label7.Text = inprog.getRepsLeft().ToString();
 }
コード例 #3
0
ファイル: ExerciseScreen.cs プロジェクト: NeilSokol/syde461
 public ExerciseScreen(String username, ExerciseSession current)
 {
     user = username;
     inprog = current;
     InitializeComponent();
 }
コード例 #4
0
ファイル: ExerciseSession.cs プロジェクト: NeilSokol/syde461
 //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;
 }
コード例 #5
0
ファイル: ExerciseSession.cs プロジェクト: NeilSokol/syde461
        //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;
        }