public override void Initialize() { Model vm = GetDialogCustomData <Model>(); vm.CraftCategories = _craft.GetCategoriesAvailableToPC(GetPC().GlobalID); foreach (CraftBlueprintCategory category in vm.CraftCategories) { AddResponseToPage("CraftCategoriesPage", category.Name, true, category.ID); } SetDialogCustomData(vm); }
public override void Initialize() { Model vm = GetDialogCustomData <Model>(); vm.CraftCategories = _craft.GetCategoriesAvailableToPC(GetPC().GlobalID); vm.StructureCategories = _structure.GetStructureCategories(GetPC().GlobalID); foreach (CraftBlueprintCategory category in vm.CraftCategories) { AddResponseToPage("CraftCategoriesPage", category.Name, true, new Tuple <string, dynamic>(string.Empty, category.CraftBlueprintCategoryID)); } AddResponseToPage("CraftCategoriesPage", "Back", true, new Tuple <string, dynamic>(string.Empty, -1)); foreach (StructureCategory category in vm.StructureCategories) { AddResponseToPage("ConstructionCategoriesPage", category.Name, true, new Tuple <string, dynamic>(string.Empty, category.StructureCategoryID)); } AddResponseToPage("ConstructionCategoriesPage", "Back", true, new Tuple <string, dynamic>(string.Empty, -1)); SetDialogCustomData(vm); }