Subversion Repositories spk

Rev

Rev 237 | Rev 248 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 237 Rev 238
Line 23... Line 23...
23
#include "CustomiseShip.h"
23
#include "CustomiseShip.h"
24
#include "SelectGame.h"
24
#include "SelectGame.h"
25
 
25
 
26
#undef GetTempPath
26
#undef GetTempPath
27
 
27
 
28
#define DESIGNER
-
 
29
 
28
 
30
namespace Creator {
29
namespace Creator {
31
	/// <summary>
30
	/// <summary>
32
	/// Summary for PackageForm
31
	/// Summary for PackageForm
33
	///
32
	///
Line 36... Line 35...
36
	///          associated with all .resx files this class depends on.  Otherwise,
35
	///          associated with all .resx files this class depends on.  Otherwise,
37
	///          the designers will not be able to interact properly with localized
36
	///          the designers will not be able to interact properly with localized
38
	///          resources associated with this form.
37
	///          resources associated with this form.
39
	/// </summary>
38
	/// </summary>
40
	/// 
39
	/// 
-
 
40
	
-
 
41
	/*
41
	public ref class PackageForm : public System::Windows::Forms::Form
42
	public ref class PackageForm : public System::Windows::Forms::Form
-
 
43
	#define DESIGNER
-
 
44
	*/
42
 
45
 
43
		/*
46
		
44
#ifdef DESIGNER
47
#ifdef DESIGNER
45
	public ref class PackageForm : public System::Windows::Forms::Form
48
	public ref class PackageForm : public System::Windows::Forms::Form
46
#else
49
#else
47
	public ref class PackageForm : public Creator::BaseForm
50
	public ref class PackageForm : public Creator::BaseForm
48
#endif	
51
#endif	
49
*/
52
 
50
	{
53
	{
51
	public:
54
	public:
52
		PackageForm(System::Windows::Forms::Form ^parent, System::Windows::Forms::TabControl ^ctrl, System::Windows::Forms::TabPage ^page, System::Windows::Forms::ToolStripMenuItem ^tool, CPackages *p, Windows::Forms::ImageList ^imagelist, SSettings *set)			
55
		PackageForm(System::Windows::Forms::Form ^parent, System::Windows::Forms::TabControl ^ctrl, System::Windows::Forms::TabPage ^page, System::Windows::Forms::ToolStripMenuItem ^tool, CPackages *p, Windows::Forms::ImageList ^imagelist, SSettings *set)			
53
#ifndef DESIGNER
56
#ifndef DESIGNER
54
			: BaseForm(parent, ctrl, page, tool, p, imagelist, set),
57
			: BaseForm(parent, ctrl, page, tool, p, imagelist, set),
Line 1434... Line 1437...
1434
			this->panel21->Name = L"panel21";
1437
			this->panel21->Name = L"panel21";
1435
			this->panel21->Size = System::Drawing::Size(518, 43);
1438
			this->panel21->Size = System::Drawing::Size(518, 43);
1436
			this->panel21->TabIndex = 44;
1439
			this->panel21->TabIndex = 44;
1437
			// 
1440
			// 
1438
			// ComboVersion
1441
			// ComboVersion
1439
			// 
1442
			// 
1440
			this->ComboVersion->Dock = System::Windows::Forms::DockStyle::Fill;
1443
			this->ComboVersion->Dock = System::Windows::Forms::DockStyle::Fill;
1441
			this->ComboVersion->DropDownStyle = System::Windows::Forms::ComboBoxStyle::DropDownList;
1444
			this->ComboVersion->DropDownStyle = System::Windows::Forms::ComboBoxStyle::DropDownList;
1442
			this->ComboVersion->Enabled = false;
1445
			this->ComboVersion->Enabled = false;
1443
			this->ComboVersion->FormattingEnabled = true;
1446
			this->ComboVersion->FormattingEnabled = true;
1444
			this->ComboVersion->Location = System::Drawing::Point(0, 0);
1447
			this->ComboVersion->Location = System::Drawing::Point(0, 0);
Line 3423... Line 3426...
3423
			this->tabGlobals->Text = L"Globals";
3426
			this->tabGlobals->Text = L"Globals";
3424
			this->tabGlobals->UseVisualStyleBackColor = true;
3427
			this->tabGlobals->UseVisualStyleBackColor = true;
3425
			// 
3428
			// 
3426
			// butGlobalClear
3429
			// butGlobalClear
3427
			// 
3430
			// 
-
 
3431
			this->butGlobalClear->Dock = System::Windows::Forms::DockStyle::Right;
3428
			this->butGlobalClear->Image = (cli::safe_cast<System::Drawing::Image^>(resources->GetObject(L"butGlobalClear.Image")));
3432
			this->butGlobalClear->Image = (cli::safe_cast<System::Drawing::Image^>(resources->GetObject(L"butGlobalClear.Image")));
3429
			this->butGlobalClear->Location = System::Drawing::Point(621, 156);
3433
			this->butGlobalClear->Location = System::Drawing::Point(624, 156);
3430
			this->butGlobalClear->Name = L"butGlobalClear";
3434
			this->butGlobalClear->Name = L"butGlobalClear";
3431
			this->butGlobalClear->Size = System::Drawing::Size(121, 36);
3435
			this->butGlobalClear->Size = System::Drawing::Size(121, 39);
3432
			this->butGlobalClear->TabIndex = 2;
3436
			this->butGlobalClear->TabIndex = 2;
3433
			this->butGlobalClear->Text = L"Clear All";
3437
			this->butGlobalClear->Text = L"Clear All";
3434
			this->butGlobalClear->TextImageRelation = System::Windows::Forms::TextImageRelation::ImageBeforeText;
3438
			this->butGlobalClear->TextImageRelation = System::Windows::Forms::TextImageRelation::ImageBeforeText;
3435
			this->butGlobalClear->UseVisualStyleBackColor = true;
3439
			this->butGlobalClear->UseVisualStyleBackColor = true;
3436
			this->butGlobalClear->Click += gcnew System::EventHandler(this, &PackageForm::butGlobalClear_Click);
3440
			this->butGlobalClear->Click += gcnew System::EventHandler(this, &PackageForm::butGlobalClear_Click);
3437
			// 
3441
			// 
3438
			// butAddGlobal
3442
			// butAddGlobal
3439
			// 
3443
			// 
-
 
3444
			this->butAddGlobal->Dock = System::Windows::Forms::DockStyle::Left;
3440
			this->butAddGlobal->Image = (cli::safe_cast<System::Drawing::Image^>(resources->GetObject(L"butAddGlobal.Image")));
3445
			this->butAddGlobal->Image = (cli::safe_cast<System::Drawing::Image^>(resources->GetObject(L"butAddGlobal.Image")));
3441
			this->butAddGlobal->Location = System::Drawing::Point(6, 156);
3446
			this->butAddGlobal->Location = System::Drawing::Point(3, 156);
3442
			this->butAddGlobal->Name = L"butAddGlobal";
3447
			this->butAddGlobal->Name = L"butAddGlobal";
3443
			this->butAddGlobal->Size = System::Drawing::Size(121, 36);
3448
			this->butAddGlobal->Size = System::Drawing::Size(121, 39);
3444
			this->butAddGlobal->TabIndex = 1;
3449
			this->butAddGlobal->TabIndex = 1;
3445
			this->butAddGlobal->Text = L"Add New";
3450
			this->butAddGlobal->Text = L"Add New";
3446
			this->butAddGlobal->TextImageRelation = System::Windows::Forms::TextImageRelation::ImageBeforeText;
3451
			this->butAddGlobal->TextImageRelation = System::Windows::Forms::TextImageRelation::ImageBeforeText;
3447
			this->butAddGlobal->UseVisualStyleBackColor = true;
3452
			this->butAddGlobal->UseVisualStyleBackColor = true;
3448
			this->butAddGlobal->Click += gcnew System::EventHandler(this, &PackageForm::butAddGlobal_Click);
3453
			this->butAddGlobal->Click += gcnew System::EventHandler(this, &PackageForm::butAddGlobal_Click);
Line 3452... Line 3457...
3452
			this->listGlobals->Columns->AddRange(gcnew cli::array< System::Windows::Forms::ColumnHeader^  >(2) {
3457
			this->listGlobals->Columns->AddRange(gcnew cli::array< System::Windows::Forms::ColumnHeader^  >(2) {
3453
				this->ColGlobalName,
3458
				this->ColGlobalName,
3454
					this->ColGlobalValue
3459
					this->ColGlobalValue
3455
			});
3460
			});
3456
			this->listGlobals->ContextMenuStrip = this->contextGlobal;
3461
			this->listGlobals->ContextMenuStrip = this->contextGlobal;
-
 
3462
			this->listGlobals->Dock = System::Windows::Forms::DockStyle::Top;
-
 
3463
			this->listGlobals->FullRowSelect = true;
3457
			this->listGlobals->HideSelection = false;
3464
			this->listGlobals->HideSelection = false;
3458
			this->listGlobals->Location = System::Drawing::Point(6, 6);
3465
			this->listGlobals->Location = System::Drawing::Point(3, 3);
-
 
3466
			this->listGlobals->Margin = System::Windows::Forms::Padding(10);
-
 
3467
			this->listGlobals->MultiSelect = false;
3459
			this->listGlobals->Name = L"listGlobals";
3468
			this->listGlobals->Name = L"listGlobals";
3460
			this->listGlobals->Size = System::Drawing::Size(736, 144);
3469
			this->listGlobals->Size = System::Drawing::Size(742, 153);
3461
			this->listGlobals->TabIndex = 0;
3470
			this->listGlobals->TabIndex = 0;
3462
			this->listGlobals->UseCompatibleStateImageBehavior = false;
3471
			this->listGlobals->UseCompatibleStateImageBehavior = false;
3463
			this->listGlobals->View = System::Windows::Forms::View::Details;
3472
			this->listGlobals->View = System::Windows::Forms::View::Details;
3464
			// 
3473
			// 
3465
			// ColGlobalName
3474
			// ColGlobalName
Line 3477... Line 3486...
3477
				this->addNewToolStripMenuItem,
3486
				this->addNewToolStripMenuItem,
3478
					this->toolStripSeparator6, this->editSelectedToolStripMenuItem1, this->removeSelectedToolStripMenuItem, this->toolStripSeparator7,
3487
					this->toolStripSeparator6, this->editSelectedToolStripMenuItem1, this->removeSelectedToolStripMenuItem, this->toolStripSeparator7,
3479
					this->clearAllToolStripMenuItem2
3488
					this->clearAllToolStripMenuItem2
3480
			});
3489
			});
