| Line 4003... |
Line 4003... |
| 4003 |
{
|
4003 |
{
|
| 4004 |
this->TextExactVersion->Visible = false;
|
4004 |
this->TextExactVersion->Visible = false;
|
| 4005 |
}
|
4005 |
}
|
| 4006 |
}
|
4006 |
}
|
| 4007 |
private: System::Void TextWebsite_TextChanged(System::Object^ sender, System::EventArgs^ e) {
|
4007 |
private: System::Void TextWebsite_TextChanged(System::Object^ sender, System::EventArgs^ e) {
|
| 4008 |
if ( !m_bLoading )
|
- |
|
| 4009 |
m_pPackage->SetWebSite(CyStringFromSystemString(this->TextWebsite->Text));
|
4008 |
if ( !m_bLoading ) m_pPackage->setWebSite(_S(this->TextWebsite->Text));
|
| 4010 |
this->UpdateChanged();
|
4009 |
this->UpdateChanged();
|
| 4011 |
}
|
4010 |
}
|
| 4012 |
private: System::Void TextEmail_TextChanged(System::Object^ sender, System::EventArgs^ e) {
|
4011 |
private: System::Void TextEmail_TextChanged(System::Object^ sender, System::EventArgs^ e) {
|
| 4013 |
if ( !m_bLoading )
|
- |
|
| 4014 |
m_pPackage->SetEmail(CyStringFromSystemString(this->TextEmail->Text));
|
4012 |
if ( !m_bLoading ) m_pPackage->setEmail(_S(this->TextEmail->Text));
|
| 4015 |
this->UpdateChanged();
|
4013 |
this->UpdateChanged();
|
| 4016 |
}
|
4014 |
}
|
| 4017 |
private: System::Void TextForum_TextChanged(System::Object^ sender, System::EventArgs^ e) {
|
4015 |
private: System::Void TextForum_TextChanged(System::Object^ sender, System::EventArgs^ e) {
|
| 4018 |
if ( !m_bLoading )
|
- |
|
| 4019 |
m_pPackage->SetForumLink(CyStringFromSystemString(this->TextForum->Text));
|
4016 |
if ( !m_bLoading ) m_pPackage->setForumLink(_S(this->TextForum->Text));
|
| 4020 |
this->UpdateChanged();
|
4017 |
this->UpdateChanged();
|
| 4021 |
}
|
4018 |
}
|
| 4022 |
private: System::Void ButFromFile_Click(System::Object^ sender, System::EventArgs^ e) {
|
4019 |
private: System::Void ButFromFile_Click(System::Object^ sender, System::EventArgs^ e) {
|
| 4023 |
OpenFileDialog ^ofd = gcnew OpenFileDialog();
|
4020 |
OpenFileDialog ^ofd = gcnew OpenFileDialog();
|
| 4024 |
ofd->Filter = "Package Files (*.spk)|*.spk";
|
4021 |
ofd->Filter = "Package Files (*.spk)|*.spk";
|
| Line 4060... |
Line 4057... |
| 4060 |
this->UpdateChanged();
|
4057 |
this->UpdateChanged();
|
| 4061 |
}
|
4058 |
}
|
| 4062 |
private: System::Void ContextMirror_Opening(System::Object^ sender, System::ComponentModel::CancelEventArgs^ e) {
|
4059 |
private: System::Void ContextMirror_Opening(System::Object^ sender, System::ComponentModel::CancelEventArgs^ e) {
|
| 4063 |
Point ^mousePoint = this->ListMirrors->PointToClient(this->ContextMirror->MousePosition);
|
4060 |
Point ^mousePoint = this->ListMirrors->PointToClient(this->ContextMirror->MousePosition);
|
| 4064 |
ListViewItem ^item = this->ListMirrors->GetItemAt(mousePoint->X, mousePoint->Y);
|
4061 |
ListViewItem ^item = this->ListMirrors->GetItemAt(mousePoint->X, mousePoint->Y);
|
| 4065 |
if ( item )
|
4062 |
if ( item )
|
| 4066 |
{
|
4063 |
{
|
| 4067 |
this->ContextRemoveMirror->Visible = true;
|
4064 |
this->ContextRemoveMirror->Visible = true;
|
| 4068 |
this->ContextRemoveMirror->Text = "Remove: " + item->Text;
|
4065 |
this->ContextRemoveMirror->Text = "Remove: " + item->Text;
|
| 4069 |
}
|
4066 |
}
|
| 4070 |
else
|
4067 |
else
|
| 4071 |
this->ContextRemoveMirror->Visible = false;
|
4068 |
this->ContextRemoveMirror->Visible = false;
|
| Line 4077... |
Line 4074... |
| 4077 |
this->UpdateMirrors();
|
4074 |
this->UpdateMirrors();
|
| 4078 |
this->UpdateChanged();
|
4075 |
this->UpdateChanged();
|
| 4079 |
}
|
4076 |
}
|
| 4080 |
private: System::Void addMirrorToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) {
|
4077 |
private: System::Void addMirrorToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) {
|
| 4081 |
InputBox ^input = gcnew InputBox("Enter the web address to add", "http://");
|
4078 |
InputBox ^input = gcnew InputBox("Enter the web address to add", "http://");
|
| 4082 |
if ( input->ShowDialog(this) == System::Windows::Forms::DialogResult::OK )
|
4079 |
if ( input->ShowDialog(this) == System::Windows::Forms::DialogResult::OK )
|
| 4083 |
{
|
4080 |
{
|
| 4084 |
m_pPackage->AddWebMirror(CyStringFromSystemString(input->GetInput()));
|
4081 |
m_pPackage->AddWebMirror(CyStringFromSystemString(input->GetInput()));
|
| 4085 |
this->UpdateChanged();
|
4082 |
this->UpdateChanged();
|
| 4086 |
this->UpdateMirrors();
|
4083 |
this->UpdateMirrors();
|
| 4087 |
}
|
4084 |
}
|
| 4088 |
}
|
4085 |
}
|
| Line 4147... |
Line 4144... |
| 4147 |
m_pSelectedItem->SubItems[1]->Text = input->GetInput();
|
4144 |
m_pSelectedItem->SubItems[1]->Text = input->GetInput();
|
| 4148 |
this->UpdateChanged();
|
4145 |
this->UpdateChanged();
|
| 4149 |
}
|
4146 |
}
|
| 4150 |
}
|
4147 |
}
|
| 4151 |
private: System::Void ButPicAdd_Click(System::Object^ sender, System::EventArgs^ e) {
|
4148 |
private: System::Void ButPicAdd_Click(System::Object^ sender, System::EventArgs^ e) {
|
| 4152 |
this->AddDisplayPic();
|
4149 |
this->AddDisplayPic();
|
| 4153 |
}
|
4150 |
}
|
| 4154 |
private: System::Void ButPicDel_Click(System::Object^ sender, System::EventArgs^ e) {
|
4151 |
private: System::Void ButPicDel_Click(System::Object^ sender, System::EventArgs^ e) {
|
| 4155 |
if ( m_pDisplayFile )
|
4152 |
if ( m_pDisplayFile )
|
| 4156 |
{
|
4153 |
{
|
| 4157 |
C_File *oldFile = m_pDisplayFile;
|
4154 |
C_File *oldFile = m_pDisplayFile;
|
| Line 4424... |
Line 4421... |
| 4424 |
this->ContextWTEdit->Visible = (item) ? true : false;
|
4421 |
this->ContextWTEdit->Visible = (item) ? true : false;
|
| 4425 |
this->ContextWTSep1->Visible = (item) ? true : false;
|
4422 |
this->ContextWTSep1->Visible = (item) ? true : false;
|
| 4426 |
this->ContextWTRemove->Visible = (item) ? true : false;
|
4423 |
this->ContextWTRemove->Visible = (item) ? true : false;
|
| 4427 |
|
4424 |
|
| 4428 |
if ( this->ListWareText->Items->Count )
|
4425 |
if ( this->ListWareText->Items->Count )
|
| 4429 |
{
|
4426 |
{
|
| 4430 |
this->ContextWTClear->Visible = true;
|
4427 |
this->ContextWTClear->Visible = true;
|
| 4431 |
this->ContextWTSep2->Visible = true;
|
4428 |
this->ContextWTSep2->Visible = true;
|
| 4432 |
}
|
4429 |
}
|
| 4433 |
else
|
4430 |
else
|
| 4434 |
{
|
4431 |
{
|
| Line 4449... |
Line 4446... |
| 4449 |
this->UpdateWareText();
|
4446 |
this->UpdateWareText();
|
| 4450 |
}
|
4447 |
}
|
| 4451 |
}
|
4448 |
}
|
| 4452 |
}
|
4449 |
}
|
| 4453 |
private: System::Void addTextToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) {
|
4450 |
private: System::Void addTextToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) {
|
| 4454 |
SWares *w = ((CSpkFile *)m_pPackage)->FindWare(CyStringFromSystemString(this->ListWares->SelectedItems[0]->Text).ToString());
|
4451 |
SWares *w = ((CSpkFile *)m_pPackage)->FindWare(CyStringFromSystemString(this->ListWares->SelectedItems[0]->Text).ToString());
|
| 4455 |
if ( w )
|
4452 |
if ( w )
|
| 4456 |
{
|
4453 |
{
|
| 4457 |
AddWareText ^wt = gcnew AddWareText(SystemStringFromCyString(w->sID));
|
4454 |
AddWareText ^wt = gcnew AddWareText(SystemStringFromCyString(w->sID));
|
| 4458 |
if ( wt->ShowDialog(this) == System::Windows::Forms::DialogResult::OK )
|
4455 |
if ( wt->ShowDialog(this) == System::Windows::Forms::DialogResult::OK )
|
| 4459 |
{
|
4456 |
{
|
| 4460 |
((CSpkFile *)m_pPackage)->AddWareText(w, wt->GetLang(), CyStringFromSystemString(wt->GetName()).ToString(), CyStringFromSystemString(wt->GetDescription()).ToString());
|
4457 |
((CSpkFile *)m_pPackage)->AddWareText(w, wt->GetLang(), CyStringFromSystemString(wt->GetName()).ToString(), CyStringFromSystemString(wt->GetDescription()).ToString());
|
| 4461 |
this->UpdateWareText();
|
4458 |
this->UpdateWareText();
|
| 4462 |
}
|
4459 |
}
|
| 4463 |
}
|
4460 |
}
|
| 4464 |
}
|
4461 |
}
|
| 4465 |
|
4462 |
|
| 4466 |
private: System::Void ContextWTEdit_Click(System::Object^ sender, System::EventArgs^ e) {
|
4463 |
private: System::Void ContextWTEdit_Click(System::Object^ sender, System::EventArgs^ e) {
|
| 4467 |
SWares *w = ((CSpkFile *)m_pPackage)->FindWare(CyStringFromSystemString(this->ListWares->SelectedItems[0]->Text).ToString());
|
4464 |
SWares *w = ((CSpkFile *)m_pPackage)->FindWare(CyStringFromSystemString(this->ListWares->SelectedItems[0]->Text).ToString());
|
| 4468 |
if ( w )
|
4465 |
if ( w )
|
| Line 4474... |
Line 4471... |
| 4474 |
if ( wt->ShowDialog(this) == System::Windows::Forms::DialogResult::OK )
|
4471 |
if ( wt->ShowDialog(this) == System::Windows::Forms::DialogResult::OK )
|
| 4475 |
{
|
4472 |
{
|
| 4476 |
((CSpkFile *)m_pPackage)->AddWareText(w, wt->GetLang(), CyStringFromSystemString(wt->GetName()).ToString(), CyStringFromSystemString(wt->GetDescription()).ToString());
|
4473 |
((CSpkFile *)m_pPackage)->AddWareText(w, wt->GetLang(), CyStringFromSystemString(wt->GetName()).ToString(), CyStringFromSystemString(wt->GetDescription()).ToString());
|
| 4477 |
this->UpdateWareText();
|
4474 |
this->UpdateWareText();
|
| 4478 |
}
|
4475 |
}
|
| 4479 |
}
|
4476 |
}
|
| 4480 |
}
|
4477 |
}
|
| 4481 |
private: System::Void ContextWTRemove_Click(System::Object^ sender, System::EventArgs^ e) {
|
4478 |
private: System::Void ContextWTRemove_Click(System::Object^ sender, System::EventArgs^ e) {
|
| 4482 |
if ( this->ListWareText->SelectedItems->Count )
|
4479 |
if ( this->ListWareText->SelectedItems->Count )
|
| 4483 |
{
|
4480 |
{
|
| 4484 |
for ( int i = 0; i < this->ListWareText->SelectedItems->Count; i++ )
|
4481 |
for ( int i = 0; i < this->ListWareText->SelectedItems->Count; i++ )
|
| 4485 |
((CSpkFile *)m_pPackage)->RemoveWareText(CyStringFromSystemString(this->ListWares->SelectedItems[0]->Text).ToString(), System::Convert::ToInt32(this->ListWareText->SelectedItems[i]->Text));
|
4482 |
((CSpkFile *)m_pPackage)->RemoveWareText(CyStringFromSystemString(this->ListWares->SelectedItems[0]->Text).ToString(), System::Convert::ToInt32(this->ListWareText->SelectedItems[i]->Text));
|
| Line 4544... |
Line 4541... |
| 4544 |
this->UpdateGameVersion();
|
4541 |
this->UpdateGameVersion();
|
| 4545 |
this->ComboVersion->SelectedIndex = 0;
|
4542 |
this->ComboVersion->SelectedIndex = 0;
|
| 4546 |
}
|
4543 |
}
|
| 4547 |
private: System::Void SetGame_Selected(System::Object^ sender, System::EventArgs^ e) {
|
4544 |
private: System::Void SetGame_Selected(System::Object^ sender, System::EventArgs^ e) {
|
| 4548 |
System::Windows::Forms::ToolStripMenuItem ^item = cli::safe_cast<System::Windows::Forms::ToolStripMenuItem ^>(sender);
|
4545 |
System::Windows::Forms::ToolStripMenuItem ^item = cli::safe_cast<System::Windows::Forms::ToolStripMenuItem ^>(sender);
|
| 4549 |
|
4546 |
|
| 4550 |
int done = 0;
|
4547 |
int done = 0;
|
| 4551 |
if ( ListFiles->SelectedItems->Count )
|
4548 |
if ( ListFiles->SelectedItems->Count )
|
| 4552 |
{
|
4549 |
{
|
| 4553 |
for ( int i = 0; i < ListFiles->SelectedItems->Count; i++ )
|
4550 |
for ( int i = 0; i < ListFiles->SelectedItems->Count; i++ )
|
| 4554 |
{
|
4551 |
{
|
| Line 4557... |
Line 4554... |
| 4557 |
if ( file ) {
|
4554 |
if ( file ) {
|
| 4558 |
file->SetGame(Convert::ToInt32(item->Tag));
|
4555 |
file->SetGame(Convert::ToInt32(item->Tag));
|
| 4559 |
++done;
|
4556 |
++done;
|
| 4560 |
}
|
4557 |
}
|
| 4561 |
}
|
4558 |
}
|
| 4562 |
}
|
4559 |
}
|
| 4563 |
|
4560 |
|
| 4564 |
if ( done ) {
|
4561 |
if ( done ) {
|
| 4565 |
this->UpdateFileList();
|
4562 |
this->UpdateFileList();
|
| 4566 |
this->UpdateChanged();
|
4563 |
this->UpdateChanged();
|
| 4567 |
}
|
4564 |
}
|
| 4568 |
}
|
4565 |
}
|
| 4569 |
private: System::Void ComboPluginType_SelectedIndexChanged(System::Object^ sender, System::EventArgs^ e) {
|
4566 |
private: System::Void ComboPluginType_SelectedIndexChanged(System::Object^ sender, System::EventArgs^ e) {
|
| 4570 |
if ( m_pPackage->GetType() == TYPE_SPK )
|
4567 |
if ( m_pPackage->GetType() == TYPE_SPK )
|
| 4571 |
{
|
4568 |
{
|
| 4572 |
if ( !m_bLoading )
|
4569 |
if ( !m_bLoading )
|
| Line 5116... |
Line 5113... |
| 5116 |
C_File *file = m_pPackage->GetFileList()->Get(id);
|
5113 |
C_File *file = m_pPackage->GetFileList()->Get(id);
|
| 5117 |
file->SetDir(CyStringFromSystemString(input->GetInput()));
|
5114 |
file->SetDir(CyStringFromSystemString(input->GetInput()));
|
| 5118 |
}
|
5115 |
}
|
| 5119 |
}
|
5116 |
}
|
| 5120 |
private: System::Void TextWebAddress_TextChanged_1(System::Object^ sender, System::EventArgs^ e) {
|
5117 |
private: System::Void TextWebAddress_TextChanged_1(System::Object^ sender, System::EventArgs^ e) {
|
| 5121 |
if ( !m_bLoading )
|
- |
|
| 5122 |
m_pPackage->SetWebAddress(CyStringFromSystemString(this->TextWebAddress->Text));
|
5118 |
if ( !m_bLoading ) m_pPackage->setWebAddress(_S(this->TextWebAddress->Text));
|
| 5123 |
this->UpdateChanged();
|
5119 |
this->UpdateChanged();
|
| 5124 |
}
|
5120 |
}
|
| 5125 |
private: System::Void TextCustomType_TextChanged(System::Object^ sender, System::EventArgs^ e) {
|
5121 |
private: System::Void TextCustomType_TextChanged(System::Object^ sender, System::EventArgs^ e) {
|
| 5126 |
if ( !m_bLoading )
|
5122 |
if ( !m_bLoading )
|
| 5127 |
((CSpkFile *)m_pPackage)->SetScriptType(_S(this->TextCustomType->Text));
|
5123 |
((CSpkFile *)m_pPackage)->SetScriptType(_S(this->TextCustomType->Text));
|
| Line 5375... |
Line 5371... |
| 5375 |
}
|
5371 |
}
|
| 5376 |
}
|
5372 |
}
|
| 5377 |
}
|
5373 |
}
|
| 5378 |
}
|
5374 |
}
|
| 5379 |
private: System::Void toolStripButton4_Click(System::Object^ sender, System::EventArgs^ e) {
|
5375 |
private: System::Void toolStripButton4_Click(System::Object^ sender, System::EventArgs^ e) {
|
| 5380 |
if ( m_pPackage->GetWebAddress().Empty() )
|
5376 |
if ( m_pPackage->webAddress().empty() )
|
| 5381 |
MessageBox::Show(this, "You dont have a primary web address set, you need an address for automatic updates to work", "No Web Address", MessageBoxButtons::OK, MessageBoxIcon::Asterisk);
|
5377 |
MessageBox::Show(this, "You dont have a primary web address set, you need an address for automatic updates to work", "No Web Address", MessageBoxButtons::OK, MessageBoxIcon::Asterisk);
|
| 5382 |
else
|
5378 |
else
|
| 5383 |
{
|
5379 |
{
|
| 5384 |
FolderBrowserDialog ^fbd = gcnew FolderBrowserDialog;
|
5380 |
FolderBrowserDialog ^fbd = gcnew FolderBrowserDialog;
|
| 5385 |
fbd->Description = "Select the path to save the update file to";
|
5381 |
fbd->Description = "Select the path to save the update file to";
|
| 5386 |
fbd->SelectedPath = SystemStringFromCyString(CFileIO(m_pPackage->GetFilename()).GetDir().FindReplace("/", "\\"));
|
5382 |
fbd->SelectedPath = SystemStringFromCyString(CFileIO(m_pPackage->GetFilename()).GetDir().FindReplace("/", "\\"));
|
| 5387 |
if ( fbd->ShowDialog(this) == System::Windows::Forms::DialogResult::OK )
|
5383 |
if ( fbd->ShowDialog(this) == System::Windows::Forms::DialogResult::OK )
|
| 5388 |
{
|
5384 |
{
|
| 5389 |
CyString file = m_pPackage->CreateUpdateFile(CyStringFromSystemString(fbd->SelectedPath));
|
5385 |
CyString file = m_pPackage->CreateUpdateFile(CyStringFromSystemString(fbd->SelectedPath));
|
| 5390 |
if ( !file.Empty() )
|
5386 |
if ( !file.Empty() )
|
| 5391 |
MessageBox::Show(this, "Update file has been created\n" + SystemStringFromCyString(file) + "\n\nRemember to upload it your web server so its accessable\n" + SystemStringFromCyString(m_pPackage->GetWebAddress()), "Update File Created", MessageBoxButtons::OK, MessageBoxIcon::Information);
|
5387 |
MessageBox::Show(this, "Update file has been created\n" + SystemStringFromCyString(file) + "\n\nRemember to upload it your web server so its accessable\n" + _US(m_pPackage->webAddress()), "Update File Created", MessageBoxButtons::OK, MessageBoxIcon::Information);
|
| 5392 |
}
|
5388 |
}
|
| 5393 |
}
|
5389 |
}
|
| 5394 |
}
|
5390 |
}
|
| 5395 |
private: System::Void button5_Click(System::Object^ sender, System::EventArgs^ e) {
|
5391 |
private: System::Void button5_Click(System::Object^ sender, System::EventArgs^ e) {
|
| 5396 |
CustomiseShip ^ship = gcnew CustomiseShip((CXspFile *)m_pPackage, this->MdiParent, m_pP, this->imageListSmall, this->imageListLarge, this->GetHighestGame());
|
5392 |
CustomiseShip ^ship = gcnew CustomiseShip((CXspFile *)m_pPackage, this->MdiParent, m_pP, this->imageListSmall, this->imageListLarge, this->GetHighestGame());
|