private void btnSettings_Click(object sender, EventArgs e) { if (cbxGoal.SelectedItem != null && cbxGoal.SelectedItem.ToString().Equals("Strength - Maximise strength")) { TrainingType.setTrainingName(TrainingType.NAME_STRENGTH); } else if (cbxGoal.SelectedItem != null && cbxGoal.SelectedItem.ToString().Equals("Hypertrophy - Look better aesthetically")) { TrainingType.setTrainingName(TrainingType.NAME_HYPERTROPHY); } else if (cbxGoal.SelectedItem != null && cbxGoal.SelectedItem.ToString().Equals("Endurance - Maintain peak performance for longer periods of time")) { TrainingType.setTrainingName(TrainingType.NAME_ENDURANCE); } Console.WriteLine(TrainingType.getTrainingName()); String sVal = cbxDays.SelectedItem.ToString(); TrainingType.setDays((int)Char.GetNumericValue(sVal[0])); Console.WriteLine(TrainingType.getDays()); this.Controls.Clear(); this.InitializeComponent(); setButtons(); setMessage(); }
private void btnFullBody_Click(object sender, EventArgs e) { if (TrainingType.getTrainingName().Equals(TrainingType.NAME_ENDURANCE)) { enduro = new frmEnduro(); } if (TrainingType.getTrainingName().Equals(TrainingType.NAME_HYPERTROPHY)) { hyper = new frmHyper(); hyper.Show(); } if (TrainingType.getTrainingName().Equals(TrainingType.NAME_STRENGTH)) { strength = new frmStrength(); strength.Show(); } }
private void setMessage() { String message = ""; switch (TrainingType.getDays()) { case 1: message = "Fullbody workout program once a week\r\n\r\n" + "Full-Body:\r\n" + "Chest\r\n" + "Shoulders\r\n" + "Triceps\r\n" + "Back\r\n" + "Biceps\r\n" + "Quads\r\n" + "Glutes\r\n" + "Hamstrings\r\n" + "Calves\r\n"; break; case 2: message = "Upper and Lower Body split workout program 2 times a week\r\n\r\n" + "Upper-Body:\r\n" + "Chest\r\n" + "Shoulders\r\n" + "Triceps\r\n" + "Back\r\n" + "Biceps\r\n\r\n" + "Lower-Body:\r\n" + "Biceps\r\n" + "Quads\r\n" + "Glutes\r\n" + "Hamstrings\r\n" + "Calves\r\n"; break; case 3: message = "Push, Pull, Legs workout program 3 times a week\r\n\r\n" + "Push:\r\n" + "Chest\r\n" + "Shoulders\r\n" + "Triceps\r\n\r\n" + "Pull:\r\n" + "Back\r\n" + "Biceps\r\n\r\n" + "Legs:\r\n" + "Quads\r\n" + "Glutes\r\n" + "Hamstrings\r\n" + "Calves\r\n"; break; } if (TrainingType.getTrainingName().Equals(TrainingType.NAME_ENDURANCE)) { txtText.Text = TrainingType.getTrainingName() + " Training Routine\r\n\r\n" + "The training routine is a " + TrainingType.NAME_ENDURANCE + " routine using a " + message; } if (TrainingType.getTrainingName().Equals(TrainingType.NAME_HYPERTROPHY)) { txtText.Text = TrainingType.getTrainingName() + " Training Routine\r\n\r\n" + "The training routine is a " + TrainingType.NAME_HYPERTROPHY + " routine using a " + message; } if (TrainingType.getTrainingName().Equals(TrainingType.NAME_STRENGTH)) { txtText.Text = TrainingType.getTrainingName() + " Training Routine\r\n\r\n" + "The training routine is a " + TrainingType.NAME_STRENGTH + " routine using a " + message; } }