3481
			this->contextGlobal->Name = L"contextGlobal";
3490
			this->contextGlobal->Name = L"contextGlobal";
3482
			this->contextGlobal->Size = System::Drawing::Size(169, 120);
3491
			this->contextGlobal->Size = System::Drawing::Size(185, 142);
-
 
3492
			this->contextGlobal->Opening += gcnew System::ComponentModel::CancelEventHandler(this, &PackageForm::contextGlobal_Opening);
3483
			// 
3493
			// 
3484
			// addNewToolStripMenuItem
3494
			// addNewToolStripMenuItem
3485
			// 
3495
			// 
3486
			this->addNewToolStripMenuItem->Image = (cli::safe_cast<System::Drawing::Image^>(resources->GetObject(L"addNewToolStripMenuItem.Image")));
3496
			this->addNewToolStripMenuItem->Image = (cli::safe_cast<System::Drawing::Image^>(resources->GetObject(L"addNewToolStripMenuItem.Image")));
3487
			this->addNewToolStripMenuItem->Name = L"addNewToolStripMenuItem";
3497
			this->addNewToolStripMenuItem->Name = L"addNewToolStripMenuItem";
3488
			this->addNewToolStripMenuItem->Size = System::Drawing::Size(168, 26);
3498
			this->addNewToolStripMenuItem->Size = System::Drawing::Size(184, 26);
