Subversion Repositories spk

Rev

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

Rev 130 Rev 131
Line 7... Line 7...
7
#include "SaveDialog.h"
7
#include "SaveDialog.h"
8
 
8
 
9
#include <Package/InstallText.h>
9
#include <Package/InstallText.h>
10
 
10
 
11
namespace Creator {
11
namespace Creator {
12
	PackageForm::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) 
12
	void PackageForm::_init() 
13
		: BaseForm(parent, ctrl, page, tool, p, imagelist, set),
-
 
14
		_addGameItem(nullptr),
-
 
15
		_removeGameItem(nullptr)
-
 
16
	{
13
	{
17
		InitializeComponent();
-
 
18
		this->LabelShipWarning->Visible = false;
14
		this->LabelShipWarning->Visible = false;
19
		this->TextExactVersion->Visible = false;
15
		this->TextExactVersion->Visible = false;
20
		this->DoToolTips();
16
		this->DoToolTips();
21
 
17
 
22
		this->ListDep->LargeImageList = this->imageList1;
18
		this->ListDep->LargeImageList = this->imageList1;
23
		this->ListDep->SmallImageList = this->imageList1;
19
		this->ListDep->SmallImageList = this->imageList1;
24
 
20
 
25
		m_pSettings = set;
-
 
26
		m_iFormType = FORMTYPE_SINGLE;
21
		m_iFormType = FORMTYPE_SINGLE;
27
		m_pDisplayFile = NULL;
22
		m_pDisplayFile = NULL;
28
 
23
 
29
		this->NumTextID->Visible = false;
24
		this->NumTextID->Visible = false;
30
 
25
 
Line 52... Line 47...
52
			delete m_pPackage;
47
			delete m_pPackage;
53
		if (_pPackages)
48
		if (_pPackages)
54
			delete _pPackages;
49
			delete _pPackages;
55
	}
50
	}
56
 
51
 
-
 
52
	void PackageForm::SetImageLists(ImageList ^smallList, ImageList ^largeList, ImageList ^gameList, ImageList ^fileList)
-
 
53
	{
-
 
54
		BaseForm::SetImageLists(smallList, largeList, gameList);
-
 
55
 
-
 
56
		this->ListGames->SmallImageList = this->imageListGames;
-
 
57
		this->ListGames->LargeImageList = this->imageListGames;
-
 
58
		this->ListNames->SmallImageList = this->imageListSmall;
-
 
59
		this->ListMirrors->SmallImageList = this->imageListSmall;
-
 
60
		this->ListWares->SmallImageList = this->imageListSmall;
-
 
61
		this->ListWareText->SmallImageList = this->imageListSmall;
-
 
62
		this->ListShipText->SmallImageList = this->imageListSmall;
-
 
63
		this->ListShipPart->SmallImageList = this->imageListSmall;
-
 
64
 
-
 
65
		this->ListNames->LargeImageList = this->imageListLarge;
-
 
66
		this->ListMirrors->LargeImageList = this->imageListLarge;
-
 
67
		this->ListWares->LargeImageList = this->imageListLarge;
-
 
68
		this->ListWareText->LargeImageList = this->imageListLarge;
-
 
69
		this->ListShipText->LargeImageList = this->imageListLarge;
-
 
70
		this->ListShipPart->LargeImageList = this->imageListLarge;
-
 
71
 
-
 
72
		this->ButGame->ImageList = this->imageListGames;
-
 
73
 
-
 
74
		this->imageListFiles = fileList;
-
 
75
		this->ListFiles->LargeImageList = this->imageListFiles;
-
 
76
		this->ListFiles->SmallImageList = this->imageListFiles;
57
 
77
 
-
 
78
		this->Setup();
-
 
79
	}
-
 
80
	   
58
	bool PackageForm::LoadPackage(CBaseFile *base, System::String ^filename)
81
	bool PackageForm::LoadPackage(CBaseFile *base, System::String ^filename)
59
	{
82
	{
60
		m_sFilename = filename;
83
		m_sFilename = filename;
61
 
84
 
62
		if ( !base )
85
		if ( !base )
Line 146... Line 169...
146
	}
169
	}
147
 
170
 
148
	void PackageForm::UpdateScriptType()
171
	void PackageForm::UpdateScriptType()
149
	{
172
	{
150
		if ( this->ComboType->SelectedIndex == CSpkFile::SCRIPTTYPE_CUSTOM )
173
		if ( this->ComboType->SelectedIndex == CSpkFile::SCRIPTTYPE_CUSTOM )
151
		{
174
		{
152
			this->TextCustomType->Visible = true;
175
			this->TextCustomType->Visible = true;
153
			this->ComboType->Dock = Windows::Forms::DockStyle::Left;
176
			this->ComboType->Dock = Windows::Forms::DockStyle::Left;
154
			if ( !m_bLoading )
177
			if ( !m_bLoading )
155
				((CSpkFile *)m_pPackage)->SetScriptType(CyStringFromSystemString(this->TextCustomType->Text).ToString());
178
				((CSpkFile *)m_pPackage)->SetScriptType(CyStringFromSystemString(this->TextCustomType->Text).ToString());
156
		 }
179
		 }
Line 193... Line 216...
193
			if ( iLang <= 0 ) continue;
216
			if ( iLang <= 0 ) continue;
194
			this->ListLang->Items->Add(System::Convert::ToString(iLang));
217
			this->ListLang->Items->Add(System::Convert::ToString(iLang));
195
		}
218
		}
196
 
219
 
197
		if ( selected == -1 )
220
		if ( selected == -1 )
198
			this->ListLang->SelectedIndex = 0;
221
			this->ListLang->SelectedIndex = 0;
199
		else
222
		else
200
			this->ListLang->Text = Convert::ToString(selected);
223
			this->ListLang->Text = Convert::ToString(selected);
201
 
224
 
202
		if ( this->ListLang->SelectedIndex == -1 )
225
		if ( this->ListLang->SelectedIndex == -1 )
203
			this->ListLang->SelectedIndex = 0;
226
			this->ListLang->SelectedIndex = 0;
Line 430... Line 453...
430
				this->CreationDate->Value = DateTime::Today;
453
				this->CreationDate->Value = DateTime::Today;
431
			}
454
			}
432
		}
455
		}
433
		else
456
		else
434
			this->CreationDate->Value = DateTime::Today;
457
			this->CreationDate->Value = DateTime::Today;
-
 
458
 
-
 
459
		this->CreationDate->Checked = true;
435
 
460
 
436
		this->TextForum->Text = _US(m_pPackage->forumLink());
461
		this->TextForum->Text = _US(m_pPackage->forumLink());
437
		this->TextEmail->Text = _US(m_pPackage->email());
462
		this->TextEmail->Text = _US(m_pPackage->email());
438
		this->TextWebsite->Text = _US(m_pPackage->webSite());
463
		this->TextWebsite->Text = _US(m_pPackage->webSite());
439
		this->TextWebAddress->Text = _US(m_pPackage->webAddress());
464
		this->TextWebAddress->Text = _US(m_pPackage->webAddress());