using System.Collections.Generic; using System.Linq; using BS.Shared.DataContracts.Feature.AI; namespace BeWo.ViewModel.ListViewModel { public class AiPromptbausteinTreeListVM : AbstractDCListMapperVM { public AiPromptbausteinTreeListVM() : this(null) { if (BeWoApp.IsInDesignMode) { InitDesigner(); } } public AiPromptbausteinTreeListVM(IEnumerable pDataContracts = null, AiPromptbausteinTreeVM aiPromptbausteinTreeVM = null) : base(pDataContracts) { foreach (var vm in VMList) { vm.Parent = aiPromptbausteinTreeVM; } } #region Designer private void InitDesigner() { var prompt_1 = new AiPromptbausteinTreeDC() { Name = "Prompt 1", Prompt = "Erstelle eine Zusammenfassung" }; var prompt_2 = new AiPromptbausteinTreeDC() { Name = "Prompt 2", Prompt = "Erstelle eine Stichpunktliste" }; var prompt_3 = new AiPromptbausteinTreeDC() { Name = "Prompt 3", Prompt = "Erstelle eine kurze Zusammenfassung" }; var prompt_4 = new AiPromptbausteinTreeDC() { Name = "Prompt 4", Prompt = "Erstelle eine kurze Stichpunktliste" }; var kategorie_1 = new AiPromptbausteinTreeDC() { Name = "Kategorie 1", IsKategorie = true, Children = new List { prompt_1, prompt_2 } }; var kategorie_2 = new AiPromptbausteinTreeDC() { Name = "Kategorie 2", IsKategorie = true, Children = new List { prompt_3, prompt_4 } }; VMList.Add(new AiPromptbausteinTreeVM(kategorie_1)); VMList.Add(new AiPromptbausteinTreeVM(kategorie_2)); } #endregion } }