Subversion Repositories spk

Rev

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

Rev Author Line No. Line
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 ImportShip
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 ImportShip : public System::Windows::Forms::Form
23
	{
24
	public:
25
		ImportShip(CPackages *p, String ^cat, String ^id)
26
		{
27
			InitializeComponent();
28
 
29
			this->Text = this->Text + " (" + id + ")";
30
 
31
			this->button1->Visible = false;
32
			this->pictureBox1->Visible = false;
33
			this->pictureBox2->Visible = false;
34
			this->pictureBox3->Visible = false;
35
			this->pictureBox4->Visible = false;
36
			this->pictureBox5->Visible = false;
37
			this->pictureBox6->Visible = false;
38
			this->pictureBox7->Visible = false;
39
			this->pictureBox8->Visible = false;
40
			this->pictureBox9->Visible = false;
41
			this->pictureBox10->Visible = false;
42
 
43
			m_bError = false;
44
			m_pPackages = p;
45
			m_sCatFile = cat;
46
			m_sID = id;
47
			m_pShip = NULL;
48
 
49
			m_pInfo = new CProgressInfoDone;
50
			m_pInfo->UpdateStatus(IMPORTSHIP_NONE);
51
			m_lModels = NULL;
52
			m_iStatus = IMPORTSHIP_SCENE;
53
		}
54
 
55
		CXspFile *GetShip() { return m_pShip; }
56
 
57
		void StartImport()
58
		{
59
			m_pShip = new CXspFile;
60
			m_pCatFile = new CCatFile;
61
			if ( m_pCatFile->Open(CyStringFromSystemString(m_sCatFile), "", CATREAD_CATDECRYPT, false) == CATERR_NONE )
62
				m_bError = false;
63
			else
64
			{
65
				delete m_pShip;
66
				m_bError = true;
67
				this->Close();
68
			}
69
 
70
			m_iStatus = IMPORTSHIP_SCENE;
71
			this->backgroundWorker1->RunWorkerAsync();
72
		}
73
 
74
		bool Error() { return m_bError; }
75
		//CyString ErrorString() { return m_sError; }
76
 
77
		void Import()
78
		{
79
			m_bError = false;
80
			if ( m_iStatus <= IMPORTSHIP_SCENE )
81
			{
82
				// make sure the id is correct
83
				CyString data = CyStringFromSystemString(m_sID);
84
				data.RemoveChar('\r');
85
				while(data.Right(1) == ";")
86
					data.Truncate((int)data.Length() - 1);
87
 
88
				m_bError = !m_pShip->StartExtractShip(m_pCatFile, data, m_pInfo);
89
 
90
				m_iStatus = IMPORTSHIP_EXTRACTSCENE;
91
			}
92
			else if ( m_iStatus == IMPORTSHIP_EXTRACTSCENE )
93
			{
94
				m_lModels = m_pShip->ReadSceneModels();
95
				if ( !m_lModels )
96
					m_bError = true;
97
				++m_iStatus;
98
			}
99
			else if ( m_iStatus == IMPORTSHIP_PACK )
100
			{
101
				m_pShip->PackAllFiles();
102
				m_iStatus = IMPORTSHIP_DONE;
103
			}
104
			else if ( m_iStatus > IMPORTSHIP_EXTRACTSCENE )
105
			{
106
				m_bError = !m_pShip->ProcessSceneFileSection(m_iStatus, m_pCatFile, m_lModels, m_pInfo);
107
				++m_iStatus;
108
			}
109
		}
110
 
111
	protected:
112
		/// <summary>
113
		/// Clean up any resources being used.
114
		/// </summary>
115
		~ImportShip()
116
		{
117
			if (components)
118
			{
119
				delete components;
120
			}
121
			delete m_pInfo;
122
			if ( m_lModels )
123
				delete m_lModels;
124
			delete m_pCatFile;
125
		}
126
 
127
	private:
128
	private: System::ComponentModel::BackgroundWorker^  backgroundWorker1;
129
	private: System::Windows::Forms::Label^  label1;
130
	private: System::Windows::Forms::Panel^  panel1;
131
	private: System::Windows::Forms::PictureBox^  pictureBox1;
132
	private: System::Windows::Forms::Panel^  panel2;
133
	private: System::Windows::Forms::PictureBox^  pictureBox2;
134
	private: System::Windows::Forms::Panel^  panel3;
135
	private: System::Windows::Forms::Label^  label11;
136
private: System::Windows::Forms::PictureBox^  pictureBox4;
137
 
138
	private: System::Windows::Forms::Panel^  panel4;
139
	private: System::Windows::Forms::Label^  label2;
140
private: System::Windows::Forms::PictureBox^  pictureBox5;
141
 
142
	private: System::Windows::Forms::Panel^  panel5;
143
	private: System::Windows::Forms::Label^  label3;
144
private: System::Windows::Forms::PictureBox^  pictureBox3;
145
 
146
 
147
	private: System::Windows::Forms::Panel^  panel6;
148
	private: System::Windows::Forms::Label^  label12;
149
	private: System::Windows::Forms::PictureBox^  pictureBox6;
150
	private: System::Windows::Forms::Panel^  panel7;
151
	private: System::Windows::Forms::Label^  label13;
152
	private: System::Windows::Forms::PictureBox^  pictureBox7;
153
	private: System::Windows::Forms::Panel^  panel8;
154
	private: System::Windows::Forms::Label^  label14;
155
	private: System::Windows::Forms::PictureBox^  pictureBox8;
156
private: System::Windows::Forms::Label^  label10;
157
private: System::Windows::Forms::Panel^  panel9;
158
private: System::Windows::Forms::Label^  label15;
159
private: System::Windows::Forms::PictureBox^  pictureBox9;
160
private: System::Windows::Forms::Panel^  panel10;
161
private: System::Windows::Forms::Label^  label4;
162
private: System::Windows::Forms::PictureBox^  pictureBox10;
163
private: System::Windows::Forms::Button^  button1;
164
private: System::Windows::Forms::Panel^  panel11;
165
	private: System::ComponentModel::IContainer^  components;
166
			 /// <summary>
167
		/// Required designer variable.
168
		/// </summary>
169
		int				 m_iStatus;
170
		bool			 m_bError;
171
		CyStringList	*m_lModels;
172
		CProgressInfo	*m_pInfo;
173
		CPackages		*m_pPackages;
174
		String			^m_sCatFile;
175
		String			^m_sID;
176
		CXspFile		*m_pShip;
177
		CCatFile		*m_pCatFile;
178
 
179
#pragma region Windows Form Designer generated code
180
		/// <summary>
181
		/// Required method for Designer support - do not modify
182
		/// the contents of this method with the code editor.
183
		/// </summary>
184
		void InitializeComponent(void)
185
		{
186
			System::ComponentModel::ComponentResourceManager^  resources = (gcnew System::ComponentModel::ComponentResourceManager(ImportShip::typeid));
187
			this->backgroundWorker1 = (gcnew System::ComponentModel::BackgroundWorker());
188
			this->label1 = (gcnew System::Windows::Forms::Label());
189
			this->panel1 = (gcnew System::Windows::Forms::Panel());
190
			this->pictureBox1 = (gcnew System::Windows::Forms::PictureBox());
191
			this->panel2 = (gcnew System::Windows::Forms::Panel());
192
			this->label10 = (gcnew System::Windows::Forms::Label());
193
			this->pictureBox2 = (gcnew System::Windows::Forms::PictureBox());
194
			this->panel3 = (gcnew System::Windows::Forms::Panel());
195
			this->label11 = (gcnew System::Windows::Forms::Label());
196
			this->pictureBox4 = (gcnew System::Windows::Forms::PictureBox());
197
			this->panel4 = (gcnew System::Windows::Forms::Panel());
198
			this->label2 = (gcnew System::Windows::Forms::Label());
199
			this->pictureBox5 = (gcnew System::Windows::Forms::PictureBox());
200
			this->panel5 = (gcnew System::Windows::Forms::Panel());
201
			this->label3 = (gcnew System::Windows::Forms::Label());
202
			this->pictureBox3 = (gcnew System::Windows::Forms::PictureBox());
203
			this->panel6 = (gcnew System::Windows::Forms::Panel());
204
			this->label12 = (gcnew System::Windows::Forms::Label());
205
			this->pictureBox6 = (gcnew System::Windows::Forms::PictureBox());
206
			this->panel7 = (gcnew System::Windows::Forms::Panel());
207
			this->label13 = (gcnew System::Windows::Forms::Label());
208
			this->pictureBox7 = (gcnew System::Windows::Forms::PictureBox());
209
			this->panel8 = (gcnew System::Windows::Forms::Panel());
210
			this->label14 = (gcnew System::Windows::Forms::Label());
211
			this->pictureBox8 = (gcnew System::Windows::Forms::PictureBox());
212
			this->panel9 = (gcnew System::Windows::Forms::Panel());
213
			this->label15 = (gcnew System::Windows::Forms::Label());
214
			this->pictureBox9 = (gcnew System::Windows::Forms::PictureBox());
215
			this->panel10 = (gcnew System::Windows::Forms::Panel());
216
			this->label4 = (gcnew System::Windows::Forms::Label());
217
			this->pictureBox10 = (gcnew System::Windows::Forms::PictureBox());
218
			this->button1 = (gcnew System::Windows::Forms::Button());
219
			this->panel11 = (gcnew System::Windows::Forms::Panel());
220
			this->panel1->SuspendLayout();
221
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->pictureBox1))->BeginInit();
222
			this->panel2->SuspendLayout();
