Subversion Repositories spk

Rev

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

Rev 170 Rev 211
Line 541... Line 541...
541
			 SWeaponGroup *w = g->lWeapons.Get(Convert::ToInt32(this->ListGuns->SelectedItems[0]->Tag));
541
			 SWeaponGroup *w = g->lWeapons.Get(Convert::ToInt32(this->ListGuns->SelectedItems[0]->Tag));
542
 
542
 
543
			 if ( this->ComboAutoPrimary->SelectedIndex == 0 )
543
			 if ( this->ComboAutoPrimary->SelectedIndex == 0 )
544
			 {
544
			 {
545
				 w->iNode1 = 0;
545
				 w->iNode1 = 0;
546
				 w->sModel1 = "0";
546
				 w->sModel1 = L"0";
547
			 }
547
			 }
548
			 else
548
			 else
549
			 {
549
			 {
550
				 w->iNode1 = this->ComboAutoPrimary->SelectedIndex - 1;
550
				 w->iNode1 = this->ComboAutoPrimary->SelectedIndex - 1;
551
				 w->sModel1 = _pModels->get(w->iNode1)->str;
551
				 w->sModel1 = _pModels->get(w->iNode1)->str.toWString();
552
			 }
552
			 }
553
 
553
 
554
			 m_pShipData->UpdateGunEntries();
554
			 m_pShipData->UpdateGunEntries();
555
			 this->ChangeGunValues();
555
			 this->ChangeGunValues();
556
		 }
556
		 }
Line 563... Line 563...
563
			 SWeaponGroup *w = g->lWeapons.Get(Convert::ToInt32(this->ListGuns->SelectedItems[0]->Tag));
563
			 SWeaponGroup *w = g->lWeapons.Get(Convert::ToInt32(this->ListGuns->SelectedItems[0]->Tag));
564
 
564
 
565
			 if ( this->ComboAutoSecondary->SelectedIndex == 0 )
565
			 if ( this->ComboAutoSecondary->SelectedIndex == 0 )
566
			 {
566
			 {
567
				 w->iNode2 = -1;
567
				 w->iNode2 = -1;
568
				 w->sModel2 = "";
568
				 w->sModel2 = L"";
569
			 }
569
			 }
570
			 else
570
			 else
571
			 {
571
			 {
572
				 w->iNode2 = this->ComboAutoSecondary->SelectedIndex - 1;
572
				 w->iNode2 = this->ComboAutoSecondary->SelectedIndex - 1;
573
				 w->sModel2 = _pModels->get(w->iNode2)->str;
573
				 w->sModel2 = _pModels->get(w->iNode2)->str.toWString();
574
			 }
574
			 }
575
 
575
 
576
			 m_pShipData->UpdateGunEntries();
576
			 m_pShipData->UpdateGunEntries();
577
			 this->ChangeGunValues();
577
			 this->ChangeGunValues();
578
		 }
578
		 }
Line 586... Line 586...
586
		 }
586
		 }
587
private: System::Void addGunToolStripMenuItem_Click(System::Object^  sender, System::EventArgs^  e) {
587
private: System::Void addGunToolStripMenuItem_Click(System::Object^  sender, System::EventArgs^  e) {
588
			 SGunGroup *g = m_pShipData->lGuns.Get(Convert::ToInt32(this->ListTurrets->SelectedItems[0]->Tag));
588
			 SGunGroup *g = m_pShipData->lGuns.Get(Convert::ToInt32(this->ListTurrets->SelectedItems[0]->Tag));
589
			 SWeaponGroup *w = new SWeaponGroup;
589
			 SWeaponGroup *w = new SWeaponGroup;
590
			 w->iNode1 = 0;
590
			 w->iNode1 = 0;
591
			 w->sModel1 = "0";
591
			 w->sModel1 = L"0";
592
			 w->iNode2 = -1;
592
			 w->iNode2 = -1;
593
			 g->lWeapons.push_back(w);
593
			 g->lWeapons.push_back(w);
594
 
594
 
595
			 m_pShipData->UpdateGunEntries();
595
			 m_pShipData->UpdateGunEntries();
596
			 this->ChangeGunValues();
596
			 this->ChangeGunValues();
Line 622... Line 622...
622
			 SWeaponGroup *w = g->lWeapons.Get(Convert::ToInt32(this->ListGuns->SelectedItems[0]->Tag));
622
			 SWeaponGroup *w = g->lWeapons.Get(Convert::ToInt32(this->ListGuns->SelectedItems[0]->Tag));
623
 
623
 
624
			 if ( this->CheckManualPrimary->Checked )
624
			 if ( this->CheckManualPrimary->Checked )
625
			 {
625
			 {
626
				 w->iNode1 = Convert::ToInt32(this->NumManualPrimary->Value);
626
				 w->iNode1 = Convert::ToInt32(this->NumManualPrimary->Value);
627
				 w->sModel1 = _S(this->TextManualPrimary->Text);
627
				 w->sModel1 = _WS(this->TextManualPrimary->Text);
628
			 }
628
			 }
629
			 else
629
			 else
630
			 {
630
			 {
631
				 w->iNode1 = 0;
631
				 w->iNode1 = 0;
632
				 w->sModel1 = "0";
632
				 w->sModel1 = L"0";
633
			 }
633
			 }
634
			 if ( this->CheckManualSecondary->Checked )
634
			 if ( this->CheckManualSecondary->Checked )
635
			 {
635
			 {
636
				 w->iNode2 = Convert::ToInt32(this->NumManualSecondary->Value);
636
				 w->iNode2 = Convert::ToInt32(this->NumManualSecondary->Value);
637
				 w->sModel2 = _S(this->TextManualSecondary->Text);
637
				 w->sModel2 = _WS(this->TextManualSecondary->Text);
638
			 }
638
			 }
639
			 else
639
			 else
640
			 {
640
			 {
641
				 w->iNode2 = -1;
641
				 w->iNode2 = -1;
642
				 w->sModel2 = "";
642
				 w->sModel2 = L"";
643
			 }
643
			 }
644
			 m_pShipData->UpdateGunEntries();
644
			 m_pShipData->UpdateGunEntries();
645
			 this->ChangeGunValues();
645
			 this->ChangeGunValues();
646
		 }
646
		 }
647
private: System::Void CheckManualPrimary_CheckedChanged(System::Object^  sender, System::EventArgs^  e) {
647
private: System::Void CheckManualPrimary_CheckedChanged(System::Object^  sender, System::EventArgs^  e) {