3489
			this->addNewToolStripMenuItem->Text = L"Add New";
3499
			this->addNewToolStripMenuItem->Text = L"Add New";
-
 
3500
			this->addNewToolStripMenuItem->Click += gcnew System::EventHandler(this, &PackageForm::addNewToolStripMenuItem_Click);
3490
			// 
3501
			// 
3491
			// toolStripSeparator6
3502
			// toolStripSeparator6
3492
			// 
3503
			// 
3493
			this->toolStripSeparator6->Name = L"toolStripSeparator6";
3504
			this->toolStripSeparator6->Name = L"toolStripSeparator6";
3494
			this->toolStripSeparator6->Size = System::Drawing::Size(165, 6);
3505
			this->toolStripSeparator6->Size = System::Drawing::Size(181, 6);
3495
			// 
3506
			// 
3496
			// editSelectedToolStripMenuItem1
3507
			// editSelectedToolStripMenuItem1
3497
			// 
3508
			// 
3498
			this->editSelectedToolStripMenuItem1->Image = (cli::safe_cast<System::Drawing::Image^>(resources->GetObject(L"editSelectedToolStripMenuItem1.Image")));
3509
			this->editSelectedToolStripMenuItem1->Image = (cli::safe_cast<System::Drawing::Image^>(resources->GetObject(L"editSelectedToolStripMenuItem1.Image")));
