Subversion Repositories spk

Rev

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

Rev 125 Rev 158
Line 32... Line 32...
32
			this->panel1->Enabled = false;
32
			this->panel1->Enabled = false;
33
			this->panel2->Enabled = false;
33
			this->panel2->Enabled = false;
34
			this->panel5->Enabled = false;
34
			this->panel5->Enabled = false;
35
 
35
 
36
			m_pPackages = new CPackages();
36
			m_pPackages = new CPackages();
37
			m_pPackages->Startup(".", ".", ".");
37
			m_pPackages->startup(".", ".", ".");
38
 
38
 
39
			m_iLocX = m_iLocY = -1;
39
			m_iLocX = m_iLocY = -1;
40
		}
40
		}
41
 
41
 
42
		String ^OpenFile(String ^desc)
42
		String ^OpenFile(String ^desc)
Line 273... Line 273...
273
		}
273
		}
274
 
274
 
275
 
275
 
276
		bool SetGameDir(int patch, String ^gameDir)
276
		bool SetGameDir(int patch, String ^gameDir)
277
		{
277
		{
278
			CyString dir = CyStringFromSystemString(gameDir);
278
			Utils::String dir = _S(gameDir);
279
			if ( !dir.Empty() )
279
			if ( !dir.empty() )
280
			{
280
			{
281
				CyString gameName = m_pPackages->GetGameName(dir);
281
				Utils::String gameName = m_pPackages->getGameName(dir);
282
				if ( !gameName.Empty() )
282
				if ( !gameName.empty() )
283
				{
283
				{
284
					this->textBox3->Text = gameDir + " (" + SystemStringFromCyString(gameName) + ")";
284
					this->textBox3->Text = gameDir + " (" + _US(gameName) + ")";
285
					this->panel5->Enabled = true;
285
					this->panel5->Enabled = true;
286
					this->numericUpDown1->Minimum = 1;
286
					this->numericUpDown1->Minimum = 1;
287
					m_pPackages->SetCurrentDir(dir);
287
					m_pPackages->setCurrentDir(dir);
288
					this->numericUpDown1->Maximum = m_pPackages->FindNextFakePatch() - 1;
288
					this->numericUpDown1->Maximum = m_pPackages->FindNextFakePatch() - 1;
289
					if ( patch < 1 || patch > this->numericUpDown1->Maximum )
289
					if ( patch < 1 || patch > this->numericUpDown1->Maximum )
290
						this->numericUpDown1->Value = this->numericUpDown1->Maximum;
290
						this->numericUpDown1->Value = this->numericUpDown1->Maximum;
291
					else
291
					else
292
						this->numericUpDown1->Value = patch;
292
						this->numericUpDown1->Value = patch;