Exemplo n.º 1
0
        private void CBExercise_Click(object sender, EventArgs e)
        {
            CBExercise.Items.Clear();
            CBExercise.Text = "";

            if (CBGroup.SelectedIndex == 0)
            {
                exercises = legs.GetExercises();
            }
            else if (CBGroup.SelectedIndex == 1)
            {
                exercises = back.GetExercises();
            }
            else if (CBGroup.SelectedIndex == 2)
            {
                exercises = chest.GetExercises();
            }
            else if (CBGroup.SelectedIndex == 3)
            {
                exercises = arms.GetExercises();
            }
            else if (CBGroup.SelectedIndex == 4)
            {
                exercises = shoulders.GetExercises();
            }
            else
            {
                MessageBox.Show("Виберіть, будь ласка, групу м\'язів", "Помилка", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            for (Int32 i = 0; i < exercises.Length; i++)
            {
                CBExercise.Items.Add(exercises[i]);
            }
        }