Ejemplo n.º 1
0
        private IList <LocalizedExercise> getExerciseList()
        {
            if (ServicesManager.IsDesignMode)
            {
                return(new List <LocalizedExercise>());
            }
            List <LocalizedExercise> exercises = new List <LocalizedExercise>();

            foreach (ExerciseDTO exercise in ObjectsReposidory.Exercises.Values)
            {
                LocalizedExercise localizedExercise = new LocalizedExercise(exercise);
                exercises.Add(localizedExercise);
            }
            return(exercises);
        }
        private void fillExerciseComboBox()
        {
            LookUpColumnInfo selectedCol = (LookUpColumnInfo)cmbExerciseColumns.SelectedItem;

            colExercise.DisplayMember = selectedCol.FieldName;

            List <LocalizedExercise> exercises = new List <LocalizedExercise>();

            foreach (ExerciseDTO exercise in ObjectsReposidory.Exercises)
            {
                LocalizedExercise localizedExercise = new LocalizedExercise(exercise);
                exercises.Add(localizedExercise);
            }
            ExerciseDTO ex = new ExerciseDTO(Guid.Empty);

            ex.Name = "<Dodaj>";
            //exercises.Add(ex);
            colExercise.DataSource = exercises;
        }