Rev 1 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
#include "../StdAfx.h"#include "AddShipPart.h"#include "Form1.h"namespace Creator {void AddShipPart::SetComponent(bool edit){if ( edit )this->Text = "Edit Component Entry";elsethis->Text = "Add Component Entry";this->PanelSection2->Visible = true;CGameDirectories *gameDir = _prepareSection();for ( Utils::String section = gameDir->firstComponentSection(); !section.empty(); section = gameDir->nextComponentSection() )this->ComboSection->Items->Add(_US(section));}CGameDirectories *AddShipPart::_prepareSection(){CGameDirectories *gameDir = ((Form1 ^)m_pParent)->gameDirectories();gameDir->setSelectedGameDirectory(gameDir->highestGame());this->ComboSection->Items->Clear();return gameDir;}void AddShipPart::SetDummy(bool edit){if ( edit )this->Text = "Edit Dummy Entry";elsethis->Text = "Add Component Entry";this->PanelSection2->Visible = false;CGameDirectories *gameDir = _prepareSection();for ( Utils::String section = gameDir->firstDummySection(); !section.empty(); section = gameDir->nextDummySection() )this->ComboSection->Items->Add(_US(section));}void AddShipPart::SetBodies(bool edit){if ( edit )this->Text = "Edit Bodies Entry";elsethis->Text = "Add Bodies Entry";this->PanelSection2->Visible = false;CGameDirectories *gameDir = _prepareSection();for ( Utils::String section = gameDir->firstBodiesSection(); !section.empty(); section = gameDir->nextBodiesSection() )this->ComboSection->Items->Add(_US(section));}}