Ejemplo n.º 1
0
        public usrExercisesBrowser()
        {
            InitializeComponent();

            foreach (ExerciseType type in Enum.GetValues(typeof(ExerciseType)))
            {
                CheckedListBoxItem item = new CheckedListBoxItem(type, EnumLocalizer.Default.Translate(type));
                cmbTypes.Properties.Items.Add(item);
            }

            foreach (WorkoutPlanSearchOrder type in Enum.GetValues(typeof(WorkoutPlanSearchOrder)))
            {
                BodyArchitect.Controls.ComboBoxItem item = new BodyArchitect.Controls.ComboBoxItem(type, EnumLocalizer.Default.Translate(type));
                cmbSortOrder.Properties.Items.Add(item);
            }
            cmbSortOrder.SelectedIndex = 0;
        }
Ejemplo n.º 2
0
        private void fillSearchControls()
        {
            cmbWorkoutPlanType.Properties.Items.Clear();
            cmbSortOrder.Properties.Items.Clear();
            cmbWorkoutPlanDifficult.Properties.Items.Clear();
            cmbLanguages.Properties.Items.Clear();
            cmbPurposes.Properties.Items.Clear();
            cmbDays.Properties.Items.Clear();

            for (int i = 1; i < 8; i++)
            {
                CheckedListBoxItem item = new CheckedListBoxItem(i, i.ToString());
                cmbDays.Properties.Items.Add(item);
            }
            foreach (var test in Enum.GetValues(typeof(WorkoutPlanPurpose)))
            {
                CheckedListBoxItem item = new CheckedListBoxItem(test, EnumLocalizer.Default.Translate((WorkoutPlanPurpose)test));
                cmbPurposes.Properties.Items.Add(item);
            }

            foreach (var type in Enum.GetValues(typeof(TrainingType)))
            {
                CheckedListBoxItem item = new CheckedListBoxItem(type);
                cmbWorkoutPlanType.Properties.Items.Add(item);
            }

            foreach (var type in Enum.GetValues(typeof(TrainingPlanDifficult)))
            {
                CheckedListBoxItem item = new CheckedListBoxItem(type, EnumLocalizer.Default.Translate((TrainingPlanDifficult)type));
                cmbWorkoutPlanDifficult.Properties.Items.Add(item);
            }

            foreach (var type in Enum.GetValues(typeof(WorkoutPlanSearchOrder)))
            {
                BodyArchitect.Controls.ComboBoxItem item = new BodyArchitect.Controls.ComboBoxItem(type, EnumLocalizer.Default.Translate((WorkoutPlanSearchOrder)type));
                cmbSortOrder.Properties.Items.Add(item);
            }
            cmbSortOrder.SelectedIndex = 0;


            foreach (var test in Language.Languages)
            {
                CheckedListBoxItem item = new CheckedListBoxItem(test, test.DisplayName);
                cmbLanguages.Properties.Items.Add(item);
            }
        }