Example #1
0
 //Default constructor, pass caller so that can update picture boxes on exercise screen
 public PinchExercise(ExerciseScreen caller)
 {
     exerciseName = "Pinch Exercise";
     exerciseDescription = "This exercise is...";
     instructions = "Pinch the ball shown on the screen";
     //video = new InstructionVideo();
     video = new InstructionVideo("Pinch.wmv");
     output = caller;
 }
Example #2
0
        // When user selects exercise screen
        private void button1_Click(object sender, EventArgs e)
        {
            /*
            //check if user has any exercises for today
            NpgsqlConnection conn = new NpgsqlConnection("Server=127.0.0.1;Port=5432;User Id=useitlab;Password=abc123;Database=UserData;");
            conn.Open();

            DateTime today = DateTime.Today;

            string sql = "select * from exercisedata where date='" +  + "'";
            NpgsqlDataAdapter da = new NpgsqlDataAdapter(sql, conn);
            ds.Reset();
            da.Fill(ds);
            dt = ds.Tables[0];
            */

            //Explain exercise to the user

            // Create new exercise screen and show to user
            if (dt.Rows.Count > 0)
            {
                ExerciseScreen exerciseScreen = new ExerciseScreen(username, todayExercise);
                exerciseScreen.ShowDialog();
            }
            else
            {
                MessageBox.Show("You have no Exercises for Today");
            }
            //// Create new debug screen and show to user
            //Debug exerciseScreen = new Debug(username);
            //exerciseScreen.ShowDialog();
        }