1 |
cycrow |
1 |
#pragma once
|
|
|
2 |
|
|
|
3 |
using namespace System;
|
|
|
4 |
using namespace System::ComponentModel;
|
|
|
5 |
using namespace System::Collections;
|
|
|
6 |
using namespace System::Windows::Forms;
|
|
|
7 |
using namespace System::Data;
|
|
|
8 |
using namespace System::Drawing;
|
|
|
9 |
|
|
|
10 |
|
|
|
11 |
namespace Creator {
|
|
|
12 |
|
|
|
13 |
/// <summary>
|
|
|
14 |
/// Summary for AddShipPart
|
|
|
15 |
///
|
|
|
16 |
/// WARNING: If you change the name of this class, you will need to change the
|
|
|
17 |
/// 'Resource File Name' property for the managed resource compiler tool
|
|
|
18 |
/// associated with all .resx files this class depends on. Otherwise,
|
|
|
19 |
/// the designers will not be able to interact properly with localized
|
|
|
20 |
/// resources associated with this form.
|
|
|
21 |
/// </summary>
|
|
|
22 |
public ref class AddShipPart : public System::Windows::Forms::Form
|
|
|
23 |
{
|
|
|
24 |
public:
|
|
|
25 |
AddShipPart(System::Windows::Forms::Form ^parent)
|
|
|
26 |
{
|
|
|
27 |
InitializeComponent();
|
|
|
28 |
|
|
|
29 |
m_pParent = parent;
|
|
|
30 |
}
|
|
|
31 |
|
|
|
32 |
String ^GetData() { return m_sData; }
|
|
|
33 |
String ^GetSection() { return m_sSection; }
|
|
|
34 |
String ^GetSection2() { return m_sSection2; }
|
|
|
35 |
|
|
|
36 |
void SetSection(String ^section) { this->ComboSection->Text = section; }
|
|
|
37 |
void SetSection2(String ^section) { this->TextSection2->Text = section; }
|
|
|
38 |
void SetData(String ^data) { this->TextData->Text = data; }
|
|
|
39 |
|
|
|
40 |
void SetComponent(bool edit);
|
|
|
41 |
void SetDummy(bool edit);
|
|
|
42 |
void SetBodies(bool edit);
|
|
|
43 |
|
|
|
44 |
protected:
|
94 |
cycrow |
45 |
CGameDirectories *_prepareSection();
|
|
|
46 |
|
1 |
cycrow |
47 |
System::Windows::Forms::Form ^m_pParent;
|
|
|
48 |
String ^m_sSection;
|
|
|
49 |
String ^m_sSection2;
|
|
|
50 |
String ^m_sData;
|
|
|
51 |
|
|
|
52 |
/// <summary>
|
|
|
53 |
/// Clean up any resources being used.
|
|
|
54 |
/// </summary>
|
|
|
55 |
~AddShipPart()
|
|
|
56 |
{
|
|
|
57 |
if (components)
|
|
|
58 |
{
|
|
|
59 |
delete components;
|
|
|
60 |
}
|
|
|
61 |
}
|
|
|
62 |
|
|
|
63 |
private: System::Windows::Forms::TextBox^ TextSection2;
|
|
|
64 |
private: System::Windows::Forms::Label^ label1;
|
|
|
65 |
private: System::Windows::Forms::Panel^ panel1;
|
|
|
66 |
private: System::Windows::Forms::Label^ label2;
|
|
|
67 |
private: System::Windows::Forms::Panel^ panel2;
|
|
|
68 |
private: System::Windows::Forms::Label^ Data;
|
|
|
69 |
private: System::Windows::Forms::Panel^ panel3;
|
|
|
70 |
private: System::Windows::Forms::Button^ button2;
|
|
|
71 |
private: System::Windows::Forms::Button^ button1;
|
|
|
72 |
private: System::Windows::Forms::ComboBox^ ComboSection;
|
|
|
73 |
private: System::Windows::Forms::RichTextBox^ TextData;
|
|
|
74 |
private: System::Windows::Forms::Panel^ PanelSection2;
|
|
|
75 |
private:
|
|
|
76 |
/// <summary>
|
|
|
77 |
/// Required designer variable.
|
|
|
78 |
/// </summary>
|
|
|
79 |
System::ComponentModel::Container ^components;
|
|
|
80 |
|
|
|
81 |
#pragma region Windows Form Designer generated code
|
|
|
82 |
/// <summary>
|
|
|
83 |
/// Required method for Designer support - do not modify
|
|
|
84 |
/// the contents of this method with the code editor.
|
|
|
85 |
/// </summary>
|
|
|
86 |
void InitializeComponent(void)
|
|
|
87 |
{
|
|
|
88 |
System::ComponentModel::ComponentResourceManager^ resources = (gcnew System::ComponentModel::ComponentResourceManager(AddShipPart::typeid));
|
|
|
89 |
this->ComboSection = (gcnew System::Windows::Forms::ComboBox());
|
|
|
90 |
this->TextData = (gcnew System::Windows::Forms::RichTextBox());
|
|
|
91 |
this->PanelSection2 = (gcnew System::Windows::Forms::Panel());
|
|
|
92 |
this->TextSection2 = (gcnew System::Windows::Forms::TextBox());
|
|
|
93 |
this->label1 = (gcnew System::Windows::Forms::Label());
|
|
|
94 |
this->panel1 = (gcnew System::Windows::Forms::Panel());
|
|
|
95 |
this->label2 = (gcnew System::Windows::Forms::Label());
|
|
|
96 |
this->panel2 = (gcnew System::Windows::Forms::Panel());
|
|
|
97 |
this->Data = (gcnew System::Windows::Forms::Label());
|
|
|
98 |
this->panel3 = (gcnew System::Windows::Forms::Panel());
|
|
|
99 |
this->button2 = (gcnew System::Windows::Forms::Button());
|
|
|
100 |
this->button1 = (gcnew System::Windows::Forms::Button());
|
|
|
101 |
this->PanelSection2->SuspendLayout();
|
|
|
102 |
this->panel1->SuspendLayout();
|
|
|
103 |
this->panel2->SuspendLayout();
|
|
|
104 |
this->panel3->SuspendLayout();
|
|
|
105 |
this->SuspendLayout();
|
|
|
106 |
//
|
|
|
107 |
// ComboSection
|
|
|
108 |
//
|
|
|
109 |
this->ComboSection->Dock = System::Windows::Forms::DockStyle::Fill;
|
|
|
110 |
this->ComboSection->DropDownStyle = System::Windows::Forms::ComboBoxStyle::DropDownList;
|
|
|
111 |
this->ComboSection->FormattingEnabled = true;
|
|
|
112 |
this->ComboSection->Location = System::Drawing::Point(132, 0);
|
|
|
113 |
this->ComboSection->Name = L"ComboSection";
|
|
|
114 |
this->ComboSection->Size = System::Drawing::Size(382, 21);
|
|
|
115 |
this->ComboSection->TabIndex = 0;
|
|
|
116 |
//
|
|
|
117 |
// TextData
|
|
|
118 |
//
|
|
|
119 |
this->TextData->Dock = System::Windows::Forms::DockStyle::Fill;
|
|
|
120 |
this->TextData->Location = System::Drawing::Point(132, 3);
|
|
|
121 |
this->TextData->Name = L"TextData";
|
|
|
122 |
this->TextData->Size = System::Drawing::Size(379, 83);
|
|
|
123 |
this->TextData->TabIndex = 2;
|
|
|
124 |
this->TextData->Text = L"";
|
|
|
125 |
//
|
|
|
126 |
// PanelSection2
|
|
|
127 |
//
|
|
|
128 |
this->PanelSection2->Controls->Add(this->TextSection2);
|
|
|
129 |
this->PanelSection2->Controls->Add(this->label1);
|
|
|
130 |
this->PanelSection2->Dock = System::Windows::Forms::DockStyle::Top;
|
|
|
131 |
this->PanelSection2->Location = System::Drawing::Point(10, 38);
|
|
|
132 |
this->PanelSection2->Name = L"PanelSection2";
|
|
|
133 |
this->PanelSection2->Size = System::Drawing::Size(514, 28);
|
|
|
134 |
this->PanelSection2->TabIndex = 3;
|
|
|
135 |
//
|
|
|
136 |
// TextSection2
|
|
|
137 |
//
|
|
|
138 |
this->TextSection2->Dock = System::Windows::Forms::DockStyle::Fill;
|
|
|
139 |
this->TextSection2->Location = System::Drawing::Point(132, 0);
|
|
|
140 |
this->TextSection2->Name = L"TextSection2";
|
|
|
141 |
this->TextSection2->Size = System::Drawing::Size(382, 20);
|
|
|
142 |
this->TextSection2->TabIndex = 1;
|
|
|
143 |
//
|
|
|
144 |
// label1
|
|
|
145 |
//
|
|
|
146 |
this->label1->Dock = System::Windows::Forms::DockStyle::Left;
|
|
|
147 |
this->label1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 9.75F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point,
|
|
|
148 |
static_cast<System::Byte>(0)));
|
|
|
149 |
this->label1->Image = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"label1.Image")));
|
|
|
150 |
this->label1->ImageAlign = System::Drawing::ContentAlignment::MiddleRight;
|
|
|
151 |
this->label1->Location = System::Drawing::Point(0, 0);
|
|
|
152 |
this->label1->Name = L"label1";
|
|
|
153 |
this->label1->Size = System::Drawing::Size(132, 28);
|
|
|
154 |
this->label1->TabIndex = 0;
|
|
|
155 |
this->label1->Text = L"File Entry";
|
|
|
156 |
this->label1->TextAlign = System::Drawing::ContentAlignment::MiddleLeft;
|
|
|
157 |
//
|
|
|
158 |
// panel1
|
|
|
159 |
//
|
|
|
160 |
this->panel1->Controls->Add(this->ComboSection);
|
|
|
161 |
this->panel1->Controls->Add(this->label2);
|
|
|
162 |
this->panel1->Dock = System::Windows::Forms::DockStyle::Top;
|
|
|
163 |
this->panel1->Location = System::Drawing::Point(10, 10);
|
|
|
164 |
this->panel1->Name = L"panel1";
|
|
|
165 |
this->panel1->Size = System::Drawing::Size(514, 28);
|
|
|
166 |
this->panel1->TabIndex = 4;
|
|
|
167 |
//
|
|
|
168 |
// label2
|
|
|
169 |
//
|
|
|
170 |
this->label2->Dock = System::Windows::Forms::DockStyle::Left;
|
|
|
171 |
this->label2->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 9.75F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point,
|
|
|
172 |
static_cast<System::Byte>(0)));
|
|
|
173 |
this->label2->Image = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"label2.Image")));
|
|
|
174 |
this->label2->ImageAlign = System::Drawing::ContentAlignment::MiddleRight;
|
|
|
175 |
this->label2->Location = System::Drawing::Point(0, 0);
|
|
|
176 |
this->label2->Name = L"label2";
|
|
|
177 |
this->label2->Size = System::Drawing::Size(132, 28);
|
|
|
178 |
this->label2->TabIndex = 1;
|
|
|
179 |
this->label2->Text = L"Section";
|
|
|
180 |
this->label2->TextAlign = System::Drawing::ContentAlignment::MiddleLeft;
|
|
|
181 |
//
|
|
|
182 |
// panel2
|
|
|
183 |
//
|
|
|
184 |
this->panel2->Controls->Add(this->TextData);
|
|
|
185 |
this->panel2->Controls->Add(this->Data);
|
|
|
186 |
this->panel2->Dock = System::Windows::Forms::DockStyle::Fill;
|
|
|
187 |
this->panel2->Location = System::Drawing::Point(10, 66);
|
|
|
188 |
this->panel2->Name = L"panel2";
|
|
|
189 |
this->panel2->Padding = System::Windows::Forms::Padding(3);
|
|
|
190 |
this->panel2->Size = System::Drawing::Size(514, 89);
|
|
|
191 |
this->panel2->TabIndex = 5;
|
|
|
192 |
//
|
|
|
193 |
// Data
|
|
|
194 |
//
|
|
|
195 |
this->Data->Dock = System::Windows::Forms::DockStyle::Left;
|
|
|
196 |
this->Data->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 9.75F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point,
|
|
|
197 |
static_cast<System::Byte>(0)));
|
|
|
198 |
this->Data->Image = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"Data.Image")));
|
|
|
199 |
this->Data->ImageAlign = System::Drawing::ContentAlignment::MiddleRight;
|
|
|
200 |
this->Data->Location = System::Drawing::Point(3, 3);
|
|
|
201 |
this->Data->Name = L"Data";
|
|
|
202 |
this->Data->Size = System::Drawing::Size(129, 83);
|
|
|
203 |
this->Data->TabIndex = 3;
|
|
|
204 |
this->Data->Text = L"Data";
|
|
|
205 |
this->Data->TextAlign = System::Drawing::ContentAlignment::MiddleLeft;
|
|
|
206 |
//
|
|
|
207 |
// panel3
|
|
|
208 |
//
|
|
|
209 |
this->panel3->Controls->Add(this->button2);
|
|
|
210 |
this->panel3->Controls->Add(this->button1);
|
|
|
211 |
this->panel3->Dock = System::Windows::Forms::DockStyle::Bottom;
|
|
|
212 |
this->panel3->Location = System::Drawing::Point(10, 155);
|
|
|
213 |
this->panel3->Name = L"panel3";
|
|
|
214 |
this->panel3->Padding = System::Windows::Forms::Padding(10);
|
|
|
215 |
this->panel3->Size = System::Drawing::Size(514, 50);
|
|
|
216 |
this->panel3->TabIndex = 6;
|
|
|
217 |
//
|
|
|
218 |
// button2
|
|
|
219 |
//
|
|
|
220 |
this->button2->DialogResult = System::Windows::Forms::DialogResult::Cancel;
|
|
|
221 |
this->button2->Dock = System::Windows::Forms::DockStyle::Right;
|
|
|
222 |
this->button2->Location = System::Drawing::Point(285, 10);
|
|
|
223 |
this->button2->Name = L"button2";
|
|
|
224 |
this->button2->Size = System::Drawing::Size(114, 30);
|
|
|
225 |
this->button2->TabIndex = 1;
|
|
|
226 |
this->button2->Text = L"Cancel";
|
|
|
227 |
this->button2->UseVisualStyleBackColor = true;
|
|
|
228 |
//
|
|
|
229 |
// button1
|
|
|
230 |
//
|
|
|
231 |
this->button1->DialogResult = System::Windows::Forms::DialogResult::OK;
|
|
|
232 |
this->button1->Dock = System::Windows::Forms::DockStyle::Right;
|
|
|
233 |
this->button1->Location = System::Drawing::Point(399, 10);
|
|
|
234 |
this->button1->Name = L"button1";
|
|
|
235 |
this->button1->Size = System::Drawing::Size(105, 30);
|
|
|
236 |
this->button1->TabIndex = 0;
|
|
|
237 |
this->button1->Text = L"OK";
|
|
|
238 |
this->button1->UseVisualStyleBackColor = true;
|
|
|
239 |
this->button1->Click += gcnew System::EventHandler(this, &AddShipPart::button1_Click);
|
|
|
240 |
//
|
|
|
241 |
// AddShipPart
|
|
|
242 |
//
|
|
|
243 |
this->AcceptButton = this->button1;
|
|
|
244 |
this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
|
|
|
245 |
this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
|
|
|
246 |
this->CancelButton = this->button2;
|
|
|
247 |
this->ClientSize = System::Drawing::Size(534, 215);
|
|
|
248 |
this->ControlBox = false;
|
|
|
249 |
this->Controls->Add(this->panel2);
|
|
|
250 |
this->Controls->Add(this->PanelSection2);
|
|
|
251 |
this->Controls->Add(this->panel1);
|
|
|
252 |
this->Controls->Add(this->panel3);
|
|
|
253 |
this->Name = L"AddShipPart";
|
|
|
254 |
this->Padding = System::Windows::Forms::Padding(10);
|
|
|
255 |
this->StartPosition = System::Windows::Forms::FormStartPosition::CenterParent;
|
|
|
256 |
this->Text = L"AddShipPart";
|
|
|
257 |
this->TopMost = true;
|
|
|
258 |
this->Load += gcnew System::EventHandler(this, &AddShipPart::AddShipPart_Load);
|
|
|
259 |
this->PanelSection2->ResumeLayout(false);
|
|
|
260 |
this->PanelSection2->PerformLayout();
|
|
|
261 |
this->panel1->ResumeLayout(false);
|
|
|
262 |
this->panel2->ResumeLayout(false);
|
|
|
263 |
this->panel3->ResumeLayout(false);
|
|
|
264 |
this->ResumeLayout(false);
|
|
|
265 |
|
|
|
266 |
}
|
|
|
267 |
#pragma endregion
|
|
|
268 |
private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) {
|
|
|
269 |
m_sSection = this->ComboSection->Text;
|
|
|
270 |
m_sSection2 = this->TextSection2->Text;
|
|
|
271 |
m_sData = this->TextData->Text;
|
|
|
272 |
}
|
|
|
273 |
private: System::Void AddShipPart_Load(System::Object^ sender, System::EventArgs^ e) {
|
|
|
274 |
this->ComboSection->Focus();
|
|
|
275 |
}
|
|
|
276 |
};
|
|
|
277 |
}
|