223
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->pictureBox2))->BeginInit();
224
			this->panel3->SuspendLayout();
225
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->pictureBox4))->BeginInit();
226
			this->panel4->SuspendLayout();
227
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->pictureBox5))->BeginInit();
228
			this->panel5->SuspendLayout();
229
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->pictureBox3))->BeginInit();
230
			this->panel6->SuspendLayout();
231
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->pictureBox6))->BeginInit();
232
			this->panel7->SuspendLayout();
233
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->pictureBox7))->BeginInit();
234
			this->panel8->SuspendLayout();
235
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->pictureBox8))->BeginInit();
236
			this->panel9->SuspendLayout();
237
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->pictureBox9))->BeginInit();
238
			this->panel10->SuspendLayout();
239
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->pictureBox10))->BeginInit();
240
			this->panel11->SuspendLayout();
241
			this->SuspendLayout();
242
			// 
243
			// backgroundWorker1
244
			// 
245
			this->backgroundWorker1->DoWork += gcnew System::ComponentModel::DoWorkEventHandler(this, &ImportShip::backgroundWorker1_DoWork);
246
			this->backgroundWorker1->RunWorkerCompleted += gcnew System::ComponentModel::RunWorkerCompletedEventHandler(this, &ImportShip::backgroundWorker1_RunWorkerCompleted);