3499
			this->editSelectedToolStripMenuItem1->Name = L"editSelectedToolStripMenuItem1";
3510
			this->editSelectedToolStripMenuItem1->Name = L"editSelectedToolStripMenuItem1";
3500
			this->editSelectedToolStripMenuItem1->Size = System::Drawing::Size(168, 26);
3511
			this->editSelectedToolStripMenuItem1->Size = System::Drawing::Size(184, 26);
3501
			this->editSelectedToolStripMenuItem1->Text = L"Edit Selected";
3512
			this->editSelectedToolStripMenuItem1->Text = L"Edit Selected";
-
 
3513
			this->editSelectedToolStripMenuItem1->Click += gcnew System::EventHandler(this, &PackageForm::editSelectedToolStripMenuItem1_Click);
3502
			// 
3514
			// 
3503
			// removeSelectedToolStripMenuItem
3515
			// removeSelectedToolStripMenuItem
3504
			// 
3516
			// 
3505
			this->removeSelectedToolStripMenuItem->Image = (cli::safe_cast<System::Drawing::Image^>(resources->GetObject(L"removeSelectedToolStripMenuItem.Image")));
3517
			this->removeSelectedToolStripMenuItem->Image = (cli::safe_cast<System::Drawing::Image^>(resources->GetObject(L"removeSelectedToolStripMenuItem.Image")));
3506
			this->removeSelectedToolStripMenuItem->Name = L"removeSelectedToolStripMenuItem";
3518
			this->removeSelectedToolStripMenuItem->Name = L"removeSelectedToolStripMenuItem";
3507
			this->removeSelectedToolStripMenuItem->Size = System::Drawing::Size(168, 26);
3519
			this->removeSelectedToolStripMenuItem->Size = System::Drawing::Size(184, 26);
3508
			this->removeSelectedToolStripMenuItem->Text = L"Remove Selected";
3520
			this->removeSelectedToolStripMenuItem->Text = L"Remove Selected";
-
 
3521
			this->removeSelectedToolStripMenuItem->Click += gcnew System::EventHandler(this, &PackageForm::removeSelectedToolStripMenuItem_Click);
3509
			// 
3522
			// 
3510
			// toolStripSeparator7
3523
			// toolStripSeparator7
3511
			// 
3524
			// 
3512
			this->toolStripSeparator7->Name = L"toolStripSeparator7";
3525
			this->toolStripSeparator7->Name = L"toolStripSeparator7";
3513
			this->toolStripSeparator7->Size = System::Drawing::Size(165, 6);
3526
			this->toolStripSeparator7->Size = System::Drawing::Size(181, 6);
3514
			// 
3527
			// 
3515
			// clearAllToolStripMenuItem2
3528
			// clearAllToolStripMenuItem2
3516
			// 
3529
			// 
3517
			this->clearAllToolStripMenuItem2->Image = (cli::safe_cast<System::Drawing::Image^>(resources->GetObject(L"clearAllToolStripMenuItem2.Image")));
