| Line 4630... |
Line 4630... |
| 4630 |
if ( f )
|
4630 |
if ( f )
|
| 4631 |
{
|
4631 |
{
|
| 4632 |
this->ContextFileSep1->Visible = true;
|
4632 |
this->ContextFileSep1->Visible = true;
|
| 4633 |
this->renameFileToolStripMenuItem->Visible = true;
|
4633 |
this->renameFileToolStripMenuItem->Visible = true;
|
| 4634 |
this->ContextFileEdit->Visible = C_File::DoesTypeHaveExtraDir(f->GetFileType());
|
4634 |
this->ContextFileEdit->Visible = C_File::DoesTypeHaveExtraDir(f->GetFileType());
|
| 4635 |
if ( f->CheckFileExt("xml") || f->CheckFileExt("bob") || f->CheckFileExt("bod") )
|
4635 |
if (f->checkFileExt("xml") || f->checkFileExt("bob") || f->checkFileExt("bod"))
|
| 4636 |
this->packFileToolStripMenuItem->Visible = true;
|
4636 |
this->packFileToolStripMenuItem->Visible = true;
|
| 4637 |
else if ( f->CheckFileExt("pck") || f->CheckFileExt("pbb") || f->CheckFileExt("pbd") )
|
4637 |
else if (f->checkFileExt("pck") || f->checkFileExt("pbb") || f->checkFileExt("pbd"))
|
| 4638 |
this->unpackFileToolStripMenuItem->Visible = true;
|
4638 |
this->unpackFileToolStripMenuItem->Visible = true;
|
| 4639 |
|
4639 |
|
| 4640 |
if ( f->GetFileType() == FILETYPE_MOD )
|
4640 |
if ( f->GetFileType() == FILETYPE_MOD )
|
| 4641 |
{
|
4641 |
{
|
| 4642 |
if ( f->IsFakePatch() )
|
4642 |
if ( f->IsFakePatch() )
|
| Line 4886... |
Line 4886... |
| 4886 |
{
|
4886 |
{
|
| 4887 |
if ( item->SubItems->Count >= 5 )
|
4887 |
if ( item->SubItems->Count >= 5 )
|
| 4888 |
item->SubItems[4]->Text = input->GetInput();
|
4888 |
item->SubItems[4]->Text = input->GetInput();
|
| 4889 |
else
|
4889 |
else
|
| 4890 |
item->SubItems->Add(input->GetInput());
|
4890 |
item->SubItems->Add(input->GetInput());
|
| 4891 |
int id = CyStringFromSystemString(cli::safe_cast<System::String ^>(item->Tag)).ToInt();
|
4891 |
int id = _S(cli::safe_cast<System::String ^>(item->Tag)).toInt();
|
| 4892 |
C_File *file = m_pPackage->GetFileList()->Get(id);
|
4892 |
C_File *file = m_pPackage->fileList().Get(id);
|
| 4893 |
file->SetDir(CyStringFromSystemString(input->GetInput()));
|
4893 |
file->setDir(_S(input->GetInput()));
|
| 4894 |
}
|
4894 |
}
|
| 4895 |
}
|
4895 |
}
|
| 4896 |
}
|
4896 |
}
|
| 4897 |
}
|
4897 |
}
|
| 4898 |
}
|
4898 |
}
|
| Line 5252... |
Line 5252... |
| 5252 |
InputBox ^input = gcnew InputBox("Enter the directory to install into", m_pSelectedItem->SubItems[4]->Text);
|
5252 |
InputBox ^input = gcnew InputBox("Enter the directory to install into", m_pSelectedItem->SubItems[4]->Text);
|
| 5253 |
if ( input->ShowDialog(this) == System::Windows::Forms::DialogResult::OK )
|
5253 |
if ( input->ShowDialog(this) == System::Windows::Forms::DialogResult::OK )
|
| 5254 |
{
|
5254 |
{
|
| 5255 |
m_pSelectedItem->SubItems[4]->Text = input->GetInput();
|
5255 |
m_pSelectedItem->SubItems[4]->Text = input->GetInput();
|
| 5256 |
int id = Convert::ToInt32(m_pSelectedItem->Tag);
|
5256 |
int id = Convert::ToInt32(m_pSelectedItem->Tag);
|
| 5257 |
C_File *file = m_pPackage->GetFileList()->Get(id);
|
5257 |
C_File *file = m_pPackage->fileList().Get(id);
|
| 5258 |
file->SetDir(CyStringFromSystemString(input->GetInput()));
|
5258 |
file->setDir(_S(input->GetInput()));
|
| 5259 |
}
|
5259 |
}
|
| 5260 |
}
|
5260 |
}
|
| 5261 |
private: System::Void TextWebAddress_TextChanged_1(System::Object^ sender, System::EventArgs^ e) {
|
5261 |
private: System::Void TextWebAddress_TextChanged_1(System::Object^ sender, System::EventArgs^ e) {
|
| 5262 |
if ( !m_bLoading ) m_pPackage->setWebAddress(_S(this->TextWebAddress->Text));
|
5262 |
if ( !m_bLoading ) m_pPackage->setWebAddress(_S(this->TextWebAddress->Text));
|
| 5263 |
this->UpdateChanged();
|
5263 |
this->UpdateChanged();
|
| Line 5424... |
Line 5424... |
| 5424 |
{
|
5424 |
{
|
| 5425 |
if ( !f->PCKFile() )
|
5425 |
if ( !f->PCKFile() )
|
| 5426 |
MessageBox::Show(this, "There was a problem trying to pack the file\n" + _US(f->filename()), "Error", MessageBoxButtons::OK, MessageBoxIcon::Error);
|
5426 |
MessageBox::Show(this, "There was a problem trying to pack the file\n" + _US(f->filename()), "Error", MessageBoxButtons::OK, MessageBoxIcon::Error);
|
| 5427 |
else
|
5427 |
else
|
| 5428 |
{
|
5428 |
{
|
| 5429 |
if ( f->CheckFileExt("bob") )
|
5429 |
if (f->checkFileExt("bob"))
|
| 5430 |
f->ChangeFileExt("pbb");
|
5430 |
f->changeFileExt("pbb");
|
| 5431 |
else if ( f->CheckFileExt("bod") )
|
5431 |
else if (f->checkFileExt("bod"))
|
| 5432 |
f->ChangeFileExt("pbd");
|
5432 |
f->changeFileExt("pbd");
|
| 5433 |
else
|
5433 |
else
|
| 5434 |
f->ChangeFileExt("pck");
|
5434 |
f->changeFileExt("pck");
|
| 5435 |
m_pSelectedItem->SubItems[1]->Text = _US("<PACKAGE>/" + f->getNameDirectory(NULL));
|
5435 |
m_pSelectedItem->SubItems[1]->Text = _US("<PACKAGE>/" + f->getNameDirectory(NULL));
|
| 5436 |
m_pSelectedItem->SubItems[2]->Text = SystemStringFromCyString(f->GetUncompressedSizeString());
|
5436 |
m_pSelectedItem->SubItems[2]->Text = _US(f->uncompressedSizeString());
|
| 5437 |
|
5437 |
|
| 5438 |
m_pPackage->adjustChanged(true);
|
5438 |
m_pPackage->adjustChanged(true);
|
| 5439 |
this->UpdateChanged();
|
5439 |
this->UpdateChanged();
|
| 5440 |
}
|
5440 |
}
|
| 5441 |
}
|
5441 |
}
|
| Line 5450... |
Line 5450... |
| 5450 |
{
|
5450 |
{
|
| 5451 |
if ( !f->UnPCKFile() )
|
5451 |
if ( !f->UnPCKFile() )
|
| 5452 |
MessageBox::Show(this, "There was a problem trying to unpack the file\n" + _US(f->filename()), "Error", MessageBoxButtons::OK, MessageBoxIcon::Error);
|
5452 |
MessageBox::Show(this, "There was a problem trying to unpack the file\n" + _US(f->filename()), "Error", MessageBoxButtons::OK, MessageBoxIcon::Error);
|
| 5453 |
else
|
5453 |
else
|
| 5454 |
{
|
5454 |
{
|
| 5455 |
if ( f->CheckFileExt("pbb") )
|
5455 |
if (f->checkFileExt("pbb"))
|
| 5456 |
f->ChangeFileExt("bob");
|
5456 |
f->changeFileExt("bob");
|
| 5457 |
else if ( f->CheckFileExt("pbd") )
|
5457 |
else if (f->checkFileExt("pbd"))
|
| 5458 |
f->ChangeFileExt("bod");
|
5458 |
f->changeFileExt("bod");
|
| 5459 |
else
|
5459 |
else
|
| 5460 |
f->ChangeFileExt("xml");
|
5460 |
f->changeFileExt("xml");
|
| 5461 |
m_pSelectedItem->SubItems[1]->Text = _US("<PACKAGE>/" + f->getNameDirectory(NULL));
|
5461 |
m_pSelectedItem->SubItems[1]->Text = _US("<PACKAGE>/" + f->getNameDirectory(NULL));
|
| 5462 |
m_pSelectedItem->SubItems[2]->Text = SystemStringFromCyString(f->GetUncompressedSizeString());
|
5462 |
m_pSelectedItem->SubItems[2]->Text = _US(f->uncompressedSizeString());
|
| 5463 |
|
5463 |
|
| 5464 |
m_pPackage->adjustChanged(true);
|
5464 |
m_pPackage->adjustChanged(true);
|
| 5465 |
this->UpdateChanged();
|
5465 |
this->UpdateChanged();
|
| 5466 |
}
|
5466 |
}
|
| 5467 |
}
|
5467 |
}
|
| Line 5480... |
Line 5480... |
| 5480 |
}
|
5480 |
}
|
| 5481 |
private: System::Void convertToNormalModToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) {
|
5481 |
private: System::Void convertToNormalModToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) {
|
| 5482 |
if ( !m_pSelectedItem ) return;
|
5482 |
if ( !m_pSelectedItem ) return;
|
| 5483 |
|
5483 |
|
| 5484 |
int id = Convert::ToInt32(m_pSelectedItem->Tag);
|
5484 |
int id = Convert::ToInt32(m_pSelectedItem->Tag);
|
| 5485 |
C_File *f = m_pPackage->GetFileList()->Get(id);
|
5485 |
C_File *f = m_pPackage->fileList().Get(id);
|
| 5486 |
|
5486 |
|
| 5487 |
if ( f )
|
5487 |
if ( f )
|
| 5488 |
{
|
5488 |
{
|
| 5489 |
InputBox ^input = gcnew InputBox("Enter the name you want the mod to be called");
|
5489 |
InputBox ^input = gcnew InputBox("Enter the name you want the mod to be called");
|
| 5490 |
if ( input->ShowDialog(this) == Windows::Forms::DialogResult::OK )
|
5490 |
if ( input->ShowDialog(this) == Windows::Forms::DialogResult::OK )
|
| Line 5503... |
Line 5503... |
| 5503 |
int id = Convert::ToInt32(m_pSelectedItem->Tag);
|
5503 |
int id = Convert::ToInt32(m_pSelectedItem->Tag);
|
| 5504 |
C_File *f = m_pPackage->GetFileList()->Get(id);
|
5504 |
C_File *f = m_pPackage->GetFileList()->Get(id);
|
| 5505 |
|
5505 |
|
| 5506 |
if ( f )
|
5506 |
if ( f )
|
| 5507 |
{
|
5507 |
{
|
| 5508 |
InputBox ^input = gcnew InputBox("Enter the new file name to change to", SystemStringFromCyString(f->GetBaseName()));
|
5508 |
InputBox ^input = gcnew InputBox("Enter the new file name to change to", _US(f->baseName()));
|
| 5509 |
if ( input->ShowDialog(this) == Windows::Forms::DialogResult::OK )
|
5509 |
if ( input->ShowDialog(this) == Windows::Forms::DialogResult::OK )
|
| 5510 |
{
|
5510 |
{
|
| 5511 |
if ( input->GetInput()->Length )
|
5511 |
if ( input->GetInput()->Length )
|
| 5512 |
{
|
5512 |
{
|
| 5513 |
m_pPackage->renameFile(f, _S(input->GetInput()));
|
5513 |
m_pPackage->renameFile(f, _S(input->GetInput()));
|
| Line 5591... |
Line 5591... |
| 5591 |
SGameCompat *g = m_pPackage->GetGameCompatability(game);
|
5591 |
SGameCompat *g = m_pPackage->GetGameCompatability(game);
|
| 5592 |
if ( g ) {
|
5592 |
if ( g ) {
|
| 5593 |
SGameExe *exe = m_pP->GetGameExe()->GetGame(game - 1);
|
5593 |
SGameExe *exe = m_pP->GetGameExe()->GetGame(game - 1);
|
| 5594 |
if ( exe ) {
|
5594 |
if ( exe ) {
|
| 5595 |
this->ButGame->ImageIndex = game - 1;
|
5595 |
this->ButGame->ImageIndex = game - 1;
|
| 5596 |
this->ButGame->Text = SystemStringFromCyString(exe->sName);
|
5596 |
this->ButGame->Text = _US(exe->sName);
|
| 5597 |
this->ComboVersion->Enabled = true;
|
5597 |
this->ComboVersion->Enabled = true;
|
| 5598 |
this->ButGameAdd->Enabled = true;
|
5598 |
this->ButGameAdd->Enabled = true;
|
| 5599 |
this->UpdateGameVersion();
|
5599 |
this->UpdateGameVersion();
|
| 5600 |
if ( !g->sVersion.empty() ) {
|
5600 |
if ( !g->sVersion.empty() ) {
|
| 5601 |
this->ComboVersion->SelectedIndex = this->ComboVersion->Items->Count - 1;
|
5601 |
this->ComboVersion->SelectedIndex = this->ComboVersion->Items->Count - 1;
|
| 5602 |
this->TextExactVersion->Visible = true;
|
5602 |
this->TextExactVersion->Visible = true;
|
| 5603 |
this->TextExactVersion->Text = SystemStringFromCyString(g->sVersion);
|
5603 |
this->TextExactVersion->Text = _US(g->sVersion);
|
| 5604 |
}
|
5604 |
}
|
| 5605 |
else {
|
5605 |
else {
|
| 5606 |
this->ComboVersion->SelectedIndex = g->iVersion;
|
5606 |
this->ComboVersion->SelectedIndex = g->iVersion;
|
| 5607 |
this->TextExactVersion->Visible = false;
|
5607 |
this->TextExactVersion->Visible = false;
|
| 5608 |
}
|
5608 |
}
|