Subversion Repositories spk

Rev

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

Rev 18 Rev 39
Line 1390... Line 1390...
1390
					}
1390
					}
1391
 
1391
 
1392
					if ( component->ShowDialog(this) == Windows::Forms::DialogResult::OK )
1392
					if ( component->ShowDialog(this) == Windows::Forms::DialogResult::OK )
1393
					{
1393
					{
1394
						if ( edit )
1394
						if ( edit )
1395
							xsp->RemoveComponent(CyStringFromSystemString(m_pSelectedItem->Text), CyStringFromSystemString(m_pSelectedItem->SubItems[1]->Text), CyStringFromSystemString(m_pSelectedItem->SubItems[2]->Text));
1395
							xsp->RemoveComponent(_S(m_pSelectedItem->Text), _S(m_pSelectedItem->SubItems[1]->Text), _S(m_pSelectedItem->SubItems[2]->Text));
1396
						xsp->AddComponent(CyStringFromSystemString(component->GetSection()), CyStringFromSystemString(component->GetSection2()), CyStringFromSystemString(component->GetData()));
1396
						xsp->AddComponent(_S(component->GetSection()), _S(component->GetSection2()), _S(component->GetData()));
1397
						if ( !edit )
1397
						if ( !edit )
1398
							this->UpdateShipPartList();
1398
							this->UpdateShipPartList();
1399
						else
1399
						else
1400
						{
1400
						{
1401
							m_pSelectedItem->Text = component->GetSection();
1401
							m_pSelectedItem->Text = component->GetSection();
Line 1417... Line 1417...
1417
					}
1417
					}
1418
 
1418
 
1419
					if ( dummy->ShowDialog(this) == Windows::Forms::DialogResult::OK )
1419
					if ( dummy->ShowDialog(this) == Windows::Forms::DialogResult::OK )
1420
					{
1420
					{
1421
						if ( edit )
1421
						if ( edit )
1422
							xsp->RemoveDummy(CyStringFromSystemString(m_pSelectedItem->Text), CyStringFromSystemString(m_pSelectedItem->SubItems[1]->Text));
1422
							xsp->RemoveDummy(_S(m_pSelectedItem->Text), _S(m_pSelectedItem->SubItems[1]->Text));
1423
						xsp->AddDummy(CyStringFromSystemString(dummy->GetSection()), CyStringFromSystemString(dummy->GetData()));
1423
						xsp->AddDummy(_S(dummy->GetSection()), _S(dummy->GetData()));
1424
						if ( !edit )
1424
						if ( !edit )
1425
							this->UpdateShipPartList();
1425
							this->UpdateShipPartList();
1426
						else
1426
						else
1427
						{
1427
						{
1428
							m_pSelectedItem->Text = dummy->GetSection();
1428
							m_pSelectedItem->Text = dummy->GetSection();
Line 1439... Line 1439...
1439
						cockpit->SetEdit(m_pSelectedItem->Text, SystemStringFromCyString(CyStringFromSystemString(m_pSelectedItem->SubItems[2]->Text).GetToken(";", 8, 8)), CyStringFromSystemString(m_pSelectedItem->SubItems[2]->Text).GetToken(";", 9, 9).ToInt());
1439
						cockpit->SetEdit(m_pSelectedItem->Text, SystemStringFromCyString(CyStringFromSystemString(m_pSelectedItem->SubItems[2]->Text).GetToken(";", 8, 8)), CyStringFromSystemString(m_pSelectedItem->SubItems[2]->Text).GetToken(";", 9, 9).ToInt());
1440
					if ( cockpit->ShowDialog(this) == Windows::Forms::DialogResult::OK )
1440
					if ( cockpit->ShowDialog(this) == Windows::Forms::DialogResult::OK )
1441
					{
1441
					{
1442
						if ( !edit )
1442
						if ( !edit )
1443
						{
1443
						{
1444
							xsp->NewCockpit(CyStringFromSystemString(cockpit->GetID()), CyStringFromSystemString(cockpit->GetScene()), cockpit->GetMask());
1444
							xsp->NewCockpit(_S(cockpit->GetID()), _S(cockpit->GetScene()), cockpit->GetMask());
1445
							this->UpdateShipPartList();
1445
							this->UpdateShipPartList();
1446
						}
1446
						}
1447
						else
1447
						else
1448
						{
1448
						{
1449
							xsp->EditCockpit(CyStringFromSystemString(cockpit->GetID()), CyStringFromSystemString(cockpit->GetScene()), cockpit->GetMask());
1449
							xsp->EditCockpit(_S(cockpit->GetID()), _S(cockpit->GetScene()), cockpit->GetMask());
1450
							m_pSelectedItem->SubItems[2]->Text = SystemStringFromCyString(xsp->GetCockpitData(CyStringFromSystemString(cockpit->GetID())));
1450
							m_pSelectedItem->SubItems[2]->Text = SystemStringFromCyString(xsp->GetCockpitData(_S(cockpit->GetID())));
1451
						}
1451
						}
1452
					}
1452
					}
1453
				}
1453
				}
1454
				break;
1454
				break;
1455
 
1455
 
Line 1458... Line 1458...
1458
					if ( edit )
1458
					if ( edit )
1459
					{
1459
					{
1460
						InputBox ^input2 = gcnew InputBox("Enter the filename for cut id: " + SystemStringFromCyString(CyStringFromSystemString(m_pSelectedItem->Text).GetToken(";", 1, 1)), SystemStringFromCyString(CyStringFromSystemString(m_pSelectedItem->Text).GetToken(";", 2, 2)));
1460
						InputBox ^input2 = gcnew InputBox("Enter the filename for cut id: " + SystemStringFromCyString(CyStringFromSystemString(m_pSelectedItem->Text).GetToken(";", 1, 1)), SystemStringFromCyString(CyStringFromSystemString(m_pSelectedItem->Text).GetToken(";", 2, 2)));
1461
						if ( input2->ShowDialog(this) == Windows::Forms::DialogResult::OK )
1461
						if ( input2->ShowDialog(this) == Windows::Forms::DialogResult::OK )
1462
						{
1462
						{
1463
							xsp->RemoveCutData(CyStringFromSystemString(m_pSelectedItem->Text));
1463
							xsp->RemoveCutData(_S(m_pSelectedItem->Text));
1464
							xsp->AddCutData(CyStringFromSystemString(SystemStringFromCyString(CyStringFromSystemString(m_pSelectedItem->Text).GetToken(";", 1, 1)) + "; " + input2->GetInput()));
1464
							xsp->AddCutData(_S(SystemStringFromCyString(CyStringFromSystemString(m_pSelectedItem->Text).GetToken(";", 1, 1)) + "; " + input2->GetInput()));
1465
							this->UpdateShipPartList();
1465
							this->UpdateShipPartList();
1466
						}
1466
						}
1467
					}
1467
					}
1468
					else
1468
					else
1469
					{
1469
					{
Line 1471... Line 1471...
1471
						if ( input->ShowDialog(this) == Windows::Forms::DialogResult::OK )
1471
						if ( input->ShowDialog(this) == Windows::Forms::DialogResult::OK )
1472
						{
1472
						{
1473
							InputBox ^input2 = gcnew InputBox("Enter the filename for cut id: " + input->GetInput());
1473
							InputBox ^input2 = gcnew InputBox("Enter the filename for cut id: " + input->GetInput());
1474
							if ( input2->ShowDialog(this) == Windows::Forms::DialogResult::OK )
1474
							if ( input2->ShowDialog(this) == Windows::Forms::DialogResult::OK )
1475
							{
1475
							{
1476
								xsp->AddCutData(CyStringFromSystemString(input->GetInput() + "; " + input2->GetInput()));
1476
								xsp->AddCutData(_S(input->GetInput() + "; " + input2->GetInput()));
1477
								this->UpdateShipPartList();
1477
								this->UpdateShipPartList();
1478
							}
1478
							}
1479
						}
1479
						}
1480
					}
1480
					}
1481
				}
1481
				}
Line 1493... Line 1493...
1493
					}
1493
					}
