Subversion Repositories spk

Rev

Rev 211 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 211 Rev 218
Line 14... Line 14...
14
	/// Summary for CustomiseGuns
14
	/// Summary for CustomiseGuns
15
	/// </summary>
15
	/// </summary>
16
	public ref class CustomiseGuns : public System::Windows::Forms::UserControl
16
	public ref class CustomiseGuns : public System::Windows::Forms::UserControl
17
	{
17
	{
18
	public:
18
	public:
19
		CustomiseGuns(Windows::Forms::Form ^parent, ImageList ^imagesSmall, ImageList ^imagesLarge, CShipData *shipData, const Utils::CStringList *models)
19
		CustomiseGuns(Windows::Forms::Form ^parent, ImageList ^imagesSmall, ImageList ^imagesLarge, CShipData *shipData, const Utils::WStringList *models)
20
		{
20
		{
21
			InitializeComponent();
21
			InitializeComponent();
22
 
22
 
23
			m_bUpdatingGunLists = false;
23
			m_bUpdatingGunLists = false;
24
			m_pParent = parent;
24
			m_pParent = parent;
Line 43... Line 43...
43
 
43
 
44
	protected:
44
	protected:
45
		Windows::Forms::Form		^m_pParent;
45
		Windows::Forms::Form		^m_pParent;
46
		CShipData					*m_pShipData;
46
		CShipData					*m_pShipData;
47
		bool						 m_bUpdatingGunLists;
47
		bool						 m_bUpdatingGunLists;
48
		const Utils::CStringList	*_pModels;
48
		const Utils::WStringList	*_pModels;
49
		/// <summary>
49
		/// <summary>
50
		/// Clean up any resources being used.
50
		/// Clean up any resources being used.
51
		/// </summary>
51
		/// </summary>
52
		~CustomiseGuns()
52
		~CustomiseGuns()
53
		{
53
		{
Line 546... Line 546...
546
				 w->sModel1 = L"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.toWString();
551
				 w->sModel1 = _pModels->get(w->iNode1)->str;
552
			 }
552
			 }
553
 
553
 
554
			 m_pShipData->UpdateGunEntries();
554
			 m_pShipData->UpdateGunEntries();
555
			 this->ChangeGunValues();
555
			 this->ChangeGunValues();
556
		 }
556
		 }
Line 568... Line 568...
568
				 w->sModel2 = L"";
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.toWString();
573
				 w->sModel2 = _pModels->get(w->iNode2)->str;
574
			 }
574
			 }
575
 
575
 
576
			 m_pShipData->UpdateGunEntries();
576
			 m_pShipData->UpdateGunEntries();
577
			 this->ChangeGunValues();
577
			 this->ChangeGunValues();
578
		 }
578
		 }