3530
			this->clearAllToolStripMenuItem2->Image = (cli::safe_cast<System::Drawing::Image^>(resources->GetObject(L"clearAllToolStripMenuItem2.Image")));
3518
			this->clearAllToolStripMenuItem2->Name = L"clearAllToolStripMenuItem2";
3531
			this->clearAllToolStripMenuItem2->Name = L"clearAllToolStripMenuItem2";
3519
			this->clearAllToolStripMenuItem2->Size = System::Drawing::Size(168, 26);
3532
			this->clearAllToolStripMenuItem2->Size = System::Drawing::Size(184, 26);
3520
			this->clearAllToolStripMenuItem2->Text = L"Clear All";
3533
			this->clearAllToolStripMenuItem2->Text = L"Clear All";
-
 
3534
			this->clearAllToolStripMenuItem2->Click += gcnew System::EventHandler(this, &PackageForm::clearAllToolStripMenuItem2_Click);
3521
			// 
3535
			// 
3522
			// CheckShipID
3536
			// CheckShipID
3523
			// 
3537
			// 
3524
			this->CheckShipID->AutoSize = true;
3538
			this->CheckShipID->AutoSize = true;
3525
			this->CheckShipID->Dock = System::Windows::Forms::DockStyle::Left;
3539
			this->CheckShipID->Dock = System::Windows::Forms::DockStyle::Left;
Line 4227... Line 4241...
4227
			 this->UpdatePackageNames();
4241
			 this->UpdatePackageNames();
4228
			 this->UpdateChanged();
4242
			 this->UpdateChanged();
4229
		 }
4243
		 }
4230
private: System::Void addToolStripMenuItem_Click(System::Object^  sender, System::EventArgs^  e) {
4244
private: System::Void addToolStripMenuItem_Click(System::Object^  sender, System::EventArgs^  e) {
4231
			 InputBox ^input = gcnew InputBox("Enter the language id (ie 44)", "");
4245
			 InputBox ^input = gcnew InputBox("Enter the language id (ie 44)", "");
4232
			if ( input->ShowDialog(this) == System::Windows::Forms::DialogResult::OK )
4246
			if ( input->ShowDialog(this) == System::Windows::Forms::DialogResult::OK )
4233
			{
4247
			{
4234
				InputBox ^input2 = gcnew InputBox("Enter the package name (Language: " + input->GetInput() + ")", "");
4248
				InputBox ^input2 = gcnew InputBox("Enter the package name (Language: " + input->GetInput() + ")", "");
4235
				if ( input2->ShowDialog(this) == System::Windows::Forms::DialogResult::OK )
4249
				if ( input2->ShowDialog(this) == System::Windows::Forms::DialogResult::OK )
4236
				{
4250
				{
4237
					m_pPackage->addName(Convert::ToInt32(input->GetInput()), _WS(input2->GetInput()));
4251
					m_pPackage->addName(Convert::ToInt32(input->GetInput()), _WS(input2->GetInput()));
Line 4311... Line 4325...
4311
			 this->UpdateChanged();
4325
			 this->UpdateChanged();
4312
			 this->UpdateRatings();
4326
			 this->UpdateRatings();
4313
		 }
4327
		 }
4314
private: System::Void PicEase5_Click(System::Object^  sender, System::EventArgs^  e) {
4328
private: System::Void PicEase5_Click(System::Object^  sender, System::EventArgs^  e) {
4315
			 m_pPackage->setEaseOfUse(5);
4329
			 m_pPackage->setEaseOfUse(5);
4316
			 this->UpdateChanged();
4330
			 this->UpdateChanged();
4317
			 this->UpdateRatings();
4331
			 this->UpdateRatings();
4318
		 }
4332
		 }
4319
private: System::Void PicRec1_Click(System::Object^  sender, System::EventArgs^  e) {
4333
private: System::Void PicRec1_Click(System::Object^  sender, System::EventArgs^  e) {
4320
			 m_pPackage->setRecommended(1);
4334
			 m_pPackage->setRecommended(1);
4321
			 this->UpdateChanged();
4335
			 this->UpdateChanged();
4322
			 this->UpdateRatings();
4336
			 this->UpdateRatings();
4323
		 }
4337
		 }
Line 4480... Line 4494...
4480
				 if ( aw->GetID()->Length < 1 )
4494
				 if ( aw->GetID()->Length < 1 )
4481
					 MessageBox::Show(this, "Invalid ware ID, entry cant be empty", "Invalid Entry", MessageBoxButtons::OK, MessageBoxIcon::Warning);
4495
					 MessageBox::Show(this, "Invalid ware ID, entry cant be empty", "Invalid Entry", MessageBoxButtons::OK, MessageBoxIcon::Warning);
4482
				 else
4496
				 else
4483
				 {
4497
				 {
4484
					 SWares *w = new SWares;
4498
					 SWares *w = new SWares;
4485
					 w->iTextID = aw->GetTextID();
4499
					 w->iTextID = aw->GetTextID();
4486
					 w->iTextPage = aw->GetTextPage();
4500
					 w->iTextPage = aw->GetTextPage();
4487
					 w->cType = CPackages::ConvertWareTypeBack(aw->GetType());
4501
					 w->cType = CPackages::ConvertWareTypeBack(aw->GetType());
4488
					 w->iNotority = aw->GetMinNotoriety();
4502
					 w->iNotority = aw->GetMinNotoriety();
4489
					 w->iPrice = aw->GetPrice();
4503
					 w->iPrice = aw->GetPrice();
4490
					 w->iVolumn = aw->GetVolumn();
4504
					 w->iVolumn = aw->GetVolumn();
4491
					 w->iSize = aw->GetSize();
4505
					 w->iSize = aw->GetSize();
4492
					 w->sID = _WS(aw->GetID());
4506
					 w->sID = _WS(aw->GetID());
4493
					 ((CSpkFile *)m_pPackage)->addWare(w);
4507
					 ((CSpkFile *)m_pPackage)->addWare(w);
4494
					 this->UpdateWares();
4508
					 this->UpdateWares();
4495
				 }
4509
				 }
4496
			 }
4510
			 }
Line 4744... Line 4758...
4744
			 this->UpdateChanged();
4758
			 this->UpdateChanged();
4745
		 }
4759
		 }