1494
 
1494
 
1495
					if ( dummy->ShowDialog(this) == Windows::Forms::DialogResult::OK )
1495
					if ( dummy->ShowDialog(this) == Windows::Forms::DialogResult::OK )
1496
					{
1496
					{
1497
						if ( edit )
1497
						if ( edit )
1498
							xsp->RemoveBodies(CyStringFromSystemString(m_pSelectedItem->Text + ";" + m_pSelectedItem->SubItems[1]->Text));
1498
							xsp->RemoveBodies(_S(m_pSelectedItem->Text + ";" + m_pSelectedItem->SubItems[1]->Text));
1499
						xsp->AddBodies(CyStringFromSystemString(dummy->GetSection() + ";" + dummy->GetData()));
1499
						xsp->AddBodies(_S(dummy->GetSection() + ";" + dummy->GetData()));
1500
						if ( !edit )
1500
						if ( !edit )
1501
							this->UpdateShipPartList();
1501
							this->UpdateShipPartList();
1502
						else
1502
						else
1503
						{
1503
						{
1504
							m_pSelectedItem->Text = dummy->GetSection();
1504
							m_pSelectedItem->Text = dummy->GetSection();
Line 1513... Line 1513...
1513
					InputBox ^input = gcnew InputBox("Enter the animation data to add", (!edit) ? "" : m_pSelectedItem->Text);
1513
					InputBox ^input = gcnew InputBox("Enter the animation data to add", (!edit) ? "" : m_pSelectedItem->Text);
1514
					input->Large();
1514
					input->Large();
1515
					if ( input->ShowDialog(this) == Windows::Forms::DialogResult::OK )
1515
					if ( input->ShowDialog(this) == Windows::Forms::DialogResult::OK )
1516
					{
1516
					{
1517
						if ( edit )
1517
						if ( edit )
1518
							xsp->RemoveAnimation(CyStringFromSystemString(m_pSelectedItem->Text));
1518
							xsp->RemoveAnimation(_S(m_pSelectedItem->Text));
1519
						xsp->AddAnimation(CyStringFromSystemString(input->GetInput()));
1519
						xsp->AddAnimation(_S(input->GetInput()));
1520
						this->UpdateShipPartList();
1520
						this->UpdateShipPartList();
1521
					}
1521
					}
1522
				}
1522
				}
1523
				break;
1523
				break;
1524
		 }
1524
		 }
