Subversion Repositories spk

Rev

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

Rev 224 Rev 225
Line 164... Line 164...
164
 
164
 
165
	CVirtualFileSystem *vfs = new CVirtualFileSystem();
165
	CVirtualFileSystem *vfs = new CVirtualFileSystem();
166
 
166
 
167
	if ( ofd->ShowDialog(this) == System::Windows::Forms::DialogResult::OK )
167
	if ( ofd->ShowDialog(this) == System::Windows::Forms::DialogResult::OK )
168
	{
168
	{
169
		if ( !vfs->loadMod(CyStringFromSystemString(ofd->FileName).ToString()) ) {
169
		if ( !vfs->loadMod(_WS(ofd->FileName)) ) {
170
			MessageBox::Show(this, "There was a problem when trying to import the ship\n" + ofd->FileName + "\n\nError: Unable to open mod file", "Error Importing Ship", MessageBoxButtons::OK, MessageBoxIcon::Error);
170
			MessageBox::Show(this, "There was a problem when trying to import the ship\n" + ofd->FileName + "\n\nError: Unable to open mod file", "Error Importing Ship", MessageBoxButtons::OK, MessageBoxIcon::Error);
171
			return;
171
			return;
172
		}
172
		}
173
		this->UseWaitCursor = true;
173
		this->UseWaitCursor = true;
174
 
174
 
Line 190... Line 190...
190
				if ( !newShip ) {
190
				if ( !newShip ) {
191
					if ( MessageBox::Show(this, "There was a problem when trying to import the ship\n" + ofd->FileName + " (" + shipID + ")\n\nError: " + import->getErrorString() + "\n\nWould you like to read files from another mod as well?", "Error Importing Ship", MessageBoxButtons::YesNo, MessageBoxIcon::Question) == System::Windows::Forms::DialogResult::Yes ) {
191
					if ( MessageBox::Show(this, "There was a problem when trying to import the ship\n" + ofd->FileName + " (" + shipID + ")\n\nError: " + import->getErrorString() + "\n\nWould you like to read files from another mod as well?", "Error Importing Ship", MessageBoxButtons::YesNo, MessageBoxIcon::Question) == System::Windows::Forms::DialogResult::Yes ) {
192
						// load in another file
192
						// load in another file
193
						if ( ofd->ShowDialog(this) == System::Windows::Forms::DialogResult::OK ) {
193
						if ( ofd->ShowDialog(this) == System::Windows::Forms::DialogResult::OK ) {
194
							loadMod = ofd->FileName;
194
							loadMod = ofd->FileName;
195
							if ( !vfs->loadMod(CyStringFromSystemString(loadMod).ToString()) ) {
195
							if ( !vfs->loadMod(_WS(loadMod)) ) {
196
								MessageBox::Show(this, "There was a problem when trying to import the ship\n" + ofd->FileName + " (" + shipID + ")\n\nError: Unable to open mod file", "Error Importing Ship", MessageBoxButtons::OK, MessageBoxIcon::Error);
196
								MessageBox::Show(this, "There was a problem when trying to import the ship\n" + ofd->FileName + " (" + shipID + ")\n\nError: Unable to open mod file", "Error Importing Ship", MessageBoxButtons::OK, MessageBoxIcon::Error);
197
								break;
197
								break;
198
							}
198
							}
199
						}
199
						}
200
						else break;
200
						else break;