247
			// 
248
			// label1
249
			// 
250
			this->label1->Dock = System::Windows::Forms::DockStyle::Fill;
251
			this->label1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
252
				static_cast<System::Byte>(0)));
253
			this->label1->ImageAlign = System::Drawing::ContentAlignment::MiddleRight;
254
			this->label1->Location = System::Drawing::Point(0, 0);
255
			this->label1->Name = L"label1";
256
			this->label1->Size = System::Drawing::Size(365, 31);
257
			this->label1->TabIndex = 0;
258
			this->label1->Text = L"Reading Mod File";
259
			this->label1->TextAlign = System::Drawing::ContentAlignment::MiddleLeft;
260
			// 
261
			// panel1
262
			// 
263
			this->panel1->Controls->Add(this->label1);
264
			this->panel1->Controls->Add(this->pictureBox1);
265
			this->panel1->Dock = System::Windows::Forms::DockStyle::Top;
266
			this->panel1->Location = System::Drawing::Point(25, 56);
267
			this->panel1->Name = L"panel1";
268
			this->panel1->Size = System::Drawing::Size(397, 31);
269
			this->panel1->TabIndex = 9;
270
			// 
271
			// pictureBox1
272
			// 
273
			this->pictureBox1->Dock = System::Windows::Forms::DockStyle::Right;
274
			this->pictureBox1->Image = (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"pictureBox1.Image")));
275
			this->pictureBox1->Location = System::Drawing::Point(365, 0);
276
			this->pictureBox1->Name = L"pictureBox1";
277
			this->pictureBox1->Size = System::Drawing::Size(32, 31);
278
			this->pictureBox1->SizeMode = System::Windows::Forms::PictureBoxSizeMode::StretchImage;
279
			this->pictureBox1->TabIndex = 1;
280
			this->pictureBox1->TabStop = false;
281
			// 
282
			// panel2
283
			// 
284
			this->panel2->Controls->Add(this->label10);
285
			this->panel2->Controls->Add(this->pictureBox2);
286
			this->panel2->Dock = System::Windows::Forms::DockStyle::Top;
