Subversion Repositories spk

Rev

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

Rev 197 Rev 219
Line 131... Line 131...
131
	void ExtractDialog::Background_Finished(System::Object ^Sender, RunWorkerCompletedEventArgs ^E)
131
	void ExtractDialog::Background_Finished(System::Object ^Sender, RunWorkerCompletedEventArgs ^E)
132
	{
132
	{
133
		if ( m_sFailed->Length )
133
		if ( m_sFailed->Length )
134
		{
134
		{
135
			if ( m_pMultiPackage )
135
			if ( m_pMultiPackage )
136
				m_pFailedList->PushBack(CyString(m_pWorkingPackage->sName), CyStringFromSystemString(m_sFailed));
136
				m_pFailedList->pushBack(m_pWorkingPackage->sName, _WS(m_sFailed));
137
			else
137
			else
138
				m_pFailedList->PushBack(CyString(m_pWorkingFile->getNameDirectory(NULL).toString()), CyStringFromSystemString(m_sFailed));
138
				m_pFailedList->pushBack(m_pWorkingFile->getNameDirectory(NULL), _WS(m_sFailed));
139
		}
139
		}
140
 
140
 
141
		if ( m_iWorkingStatus == WORKER_WRITE || m_sFailed->Length )
141
		if ( m_iWorkingStatus == WORKER_WRITE || m_sFailed->Length )
142
			this->DoNextFile();
142
			this->DoNextFile();
143
		else
143
		else
Line 145... Line 145...
145
	}
145
	}
146
 
146
 
147
	void ExtractDialog::Finished()
147
	void ExtractDialog::Finished()
148
	{
148
	{
149
		m_bOK = true;
149
		m_bOK = true;
150
		if ( !m_pFailedList->Empty() )
150
		if ( !m_pFailedList->empty() )
151
		{
151
		{
152
			CyString s;
152
			Utils::WString s;
153
			for ( SStringList *str = m_pFailedList->Head(); str; str = str->next )
153
			for (auto itr = m_pFailedList->begin(); itr != m_pFailedList->end(); itr++)
154
				s += str->str + " (" + str->data + ")\n";
154
				s += (*itr)->str + L" (" + (*itr)->data + L")\n";
155
			MessageBox::Show(this, "Error Extracting Files:\n\n" + _US(s.ToString()), "Extract Error", MessageBoxButtons::OK, MessageBoxIcon::Error);
155
			MessageBox::Show(this, "Error Extracting Files:\n\n" + _US(s), "Extract Error", MessageBoxButtons::OK, MessageBoxIcon::Error);
156
			m_bOK = false;
156
			m_bOK = false;
157
		}
157
		}
158
 
158
 
159
		this->Close();
159
		this->Close();
160
	}
160
	}
Line 251... Line 251...
251
 
251
 
252
		this->Text = "Extracting Files [" + (m_iCount + 1) + "/" + max + "]";
252
		this->Text = "Extracting Files [" + (m_iCount + 1) + "/" + max + "]";
253
 
253
 
254
		Utils::WString filename;
254
		Utils::WString filename;
255
		if ( m_pMultiPackage )
255
		if ( m_pMultiPackage )
256
			filename = sToDir + L"/" + m_pWorkingPackage->sName.toWString();
256
			filename = sToDir + L"/" + m_pWorkingPackage->sName;
257
		else
257
		else
258
			filename = sToDir + L"/" + m_pWorkingFile->getNameDirectory(NULL);
258
			filename = sToDir + L"/" + m_pWorkingFile->getNameDirectory(NULL);
259
 
259
 
260
		Utils::WString displayFilename = filename;
260
		Utils::WString displayFilename = filename;
261
		displayFilename = displayFilename.findReplace("/", "\\");
261
		displayFilename = displayFilename.findReplace("/", "\\");