Subversion Repositories spk

Rev

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

Rev 118 Rev 121
Line 106... Line 106...
106
 
106
 
107
		void AddDir(String ^sDir, bool ask, bool load)
107
		void AddDir(String ^sDir, bool ask, bool load)
108
		{
108
		{
109
			Utils::String dir = _S(sDir);
109
			Utils::String dir = _S(sDir);
110
 
110
 
111
			Utils::String game = m_pP->GetGameName(dir).ToString();
111
			Utils::String game = m_pP->getGameName(dir);
112
			int iGame = m_pP->GetGameExe()->GetGameType(dir);
112
			int iGame = m_pP->GetGameExe()->GetGameType(dir);
113
 
113
 
114
			dir = m_pP->GetGameExe()->GetProperDir(dir);
114
			dir = m_pP->GetGameExe()->GetProperDir(dir);
115
 
115
 
116
			dir = dir.findReplace("\\", "/");
116
			dir = dir.findReplace("\\", "/");
Line 147... Line 147...
147
			ofd->FilterIndex = 1;
147
			ofd->FilterIndex = 1;
148
			ofd->RestoreDirectory = true;
148
			ofd->RestoreDirectory = true;
149
			if ( ofd->ShowDialog(this) == System::Windows::Forms::DialogResult::OK )
149
			if ( ofd->ShowDialog(this) == System::Windows::Forms::DialogResult::OK )
150
			{
150
			{
151
				// check for a valid game
151
				// check for a valid game
152
				if ( m_pP->GetGameName(CyStringFromSystemString(ofd->FileName)).Empty() )
152
				if ( m_pP->getGameName(_S(ofd->FileName)).empty() )
153
					MessageBox::Show(this, "The path selected doesn't contain a valid game version\n" + IO::FileInfo(ofd->FileName).DirectoryName, "Invalid Directory", MessageBoxButtons::OK, MessageBoxIcon::Error);
153
					MessageBox::Show(this, "The path selected doesn't contain a valid game version\n" + IO::FileInfo(ofd->FileName).DirectoryName, "Invalid Directory", MessageBoxButtons::OK, MessageBoxIcon::Error);
154
				else
154
				else
155
					this->AddDir(ofd->FileName, true, false);
155
					this->AddDir(ofd->FileName, true, false);
156
			}
156
			}
157
		}
157
		}