287
			this->panel2->Location = System::Drawing::Point(25, 25);
288
			this->panel2->Name = L"panel2";
289
			this->panel2->Size = System::Drawing::Size(397, 31);
290
			this->panel2->TabIndex = 10;
291
			// 
292
			// label10
293
			// 
294
			this->label10->Dock = System::Windows::Forms::DockStyle::Fill;
295
			this->label10->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
296
				static_cast<System::Byte>(0)));
297
			this->label10->ImageAlign = System::Drawing::ContentAlignment::MiddleRight;
298
			this->label10->Location = System::Drawing::Point(0, 0);
299
			this->label10->Name = L"label10";
300
			this->label10->Size = System::Drawing::Size(365, 31);
301
			this->label10->TabIndex = 0;
302
			this->label10->Text = L"Extracting Scene File";
303
			this->label10->TextAlign = System::Drawing::ContentAlignment::MiddleLeft;
304
			// 
305
			// pictureBox2
306
			// 
307
			this->pictureBox2->Dock = System::Windows::Forms::DockStyle::Right;
308
			this->pictureBox2->Image = (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"pictureBox2.Image")));
309
			this->pictureBox2->Location = System::Drawing::Point(365, 0);
310
			this->pictureBox2->Name = L"pictureBox2";
311
			this->pictureBox2->Size = System::Drawing::Size(32, 31);
312
			this->pictureBox2->SizeMode = System::Windows::Forms::PictureBoxSizeMode::StretchImage;
313
			this->pictureBox2->TabIndex = 1;
314
			this->pictureBox2->TabStop = false;
315
			// 
316
			// panel3
317
			// 
318
			this->panel3->Controls->Add(this->label11);
319
			this->panel3->Controls->Add(this->pictureBox4);
320
			this->panel3->Dock = System::Windows::Forms::DockStyle::Top;
321
			this->panel3->Location = System::Drawing::Point(25, 118);
322
			this->panel3->Name = L"panel3";
323
			this->panel3->Size = System::Drawing::Size(397, 31);
324
			this->panel3->TabIndex = 11;
325
			// 
326
			// label11
327
			// 
328
			this->label11->Dock = System::Windows::Forms::DockStyle::Fill;
329
			this->label11->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
330
				static_cast<System::Byte>(0)));
331
			this->label11->ImageAlign = System::Drawing::ContentAlignment::MiddleRight;
332
			this->label11->Location = System::Drawing::Point(0, 0);
333
			this->label11->Name = L"label11";
334
			this->label11->Size = System::Drawing::Size(365, 31);
335
			this->label11->TabIndex = 0;
336
			this->label11->Text = L"Extracting Componants";
337
			this->label11->TextAlign = System::Drawing::ContentAlignment::MiddleLeft;
338
			// 
339
			// pictureBox4
340
			// 
341
			this->pictureBox4->Dock = System::Windows::Forms::DockStyle::Right;
342
			this->pictureBox4->Image = (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"pictureBox4.Image")));
343
			this->pictureBox4->Location = System::Drawing::Point(365, 0);
344
			this->pictureBox4->Name = L"pictureBox4";
345
			this->pictureBox4->Size = System::Drawing::Size(32, 31);
346
			this->pictureBox4->SizeMode = System::Windows::Forms::PictureBoxSizeMode::StretchImage;
347
			this->pictureBox4->TabIndex = 1;
348
			this->pictureBox4->TabStop = false;
349
			// 
350
			// panel4
351
			// 
352
			this->panel4->Controls->Add(this->label2);
353
			this->panel4->Controls->Add(this->pictureBox5);
354
			this->panel4->Dock = System::Windows::Forms::DockStyle::Top;
355
			this->panel4->Location = System::Drawing::Point(25, 149);
356
			this->panel4->Name = L"panel4";
357
			this->panel4->Size = System::Drawing::Size(397, 31);
358
			this->panel4->TabIndex = 12;
359
			// 
360
			// label2
361
			// 
362
			this->label2->Dock = System::Windows::Forms::DockStyle::Fill;
363
			this->label2->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
364
				static_cast<System::Byte>(0)));
365
			this->label2->ImageAlign = System::Drawing::ContentAlignment::MiddleRight;
366
			this->label2->Location = System::Drawing::Point(0, 0);
367
			this->label2->Name = L"label2";
