Subversion Repositories spk

Rev

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

Rev 216 Rev 217
Line 366... Line 366...
366
		this->TextDesc->Text = _US(desc);
366
		this->TextDesc->Text = _US(desc);
367
 
367
 
368
		if ( m_pPackage->GetType() == TYPE_XSP )
368
		if ( m_pPackage->GetType() == TYPE_XSP )
369
		{
369
		{
370
			CXspFile *xsp = (CXspFile *)m_pPackage;
370
			CXspFile *xsp = (CXspFile *)m_pPackage;
371
			this->TextShipID->Text = _US(xsp->GetShipID());
371
			this->TextShipID->Text = _US(xsp->shipID());
372
			this->PanelShip->Show();
372
			this->PanelShip->Show();
373
			this->LabelShipWarning->Visible = true;
373
			this->LabelShipWarning->Visible = true;
374
			this->groupBox6->Visible = false;
374
			this->groupBox6->Visible = false;
375
 
375
 
376
			this->TextShipData->Text = _US(xsp->GetShipData());
376
			this->TextShipData->Text = _US(xsp->shipData());
377
 
377
 
378
			this->CheckShipID->Checked = xsp->IsExistingShip();
378
			this->CheckShipID->Checked = xsp->IsExistingShip();
379
			this->CheckExistingText->Checked = (xsp->GetOriginalDescription()) ? true : false;
379
			this->CheckExistingText->Checked = (xsp->GetOriginalDescription()) ? true : false;
380
			if ( xsp->GetOriginalDescription() )
380
			if ( xsp->GetOriginalDescription() )
381
				this->NumTextID->Value = xsp->GetOriginalDescription();
381
				this->NumTextID->Value = xsp->GetOriginalDescription();
Line 1444... Line 1444...
1444
							catText->Add(key, _US((*itr)->data));
1444
							catText->Add(key, _US((*itr)->data));
1445
					}
1445
					}
1446
				}
1446
				}
1447
			}
1447
			}
1448
 
1448
 
1449
			Utils::CStringList list;
1449
			Utils::WStringList list;
1450
			if (m_pP->loadShipData(_S(ofd->FileName), list))
1450
			if (m_pP->loadShipData(_S(ofd->FileName), list))
1451
			{
1451
			{
1452
				LoadShip ^ls = gcnew LoadShip();
1452
				LoadShip ^ls = gcnew LoadShip();
1453
				for(auto itr = list.begin(); itr != list.end(); itr++)
1453
				for(auto itr = list.begin(); itr != list.end(); itr++)
1454
				{
1454
				{
1455
					int tId = (*itr)->data.token(";", 7).toInt();
1455
					int tId = (*itr)->data.token(L";", 7).toInt();
1456
					String ^name;
1456
					String ^name;
1457
					if ( catText->ContainsKey(Convert::ToString(tId)) )
1457
					if ( catText->ContainsKey(Convert::ToString(tId)) )
1458
						name = Convert::ToString(catText[Convert::ToString(tId)]);
1458
						name = Convert::ToString(catText[Convert::ToString(tId)]);
1459
					else
1459
					else
1460
						name = ((Form1 ^)this->MdiParent)->FindText(-1, 17, tId);
1460
						name = ((Form1 ^)this->MdiParent)->FindText(-1, 17, tId);
1461
					String ^text = ((Form1 ^)this->MdiParent)->FindText(-1, 1266, (*itr)->data.token(";", 46).toInt()) + " " + name;
1461
					String ^text = ((Form1 ^)this->MdiParent)->FindText(-1, 1266, (*itr)->data.token(L";", 46).toInt()) + " " + name;
1462
					int variation = (*itr)->data.token(";", 51).toInt();
1462
					int variation = (*itr)->data.token(L";", 51).toInt();
1463
					if ( variation )
1463
					if ( variation )
1464
						text = text + " " + ((Form1 ^)this->MdiParent)->FindText(-1, 17, 10000 + variation);
1464
						text = text + " " + ((Form1 ^)this->MdiParent)->FindText(-1, 17, 10000 + variation);
1465
					ls->AddShip(_US((*itr)->str), text);
1465
					ls->AddShip(_US((*itr)->str), text);
1466
				}
1466
				}
1467
 
1467
 
1468
				if ( ls->ShowDialog(this) == System::Windows::Forms::DialogResult::OK )
1468
				if ( ls->ShowDialog(this) == System::Windows::Forms::DialogResult::OK )
1469
				{
1469
				{
1470
					Utils::String data = list.findString(_S(ls->GetData()));
1470
					Utils::WString data = list.findString(_WS(ls->GetData()));
1471
					if (data.empty())
1471
					if (data.empty())
1472
					{
1472
					{
1473
						((CXspFile *)m_pPackage)->SetShipData(data);
1473
						((CXspFile *)m_pPackage)->setShipData(data);
1474
						if ( ((CXspFile *)m_pPackage)->GetShipID().empty() )
1474
						if ( ((CXspFile *)m_pPackage)->shipID().empty() )
1475
						{
1475
						{
1476
							Utils::String id = data.tokens(";", -2);
1476
							Utils::WString id = data.tokens(L";", -2);
1477
							while ( id.right(1) == ";" )
1477
							while ( id.right(1) == ";" )
1478
								id.truncate((int)id.length() - 1);
1478
								id.truncate((int)id.length() - 1);
1479
							((CXspFile *)m_pPackage)->SetShipID(id);
1479
							((CXspFile *)m_pPackage)->setShipID(id);
1480
							this->TextShipID->Text = _US(id);
1480
							this->TextShipID->Text = _US(id);
1481
						}
1481
						}
1482
 
1482
 
1483
						((CXspFile *)m_pPackage)->SetShipData(data);
1483
						((CXspFile *)m_pPackage)->setShipData(data);
1484
						this->TextShipData->Text = _US(data);
1484
						this->TextShipData->Text = _US(data);
1485
						this->NumTextID->Value = data.token(";", 7).toInt();
1485
						this->NumTextID->Value = data.token(L";", 7).toInt();
1486
						this->UpdateChanged();
1486
						this->UpdateChanged();
1487
					}
1487
					}
1488
				}
1488
				}
1489
			}
1489
			}
1490
			else
1490
			else