Subversion Repositories spk

Rev

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