368
			this->label2->Size = System::Drawing::Size(365, 31);
369
			this->label2->TabIndex = 0;
370
			this->label2->Text = L"Extracting Models";
371
			this->label2->TextAlign = System::Drawing::ContentAlignment::MiddleLeft;
372
			// 
373
			// pictureBox5
374
			// 
375
			this->pictureBox5->Dock = System::Windows::Forms::DockStyle::Right;
376
			this->pictureBox5->Image = (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"pictureBox5.Image")));
377
			this->pictureBox5->Location = System::Drawing::Point(365, 0);
378
			this->pictureBox5->Name = L"pictureBox5";
379
			this->pictureBox5->Size = System::Drawing::Size(32, 31);
380
			this->pictureBox5->SizeMode = System::Windows::Forms::PictureBoxSizeMode::StretchImage;
381
			this->pictureBox5->TabIndex = 1;
382
			this->pictureBox5->TabStop = false;
383
			// 
384
			// panel5
385
			// 
386
			this->panel5->Controls->Add(this->label3);
387
			this->panel5->Controls->Add(this->pictureBox3);
388
			this->panel5->Dock = System::Windows::Forms::DockStyle::Top;
389
			this->panel5->Location = System::Drawing::Point(25, 87);
390
			this->panel5->Name = L"panel5";
391
			this->panel5->Size = System::Drawing::Size(397, 31);
392
			this->panel5->TabIndex = 13;
393
			// 
394
			// label3
395
			// 
396
			this->label3->Dock = System::Windows::Forms::DockStyle::Fill;
397
			this->label3->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
398
				static_cast<System::Byte>(0)));
399
			this->label3->ImageAlign = System::Drawing::ContentAlignment::MiddleRight;
400
			this->label3->Location = System::Drawing::Point(0, 0);
401
			this->label3->Name = L"label3";
402
			this->label3->Size = System::Drawing::Size(365, 31);
403
			this->label3->TabIndex = 0;
404
			this->label3->Text = L"Extracting Dummy Entries";
405
			this->label3->TextAlign = System::Drawing::ContentAlignment::MiddleLeft;
406
			// 
407
			// pictureBox3
408
			// 
409
			this->pictureBox3->Dock = System::Windows::Forms::DockStyle::Right;
410
			this->pictureBox3->Image = (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"pictureBox3.Image")));
411
			this->pictureBox3->Location = System::Drawing::Point(365, 0);
412
			this->pictureBox3->Name = L"pictureBox3";
413
			this->pictureBox3->Size = System::Drawing::Size(32, 31);
414
			this->pictureBox3->SizeMode = System::Windows::Forms::PictureBoxSizeMode::StretchImage;
415
			this->pictureBox3->TabIndex = 1;
416
			this->pictureBox3->TabStop = false;
417
			// 
418
			// panel6
419
			// 
420
			this->panel6->Controls->Add(this->label12);
421
			this->panel6->Controls->Add(this->pictureBox6);
422
			this->panel6->Dock = System::Windows::Forms::DockStyle::Top;
423
			this->panel6->Location = System::Drawing::Point(25, 180);
424
			this->panel6->Name = L"panel6";
425
			this->panel6->Size = System::Drawing::Size(397, 31);
426
			this->panel6->TabIndex = 14;
427
			// 
428
			// label12
429
			// 
430
			this->label12->Dock = System::Windows::Forms::DockStyle::Fill;
431
			this->label12->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
432
				static_cast<System::Byte>(0)));
433
			this->label12->ImageAlign = System::Drawing::ContentAlignment::MiddleRight;
434
			this->label12->Location = System::Drawing::Point(0, 0);
435
			this->label12->Name = L"label12";
436
			this->label12->Size = System::Drawing::Size(365, 31);
437
			this->label12->TabIndex = 0;
438
			this->label12->Text = L"Extracting Textures";
439
			this->label12->TextAlign = System::Drawing::ContentAlignment::MiddleLeft;
440
			// 
441
			// pictureBox6
442
			// 
443
			this->pictureBox6->Dock = System::Windows::Forms::DockStyle::Right;
444
			this->pictureBox6->Image = (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"pictureBox6.Image")));
445
			this->pictureBox6->Location = System::Drawing::Point(365, 0);
446
			this->pictureBox6->Name = L"pictureBox6";
447
			this->pictureBox6->Size = System::Drawing::Size(32, 31);