Line 1737... Line 1737...
1737
				if ( s )
1737
				if ( s )
1738
				{
1738
				{
1739
					switch ( type )
1739
					switch ( type )
1740
					{
1740
					{
1741
						case 0:
1741
						case 0:
1742
							((CXspFile *)m_pPackage)->AddComponent(s->data.GetToken(";", 1, 1), s->data.GetToken(";", 2, 2), s->data.GetToken(";", 3));
1742
							((CXspFile *)m_pPackage)->AddComponent(s->data.GetToken(";", 1, 1).ToString(), s->data.GetToken(";", 2, 2).ToString(), s->data.GetToken(";", 3).ToString());
1743
							break;
1743
							break;
1744
						case 2:
1744
						case 2:
1745
							((CXspFile *)m_pPackage)->AddCockpit(s->data.GetToken(" ", 2), 0, -1, s->data.GetToken(" ", 1, 1).ToInt());
1745
							((CXspFile *)m_pPackage)->AddCockpit(s->data.GetToken(" ", 2).ToString(), 0, -1, s->data.GetToken(" ", 1, 1).ToInt());
1746
							break;
1746
							break;
1747
						case 3:
1747
						case 3:
1748
							((CXspFile *)m_pPackage)->AddCutData(s->data.GetToken(" ", 2));
1748
							((CXspFile *)m_pPackage)->AddCutData(s->data.GetToken(" ", 2).ToString());
1749
							break;
1749
							break;
1750
						case 4:
1750
						case 4:
1751
							((CXspFile *)m_pPackage)->AddBodies(s->data.GetToken(" ", 2));
1751
							((CXspFile *)m_pPackage)->AddBodies(s->data.GetToken(" ", 2).ToString());
1752
							break;
1752
							break;
1753
						case 1:
1753
						case 1:
1754
							((CXspFile *)m_pPackage)->AddDummy(s->data.GetToken(" ", 2).GetToken(";", 1, 1), s->data.GetToken(" ", 2).GetToken(";", 2));
1754
							((CXspFile *)m_pPackage)->AddDummy(s->data.GetToken(" ", 2).GetToken(";", 1, 1).ToString(), s->data.GetToken(" ", 2).GetToken(";", 2).ToString());
1755
							break;
1755
							break;
1756
					}
1756
					}
1757
				}
1757
				}
1758
			}
1758
			}
1759
 
1759