4746
private: System::Void CheckSYArgon_CheckedChanged(System::Object^  sender, System::EventArgs^  e) {
4760
private: System::Void CheckSYArgon_CheckedChanged(System::Object^  sender, System::EventArgs^  e) {
4747
			 if ( !m_bLoading )
4761
			 if ( !m_bLoading )
4748
				((CXspFile *)m_pPackage)->SetShipyard(SHIPYARD_ARGON, this->CheckSYArgon->Checked);
4762
				((CXspFile *)m_pPackage)->SetShipyard(SHIPYARD_ARGON, this->CheckSYArgon->Checked);
4749
			 this->UpdateChanged();
4763
			 this->UpdateChanged();
4750
		 }
4764
		 }
4751
private: System::Void CheckSYBoron_CheckedChanged(System::Object^  sender, System::EventArgs^  e) {
4765
private: System::Void CheckSYBoron_CheckedChanged(System::Object^  sender, System::EventArgs^  e) {
4752
			 if ( !m_bLoading )
4766
			 if ( !m_bLoading )
4753
				((CXspFile *)m_pPackage)->SetShipyard(SHIPYARD_BORON, this->CheckSYBoron->Checked);
4767
				((CXspFile *)m_pPackage)->SetShipyard(SHIPYARD_BORON, this->CheckSYBoron->Checked);
4754
			 this->UpdateChanged();
4768
			 this->UpdateChanged();
4755
		 }
4769
		 }
Line 4919... Line 4933...
4919
				if ( input->ShowDialog(this) == System::Windows::Forms::DialogResult::OK )
4933
				if ( input->ShowDialog(this) == System::Windows::Forms::DialogResult::OK )
4920
				{
4934
				{
4921
					m_pPackage->removeWebMirror(_WS(item->Text));
4935
					m_pPackage->removeWebMirror(_WS(item->Text));
4922
					m_pPackage->addWebMirror(_WS(input->GetInput()));
4936
					m_pPackage->addWebMirror(_WS(input->GetInput()));
4923
					item->Text = input->GetInput();
4937
					item->Text = input->GetInput();
4924
					this->UpdateChanged();
4938
					this->UpdateChanged();
4925
				}
4939
				}
