コード例 #1
0
 /// <summary>
 /// Lädt die VM relevanten Daten
 /// </summary>
 public void LoadData()
 {
     foreach (DifficultyLevelScale difficultyLevelScale in _difficultyLevelScaleService.GetAll())
     {
         DifficultyLevelScales.Add(difficultyLevelScale);
     }
 }
コード例 #2
0
 /// <summary>
 ///     Lädt die VM relevanten Daten
 /// </summary>
 public void LoadData()
 {
     DifficultyLevelScales.Clear();
     foreach (DifficultyLevelScale difficultyLevelScale in _difficultyLevelScaleService.GetAll())
     {
         IItemWithNameViewModel <DifficultyLevelScale> difficultyLevelScaleViewModel = new ItemWithNameViewModel <DifficultyLevelScale>();
         difficultyLevelScaleViewModel.LoadData(difficultyLevelScale);
         DifficultyLevelScales.Add(difficultyLevelScaleViewModel);
     }
 }
コード例 #3
0
 /// <summary>
 ///     Setzt vorbestimmte Werte
 /// </summary>
 /// <param name="name"></param>
 /// <param name="scale"></param>
 /// <param name="level"></param>
 public void PresetValues(string name, DifficultyLevelScale scale, DifficultyLevel level)
 {
     Name = name;
     if (DifficultyLevelScales.Any())
     {
         SelectedDifficultyLevelScale = DifficultyLevelScales.FirstOrDefault(x => x.Id == scale.Id);
     }
     if (SelectedDifficultyLevelScale != null)
     {
         SelectedDifficultyLevel = DifficultyLevels.FirstOrDefault(x => x.Id == level.Id);
     }
 }
コード例 #4
0
        /// <summary>
        /// Liefert eine neue INstanz des Design View Models
        /// </summary>
        public NameAndLevelInputDesignViewModel()
        {
            Name = "Weg 1";

            DifficultyLevelScales.Add(new DifficultyLevelScale()
            {
                Name = "Sächsisch"
            });
            SelectedDifficultyLevelScale = DifficultyLevelScales.First();

            DifficultyLevels.Add(new DifficultyLevel()
            {
                Name = "IV", Score = 500
            });
            SelectedDifficultyLevel = DifficultyLevels.First();
        }
 /// <summary>
 /// Liefert eine neue Instanz des Design View Models
 /// </summary>
 public DifficultyLevelScaleManagementDesignViewModel()
 {
     DifficultyLevelScales.Add(new ItemWithNameDesignViewModel <DifficultyLevelScale>());
     DifficultyLevelScales.Add(new ItemWithNameDesignViewModel <DifficultyLevelScale>());
 }