Beispiel #1
0
        private void HandleCraftCategoriesPageResponse(int responseID)
        {
            Model vm = GetDialogCustomData <Model>();

            ClearPageResponses("BlueprintListPage");
            DialogResponse response   = GetResponseByID("CraftCategoriesPage", responseID);
            int            categoryID = (int)response.CustomData[string.Empty];

            if (categoryID == -1) // Back
            {
                ChangePage("MainPage");
                return;
            }

            vm.CraftBlueprints = _craft.GetPCBlueprintsByCategoryID(GetPC().GlobalID, categoryID);

            foreach (CraftBlueprint bp in vm.CraftBlueprints)
            {
                AddResponseToPage("BlueprintListPage", bp.ItemName, true, new Tuple <string, dynamic>(string.Empty, bp.CraftBlueprintID));
            }
            AddResponseToPage("BlueprintListPage", "Back", true, new Tuple <string, dynamic>(string.Empty, -1));

            vm.Mode = 1;
            ChangePage("BlueprintListPage");
        }
Beispiel #2
0
        private void HandleCraftCategoriesPageResponse(int responseID)
        {
            Model vm = GetDialogCustomData <Model>();

            ClearPageResponses("BlueprintListPage");
            DialogResponse response   = GetResponseByID("CraftCategoriesPage", responseID);
            int            categoryID = (int)response.CustomData;

            vm.CraftBlueprints = _craft.GetPCBlueprintsByCategoryID(GetPC().GlobalID, categoryID);

            foreach (CraftBlueprint bp in vm.CraftBlueprints)
            {
                AddResponseToPage("BlueprintListPage", bp.ItemName, true, bp.ID);
            }

            ChangePage("BlueprintListPage");
        }