Line 1090... |
Line 1090... |
1090 |
ofd->Filter += games;
|
1090 |
ofd->Filter += games;
|
1091 |
ofd->FilterIndex = 1;
|
1091 |
ofd->FilterIndex = 1;
|
1092 |
ofd->RestoreDirectory = true;
|
1092 |
ofd->RestoreDirectory = true;
|
1093 |
if ( ofd->ShowDialog(this) == System::Windows::Forms::DialogResult::OK )
|
1093 |
if ( ofd->ShowDialog(this) == System::Windows::Forms::DialogResult::OK )
|
1094 |
{
|
1094 |
{
|
- |
|
1095 |
CyString file = CyStringFromSystemString(ofd->FileName);
|
1095 |
CyString dir = CyStringFromSystemString(IO::FileInfo(ofd->FileName).DirectoryName);
|
1096 |
CyString dir = CyStringFromSystemString(IO::FileInfo(ofd->FileName).DirectoryName);
|
1096 |
// check its a valid directory
|
1097 |
// check its a valid directory
|
1097 |
if ( !dir.Empty() )
|
1098 |
if ( !dir.Empty() )
|
1098 |
{
|
1099 |
{
|
1099 |
CyString gameName = m_pPackages->GetGameName(dir);
|
1100 |
CyString gameName = m_pPackages->GetGameName(file);
|
1100 |
if ( gameName.Empty() )
|
1101 |
if ( gameName.Empty() )
|
1101 |
this->DisplayMessageBox(false, "Add Directory Error", "No X-Universe game found in folder:\n" + SystemStringFromCyString(dir), MessageBoxButtons::OK, MessageBoxIcon::Error);
|
1102 |
this->DisplayMessageBox(false, "Add Directory Error", "No X-Universe game found in folder:\n" + SystemStringFromCyString(dir), MessageBoxButtons::OK, MessageBoxIcon::Error);
|
1102 |
else
|
1103 |
else
|
1103 |
{
|
1104 |
{
|
1104 |
// lets check if theres an old folder
|
1105 |
// lets check if theres an old folder
|
Line 1107... |
Line 1108... |
1107 |
if ( this->DisplayMessageBox(false, "Update Game Directory", "Game directory: " + SystemStringFromCyString(dir) + "\nIs currently being controled by the old plugin manager\nIf you continue, you will be unable to use the old version again\nDo you wish to continue?", MessageBoxButtons::YesNo, MessageBoxIcon::Question) != System::Windows::Forms::DialogResult::Yes )
|
1108 |
if ( this->DisplayMessageBox(false, "Update Game Directory", "Game directory: " + SystemStringFromCyString(dir) + "\nIs currently being controled by the old plugin manager\nIf you continue, you will be unable to use the old version again\nDo you wish to continue?", MessageBoxButtons::YesNo, MessageBoxIcon::Question) != System::Windows::Forms::DialogResult::Yes )
|
1108 |
return;
|
1109 |
return;
|
1109 |
}
|
1110 |
}
|
1110 |
m_iBackgroundTask = MGUI_BACKGROUND_ADDDIR;
|
1111 |
m_iBackgroundTask = MGUI_BACKGROUND_ADDDIR;
|
1111 |
this->Enabled = false;
|
1112 |
this->Enabled = false;
|
1112 |
CyString properDir = m_pPackages->GetProperDir(dir);
|
1113 |
CyString properDir = m_pPackages->GetProperDir(file);
|
1113 |
ComboDir->Items->Add(SystemStringFromCyString(properDir));
|
1114 |
ComboDir->Items->Add(SystemStringFromCyString(properDir));
|
1114 |
ComboDir->Text = SystemStringFromCyString(properDir);
|
1115 |
ComboDir->Text = SystemStringFromCyString(properDir);
|
1115 |
|
1116 |
|
1116 |
m_pRemovedDirList->Remove(properDir, true);
|
1117 |
m_pRemovedDirList->Remove(properDir, true);
|
1117 |
GetGameDirs(dir, false, true);
|
1118 |
GetGameDirs(dir, false, m_pPackages->GetAddonDir(file).Empty());
|
1118 |
/*int lang = m_pPackages->GetGameLanguage(dir);
|
1119 |
/*int lang = m_pPackages->GetGameLanguage(dir);
|
1119 |
if ( lang )
|
1120 |
if ( lang )
|
1120 |
m_pDirList->PushFront(properDir, CyString::Number(lang) + "|" + gameName);
|
1121 |
m_pDirList->PushFront(properDir, CyString::Number(lang) + "|" + gameName);
|
1121 |
else
|
1122 |
else
|
1122 |
m_pDirList->PushFront(properDir, gameName);*/
|
1123 |
m_pDirList->PushFront(properDir, gameName);*/
|