448
			this->pictureBox6->SizeMode = System::Windows::Forms::PictureBoxSizeMode::StretchImage;
449
			this->pictureBox6->TabIndex = 1;
450
			this->pictureBox6->TabStop = false;
451
			// 
452
			// panel7
453
			// 
454
			this->panel7->Controls->Add(this->label13);
455
			this->panel7->Controls->Add(this->pictureBox7);
456
			this->panel7->Dock = System::Windows::Forms::DockStyle::Top;
457
			this->panel7->Location = System::Drawing::Point(25, 211);
458
			this->panel7->Name = L"panel7";
459
			this->panel7->Size = System::Drawing::Size(397, 31);
460
			this->panel7->TabIndex = 15;
461
			// 
462
			// label13
463
			// 
464
			this->label13->Dock = System::Windows::Forms::DockStyle::Fill;
465
			this->label13->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
466
				static_cast<System::Byte>(0)));
467
			this->label13->ImageAlign = System::Drawing::ContentAlignment::MiddleRight;
468
			this->label13->Location = System::Drawing::Point(0, 0);
469
			this->label13->Name = L"label13";
470
			this->label13->Size = System::Drawing::Size(365, 31);
471
			this->label13->TabIndex = 0;
472
			this->label13->Text = L"Extracting Texts";
473
			this->label13->TextAlign = System::Drawing::ContentAlignment::MiddleLeft;
474
			// 
475
			// pictureBox7
476
			// 
477
			this->pictureBox7->Dock = System::Windows::Forms::DockStyle::Right;
478
			this->pictureBox7->Image = (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"pictureBox7.Image")));
479
			this->pictureBox7->Location = System::Drawing::Point(365, 0);
480
			this->pictureBox7->Name = L"pictureBox7";
481
			this->pictureBox7->Size = System::Drawing::Size(32, 31);
482
			this->pictureBox7->SizeMode = System::Windows::Forms::PictureBoxSizeMode::StretchImage;
483
			this->pictureBox7->TabIndex = 1;
484
			this->pictureBox7->TabStop = false;
485
			// 
486
			// panel8
487
			// 
488
			this->panel8->Controls->Add(this->label14);
489
			this->panel8->Controls->Add(this->pictureBox8);
490
			this->panel8->Dock = System::Windows::Forms::DockStyle::Top;
491
			this->panel8->Location = System::Drawing::Point(25, 242);
492
			this->panel8->Name = L"panel8";
493
			this->panel8->Size = System::Drawing::Size(397, 31);
494
			this->panel8->TabIndex = 16;
495
			// 
496
			// label14
497
			// 
498
			this->label14->Dock = System::Windows::Forms::DockStyle::Fill;
499
			this->label14->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
500
				static_cast<System::Byte>(0)));
501
			this->label14->ImageAlign = System::Drawing::ContentAlignment::MiddleRight;
502
			this->label14->Location = System::Drawing::Point(0, 0);
503
			this->label14->Name = L"label14";
504
			this->label14->Size = System::Drawing::Size(365, 31);
505
			this->label14->TabIndex = 0;
506
			this->label14->Text = L"Extracting Bodies";
507
			this->label14->TextAlign = System::Drawing::ContentAlignment::MiddleLeft;
508
			// 
509
			// pictureBox8
510
			// 
511
			this->pictureBox8->Dock = System::Windows::Forms::DockStyle::Right;
512
			this->pictureBox8->Image = (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"pictureBox8.Image")));
513
			this->pictureBox8->Location = System::Drawing::Point(365, 0);
514
			this->pictureBox8->Name = L"pictureBox8";
515
			this->pictureBox8->Size = System::Drawing::Size(32, 31);
516
			this->pictureBox8->SizeMode = System::Windows::Forms::PictureBoxSizeMode::StretchImage;
517
			this->pictureBox8->TabIndex = 1;
518
			this->pictureBox8->TabStop = false;
519
			// 
520
			// panel9
521
			// 
522
			this->panel9->Controls->Add(this->label15);
523
			this->panel9->Controls->Add(this->pictureBox9);
524
			this->panel9->Dock = System::Windows::Forms::DockStyle::Top;
525
			this->panel9->Location = System::Drawing::Point(25, 273);
526
			this->panel9->Name = L"panel9";
527
			this->panel9->Size = System::Drawing::Size(397, 31);
