Subversion Repositories spk

Rev

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

Rev 6 Rev 10
Line 102... Line 102...
102
		if ( this->ComboType->SelectedIndex == CSpkFile::SCRIPTTYPE_CUSTOM )
102
		if ( this->ComboType->SelectedIndex == CSpkFile::SCRIPTTYPE_CUSTOM )
103
		{
103
		{
104
			this->TextCustomType->Visible = true;
104
			this->TextCustomType->Visible = true;
105
			this->ComboType->Dock = Windows::Forms::DockStyle::Left;
105
			this->ComboType->Dock = Windows::Forms::DockStyle::Left;
106
			if ( !m_bLoading )
106
			if ( !m_bLoading )
107
				((CSpkFile *)m_pPackage)->SetScriptType(CyStringFromSystemString(this->TextCustomType->Text));
107
				((CSpkFile *)m_pPackage)->SetScriptType(CyStringFromSystemString(this->TextCustomType->Text).ToString());
108
		 }
108
		 }
109
		 else
109
		 else
110
		 {
110
		 {
111
			 this->TextCustomType->Visible = false;
111
			 this->TextCustomType->Visible = false;
112
			 this->ComboType->Dock = Windows::Forms::DockStyle::Fill;
112
			 this->ComboType->Dock = Windows::Forms::DockStyle::Fill;
Line 270... Line 270...
270
		this->ListWareText->Items->Clear();
270
		this->ListWareText->Items->Clear();
271
		this->splitContainer1->Panel2Collapsed = true;
271
		this->splitContainer1->Panel2Collapsed = true;
272
 
272
 
273
		if ( this->ListWares->SelectedItems->Count )
273
		if ( this->ListWares->SelectedItems->Count )
274
		{
274
		{
275
			SWares *w = ((CSpkFile *)m_pPackage)->FindWare(CyStringFromSystemString(this->ListWares->SelectedItems[0]->Text));
275
			SWares *w = ((CSpkFile *)m_pPackage)->FindWare(CyStringFromSystemString(this->ListWares->SelectedItems[0]->Text).ToString());
276
			if ( w )
276
			if ( w )
277
			{
277
			{
278
				if ( w->iTextPage <= 0 && w->iTextID <= 0 )
278
				if ( w->iTextPage <= 0 && w->iTextID <= 0 )
279
				{			
279
				{			
280
					this->ListWareText->Items->Clear();
280
					this->ListWareText->Items->Clear();
Line 839... Line 839...
839
		this->ButGameAdd->Enabled = false;
839
		this->ButGameAdd->Enabled = false;
840
 
840
 
841
		m_pTypeList->Clear();
841
		m_pTypeList->Clear();
842
		for ( int i = 0; i < CSpkFile::SCRIPTTYPE_MAX; i++ )
842
		for ( int i = 0; i < CSpkFile::SCRIPTTYPE_MAX; i++ )
843
		{
843
		{
844
			m_pTypeList->PushBack(CSpkFile::GetScriptTypeStringStatic(i));
844
			m_pTypeList->PushBack(CSpkFile::GetScriptTypeStringStatic(i).c_str());
845
			ComboType->Items->Add(SystemStringFromCyString(CSpkFile::GetScriptTypeStringStatic(i)));
845
			ComboType->Items->Add(SystemStringFromCyString(CSpkFile::GetScriptTypeStringStatic(i)));
846
		}
846
		}
847
 
847
 
848
		this->CreationDate->Value = DateTime::Today;
848
		this->CreationDate->Value = DateTime::Today;
849
 
849
 
Line 1074... Line 1074...
1074
					return false;
1074
					return false;
1075
				}
1075
				}
1076
			}
1076
			}
1077
			else if ( ((CSpkFile *)m_pPackage)->IsPatch() )
1077
			else if ( ((CSpkFile *)m_pPackage)->IsPatch() )
1078
			{
1078
			{
1079
				if ( ((CSpkFile *)m_pPackage)->GetOtherAuthor().Empty() || ((CSpkFile *)m_pPackage)->GetOtherName().Empty() )
1079
				if ( ((CSpkFile *)m_pPackage)->GetOtherAuthor().empty() || ((CSpkFile *)m_pPackage)->GetOtherName().empty() )
1080
				{
1080
				{
1081
					MessageBox::Show(this, "For a mod patch, you must specify the parent mod that this will be patching\nEnter the parent mod name and author", "Invalid Entry", MessageBoxButtons::OK, MessageBoxIcon::Stop);
1081
					MessageBox::Show(this, "For a mod patch, you must specify the parent mod that this will be patching\nEnter the parent mod name and author", "Invalid Entry", MessageBoxButtons::OK, MessageBoxIcon::Stop);
1082
					return false;
1082
					return false;
1083
				}
1083
				}
1084
			}
1084
			}