4926
			 }
4940
			 }
4927
		 }
4941
		 }
4928
private: System::Void ListWares_MouseDoubleClick(System::Object^  sender, System::Windows::Forms::MouseEventArgs^  e) {
4942
private: System::Void ListWares_MouseDoubleClick(System::Object^  sender, System::Windows::Forms::MouseEventArgs^  e) {
4929
			 if ( this->ListWares->Items->Count )
4943
			 if ( this->ListWares->Items->Count )
4930
			 {
4944
			 {
4931
				 ListViewItem ^item = this->ListWares->SelectedItems[0];
4945
				 ListViewItem ^item = this->ListWares->SelectedItems[0];
4932
				 SWares *w = ((CSpkFile *)m_pPackage)->findWare(_WS(item->Text));
4946
				 SWares *w = ((CSpkFile *)m_pPackage)->findWare(_WS(item->Text));
Line 4951... Line 4965...
4951
						 w->iVolumn = aw->GetVolumn();
4965
						 w->iVolumn = aw->GetVolumn();
4952
						 w->iSize = aw->GetSize();
4966
						 w->iSize = aw->GetSize();
4953
						 w->iTextID = aw->GetTextID();
4967
						 w->iTextID = aw->GetTextID();
4954
						 w->iTextPage = aw->GetTextPage();
4968
						 w->iTextPage = aw->GetTextPage();
4955
						 this->UpdateWares();
4969
						 this->UpdateWares();
4956
						 this->UpdateChanged();
4970
						 this->UpdateChanged();
4957
					 }
4971
					 }
4958
				 }
4972
				 }
4959
			 }
4973
			 }
4960
		 }
4974
		 }
4961
private: System::Void ListWareText_MouseDoubleClick(System::Object^  sender, System::Windows::Forms::MouseEventArgs^  e) {
4975
private: System::Void ListWareText_MouseDoubleClick(System::Object^  sender, System::Windows::Forms::MouseEventArgs^  e) {
4962
			 if ( this->ListWareText->Items->Count )
4976
			 if ( this->ListWareText->Items->Count )
4963
			 {
4977
			 {
4964
				 ListViewItem ^item = this->ListWareText->SelectedItems[0];
4978
				 ListViewItem ^item = this->ListWareText->SelectedItems[0];
4965
				 SWares *w = ((CSpkFile *)m_pPackage)->findWare(_WS(this->ListWares->SelectedItems[0]->Text));
4979
				 SWares *w = ((CSpkFile *)m_pPackage)->findWare(_WS(this->ListWares->SelectedItems[0]->Text));
Line 5009... Line 5023...
5009
			}
5023
			}
5010
		}
5024
		}
5011
private: System::Void ContextShipPart_Opening(System::Object^  sender, System::ComponentModel::CancelEventArgs^  e) {
5025
private: System::Void ContextShipPart_Opening(System::Object^  sender, System::ComponentModel::CancelEventArgs^  e) {
5012
			 Point ^mousePoint = this->ListShipPart->PointToClient(this->ContextShipPart->MousePosition);
5026
			 Point ^mousePoint = this->ListShipPart->PointToClient(this->ContextShipPart->MousePosition);
5013
			ListViewItem ^item = this->ListShipPart->GetItemAt(mousePoint->X, mousePoint->Y);
5027
			ListViewItem ^item = this->ListShipPart->GetItemAt(mousePoint->X, mousePoint->Y);
5014
 
5028
 
5015
			this->ContextShipPartEdit->Visible = (item) ? true : false;
5029
			this->ContextShipPartEdit->Visible = (item) ? true : false;
5016
			this->ContextShipPartSep1->Visible = (item) ? true : false;
5030
			this->ContextShipPartSep1->Visible = (item) ? true : false;
5017
			this->ContextShipPartRemove->Visible = (item) ? true : false;
5031
			this->ContextShipPartRemove->Visible = (item) ? true : false;
5018
 
5032
 
5019
			this->ContextShipPartClear->Visible = (this->ListShipPart->Items->Count) ? true : false;
5033
			this->ContextShipPartClear->Visible = (this->ListShipPart->Items->Count) ? true : false;
Line 5270... Line 5284...
5270
				this->UpdateShipText();
5284
				this->UpdateShipText();
5271
				this->UpdateChanged();
5285
				this->UpdateChanged();
5272
			}
5286
			}