528
			this->panel9->TabIndex = 17;
529
			// 
530
			// label15
531
			// 
532
			this->label15->Dock = System::Windows::Forms::DockStyle::Fill;
533
			this->label15->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
534
				static_cast<System::Byte>(0)));
535
			this->label15->ImageAlign = System::Drawing::ContentAlignment::MiddleRight;
536
			this->label15->Location = System::Drawing::Point(0, 0);
537
			this->label15->Name = L"label15";
538
			this->label15->Size = System::Drawing::Size(365, 31);
539
			this->label15->TabIndex = 0;
540
			this->label15->Text = L"Extracting Cockpits";
541
			this->label15->TextAlign = System::Drawing::ContentAlignment::MiddleLeft;
542
			// 
543
			// pictureBox9
544
			// 
545
			this->pictureBox9->Dock = System::Windows::Forms::DockStyle::Right;
546
			this->pictureBox9->Image = (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"pictureBox9.Image")));
547
			this->pictureBox9->Location = System::Drawing::Point(365, 0);
548
			this->pictureBox9->Name = L"pictureBox9";
549
			this->pictureBox9->Size = System::Drawing::Size(32, 31);
550
			this->pictureBox9->SizeMode = System::Windows::Forms::PictureBoxSizeMode::StretchImage;
551
			this->pictureBox9->TabIndex = 1;
552
			this->pictureBox9->TabStop = false;
553
			// 
554
			// panel10
555
			// 
556
			this->panel10->Controls->Add(this->label4);
557
			this->panel10->Controls->Add(this->pictureBox10);
558
			this->panel10->Dock = System::Windows::Forms::DockStyle::Top;
559
			this->panel10->Location = System::Drawing::Point(25, 304);
560
			this->panel10->Name = L"panel10";
561
			this->panel10->Size = System::Drawing::Size(397, 31);
562
			this->panel10->TabIndex = 18;
563
			// 
564
			// label4
565
			// 
566
			this->label4->Dock = System::Windows::Forms::DockStyle::Fill;
567
			this->label4->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
568
				static_cast<System::Byte>(0)));
569
			this->label4->ImageAlign = System::Drawing::ContentAlignment::MiddleRight;
570
			this->label4->Location = System::Drawing::Point(0, 0);
571
			this->label4->Name = L"label4";
572
			this->label4->Size = System::Drawing::Size(365, 31);
573
			this->label4->TabIndex = 0;
574
			this->label4->Text = L"Packing up Files";
575
			this->label4->TextAlign = System::Drawing::ContentAlignment::MiddleLeft;
576
			// 
577
			// pictureBox10
578
			// 
579
			this->pictureBox10->Dock = System::Windows::Forms::DockStyle::Right;
580
			this->pictureBox10->Image = (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"pictureBox10.Image")));
581
			this->pictureBox10->Location = System::Drawing::Point(365, 0);
582
			this->pictureBox10->Name = L"pictureBox10";
583
			this->pictureBox10->Size = System::Drawing::Size(32, 31);
584
			this->pictureBox10->SizeMode = System::Windows::Forms::PictureBoxSizeMode::StretchImage;
585
			this->pictureBox10->TabIndex = 1;
586
			this->pictureBox10->TabStop = false;
587
			// 
588
			// button1
589
			// 
590
			this->button1->DialogResult = System::Windows::Forms::DialogResult::OK;
591
			this->button1->Dock = System::Windows::Forms::DockStyle::Fill;
592
			this->button1->Location = System::Drawing::Point(50, 10);
593
			this->button1->Name = L"button1";
594
			this->button1->Size = System::Drawing::Size(297, 29);
595
			this->button1->TabIndex = 19;
596
			this->button1->Text = L"Done";
597
			this->button1->UseVisualStyleBackColor = true;
598
			// 
599
			// panel11
600
			// 
601
			this->panel11->Controls->Add(this->button1);
602
			this->panel11->Dock = System::Windows::Forms::DockStyle::Fill;
603
			this->panel11->Location = System::Drawing::Point(25, 335);
604
			this->panel11->Name = L"panel11";
605
			this->panel11->Padding = System::Windows::Forms::Padding(50, 10, 50, 10);
606
			this->panel11->Size = System::Drawing::Size(397, 49);
607
			this->panel11->TabIndex = 20;
608
			// 
609
			// ImportShip
610
			// 
