Subversion Repositories spk

Rev

Rev 94 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1 cycrow 1
#include "../StdAfx.h"
2
#include "AddShipPart.h"
3
 
4
#include "Form1.h"
5
 
6
namespace Creator {
7
	void AddShipPart::SetComponent(bool edit)
8
	{
9
		if ( edit )
10
			this->Text = "Edit Component Entry";
11
		else
12
			this->Text = "Add Component Entry";
13
 
14
		this->PanelSection2->Visible = true;
15
 
16
		CyStringList *list = ((Form1 ^)m_pParent)->GetComponentSections();
17
		this->FillCombo(list);
18
	}
19
 
20
	void AddShipPart::SetDummy(bool edit)
21
	{
22
		if ( edit )
23
			this->Text = "Edit Dummy Entry";
24
		else
25
			this->Text = "Add Component Entry";
26
 
27
		this->PanelSection2->Visible = false;
28
 
29
		CyStringList *list = ((Form1 ^)m_pParent)->GetDummySections();
30
		this->FillCombo(list);
31
	}
32
 
33
	void AddShipPart::SetBodies(bool edit)
34
	{
35
		if ( edit )
36
			this->Text = "Edit Bodies Entry";
37
		else
38
			this->Text = "Add Bodies Entry";
39
 
40
		this->PanelSection2->Visible = false;
41
 
42
		CyStringList *list = ((Form1 ^)m_pParent)->GetBodiesSections();
43
		this->FillCombo(list);
44
	}
45
 
46
	void AddShipPart::FillCombo(CyStringList *list)
47
	{
48
		this->ComboSection->Items->Clear();
49
		for ( SStringList *str = list->Head(); str; str = str->next )
50
			this->ComboSection->Items->Add(SystemStringFromCyString(str->str));
51
	}
52
}