private void ShowSetup() { buttonBack.Visible = false; panelMain.Controls.Clear(); panelMain.Controls.Add(setupPage); setupPage.EnableScrolling(); setupPage.refreshCoordinateBoxes(EntitiesManager.GetQuestEntities()); buttonNext.Text = "Next >>"; }
private void GoToPanel() { switch (panelNum) { case 0: EntitiesManager.setQuestEntities(detailPage.GetEntityLists()); ShowSetup(); break; case 1: if (isFilled()) { ShowWait(); definitionDetails = setupPage.getDefinitionDetails(); CP selectedCP = EnemyInfo.GetCPIndex(definitionDetails.CPName, definitionDetails.locationID); EntitiesManager.InitializeEntities(selectedCP, BuildCoords(definitionDetails.hostageCoordinates), BuildCoords(definitionDetails.vehicleCoordinates), BuildCoords(definitionDetails.animalCoordinates), BuildCoords(definitionDetails.itemCoordinates), BuildCoords(definitionDetails.activeItemCoordinates), BuildCoords(definitionDetails.modelCoordinates)); detailPage.ResetAllPanels(); detailPage.LoadEntityLists(selectedCP, EntitiesManager.GetQuestEntities()); Application.DoEvents(); ShowDetails(); } else { MessageBox.Show("Please fill in the remaining Setup and Flavor Text fields.", "Missing Details", MessageBoxButtons.OK, MessageBoxIcon.Information); panelNum--; return; } break; case 2: BuildQuest(); MessageBox.Show("Build Complete", "Sideop Companion", MessageBoxButtons.OK, MessageBoxIcon.Information); panelNum--; break; } }
private void Save() { { SaveFileDialog saveFile = new SaveFileDialog(); saveFile.Filter = "Xml File|*.xml"; saveFile.FileName = setupPage.getDefinitionDetails().FpkName; DialogResult saveResult = saveFile.ShowDialog(); if (saveResult != DialogResult.OK) { return; } if (panelNum != 0) { panelNum = 0; GoToPanel(); } Quest quest = new Quest(setupPage.getDefinitionDetails(), EntitiesManager.GetQuestEntities()); quest.Save(saveFile.FileName); } }