611
			this->AcceptButton = this->button1;
612
			this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
613
			this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
614
			this->ClientSize = System::Drawing::Size(447, 409);
615
			this->ControlBox = false;
616
			this->Controls->Add(this->panel11);
617
			this->Controls->Add(this->panel10);
618
			this->Controls->Add(this->panel9);
619
			this->Controls->Add(this->panel8);
620
			this->Controls->Add(this->panel7);
621
			this->Controls->Add(this->panel6);
622
			this->Controls->Add(this->panel4);
623
			this->Controls->Add(this->panel3);
624
			this->Controls->Add(this->panel5);
625
			this->Controls->Add(this->panel1);
626
			this->Controls->Add(this->panel2);
627
			this->Name = L"ImportShip";
628
			this->Padding = System::Windows::Forms::Padding(25);
629
			this->StartPosition = System::Windows::Forms::FormStartPosition::CenterParent;
630
			this->Text = L"Importing Ship";
631
			this->Load += gcnew System::EventHandler(this, &ImportShip::ImportShip_Load);
632
			this->panel1->ResumeLayout(false);
633
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->pictureBox1))->EndInit();
634
			this->panel2->ResumeLayout(false);
635
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->pictureBox2))->EndInit();
636
			this->panel3->ResumeLayout(false);
637
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->pictureBox4))->EndInit();
638
			this->panel4->ResumeLayout(false);
639
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->pictureBox5))->EndInit();
640
			this->panel5->ResumeLayout(false);
641
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->pictureBox3))->EndInit();
642
			this->panel6->ResumeLayout(false);
643
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->pictureBox6))->EndInit();
644
			this->panel7->ResumeLayout(false);
645
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->pictureBox7))->EndInit();
646
			this->panel8->ResumeLayout(false);
647
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->pictureBox8))->EndInit();
648
			this->panel9->ResumeLayout(false);
649
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->pictureBox9))->EndInit();
650
			this->panel10->ResumeLayout(false);
651
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->pictureBox10))->EndInit();
652
			this->panel11->ResumeLayout(false);
653
			this->ResumeLayout(false);
654
 
655
		}
656
#pragma endregion
657
	private: System::Void ImportShip_Load(System::Object^  sender, System::EventArgs^  e) {
658
				 this->StartImport();
659
			 }
660
	private: System::Void backgroundWorker1_DoWork(System::Object^  sender, System::ComponentModel::DoWorkEventArgs^  e) {
661
				 System::Threading::Thread::Sleep(100);
662
				 this->Import();
663
			 }
664
	private: System::Void backgroundWorker1_RunWorkerCompleted(System::Object^  sender, System::ComponentModel::RunWorkerCompletedEventArgs^  e) {
665
				 if ( m_bError )
666
				 {
667
					 this->Close();
668
					 return;
669
				 }
670
 
671
				 if ( m_iStatus > IMPORTSHIP_SCENE )
672
					 this->pictureBox2->Visible = true;
673
				 if ( m_iStatus > IMPORTSHIP_EXTRACTSCENE )
674
					 this->pictureBox1->Visible = true;
675
				 if ( m_iStatus > IMPORTSHIP_DUMMIES )
676
					 this->pictureBox3->Visible = true;
677
				 if ( m_iStatus > IMPORTSHIP_COMPONANT )
678
					 this->pictureBox4->Visible = true;
679
				 if ( m_iStatus > IMPORTSHIP_MODELS )
680
					 this->pictureBox5->Visible = true;
681
				 if ( m_iStatus > IMPORTSHIP_TEXTURES )
682
					 this->pictureBox6->Visible = true;
683
				 if ( m_iStatus > IMPORTSHIP_TEXTS )
684
					 this->pictureBox7->Visible = true;
685
				 if ( m_iStatus > IMPORTSHIP_BODIES )
686
					 this->pictureBox8->Visible = true;
687
				 if ( m_iStatus > IMPORTSHIP_COCKPITS )
688
					 this->pictureBox9->Visible = true;
689
				 if ( m_iStatus > IMPORTSHIP_PACK )
690
					 this->pictureBox10->Visible = true;
691
 
692
				 if ( m_iStatus < IMPORTSHIP_DONE )
693
					 this->backgroundWorker1->RunWorkerAsync();
694
				 else
695
					 this->button1->Visible = true;
696
			 }
697
};
698
}