5273
		 }
5287
		 }
5274
private: System::Void fromDirectoryToolStripMenuItem_Click(System::Object^  sender, System::EventArgs^  e) {
5288
private: System::Void fromDirectoryToolStripMenuItem_Click(System::Object^  sender, System::EventArgs^  e) {
5275
				FolderBrowserDialog ^fbd = gcnew FolderBrowserDialog;
5289
				FolderBrowserDialog ^fbd = gcnew FolderBrowserDialog;
5276
				fbd->Description = "Select the path to load text files from";
5290
				fbd->Description = "Select the path to load text files from";
5277
				if ( fbd->ShowDialog(this) == System::Windows::Forms::DialogResult::OK )
5291
				if ( fbd->ShowDialog(this) == System::Windows::Forms::DialogResult::OK )
5278
				{
5292
				{
5279
					bool added = false;
5293
					bool added = false;
5280
					array <System::String ^> ^Files = System::IO::Directory::GetFiles(fbd->SelectedPath, "*.xml");
5294
					array <System::String ^> ^Files = System::IO::Directory::GetFiles(fbd->SelectedPath, "*.xml");
Line 5618... Line 5632...
5618
		}
5632
		}
5619
private: System::Void butGlobalClear_Click(System::Object^ sender, System::EventArgs^ e) {
5633
private: System::Void butGlobalClear_Click(System::Object^ sender, System::EventArgs^ e) {
5620
			m_pPackage->clearGlobals();
5634
			m_pPackage->clearGlobals();
5621
			this->UpdateGlobals();
5635
			this->UpdateGlobals();
5622
			this->UpdateChanged();
5636
			this->UpdateChanged();
-
 
5637
		}
-
 
5638
private: System::Void addNewToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) {
-
 
5639
			this->AddNewGlobal();
-
 
5640
		}
-
 
5641
private: System::Void editSelectedToolStripMenuItem1_Click(System::Object^ sender, System::EventArgs^ e) {
-
 
5642
			this->EditGlobal();
-
 
5643
		}
-
 
5644
private: System::Void removeSelectedToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) {
-
 
5645
			m_pPackage->removeGlobal(_WS(m_pSelectedItem->Text));
-
 
5646
			this->UpdateGlobals();
-
 
5647
			this->UpdateChanged();
-
 
5648
		}
-
 
5649
private: System::Void clearAllToolStripMenuItem2_Click(System::Object^ sender, System::EventArgs^ e) {
-
 
5650
			m_pPackage->clearGlobals();
-
 
5651
			this->UpdateGlobals();
-
 
5652
			this->UpdateChanged();
-
 
5653
		}
-
 
5654
private: System::Void contextGlobal_Opening(System::Object^ sender, System::ComponentModel::CancelEventArgs^ e) {
-
 
5655
			Point^ mousePoint = this->listGlobals->PointToClient(this->contextGlobal->MousePosition);
-
 
5656
			ListViewItem^ item = this->listGlobals->GetItemAt(mousePoint->X, mousePoint->Y);
-
 
5657
 
-
 
5658
			this->editSelectedToolStripMenuItem1->Visible = (item) ? true : false;
-
 
5659
			this->removeSelectedToolStripMenuItem->Visible = (item) ? true : false;
-
 
5660
			this->toolStripSeparator6->Visible = (item) ? true : false;
-
 
5661
 
-
 
5662
			bool clear = (this->listGlobals->Items->Count) ? true : false;
-
 
5663
 
-
 
5664
			this->clearAllToolStripMenuItem2->Visible = clear;
-
 
5665
			this->toolStripSeparator7->Visible = clear;
-
 
5666
 
-
 
5667
			m_pSelectedItem = item;
-
 
5668
			e->Cancel = false;
5623
		}
5669
		}
5624
};
5670
};
5625
}
5671
}