Subversion Repositories spk

Rev

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

Rev 217 Rev 224
Line 123... Line 123...
123
			ofd->RestoreDirectory = true;
123
			ofd->RestoreDirectory = true;
124
			ofd->AddExtension =  true;
124
			ofd->AddExtension =  true;
125
			ofd->Title = "Select the archive to export to";
125
			ofd->Title = "Select the archive to export to";
126
			if ( ofd->ShowDialog(this) == Windows::Forms::DialogResult::OK )
126
			if ( ofd->ShowDialog(this) == Windows::Forms::DialogResult::OK )
127
			{
127
			{
128
				if ( m_pPackage->saveToArchive(_S(ofd->FileName), game, m_pP->GetGameExe()) )
128
				if ( m_pPackage->saveToArchive(_WS(ofd->FileName), game, m_pP->GetGameExe()) )
129
					MessageBox::Show(this, "Package saved to archive, " + ofd->FileName, "Package Exported", MessageBoxButtons::OK, MessageBoxIcon::Information);
129
					MessageBox::Show(this, "Package saved to archive, " + ofd->FileName, "Package Exported", MessageBoxButtons::OK, MessageBoxIcon::Information);
130
				else
130
				else
131
					MessageBox::Show(this, "Unable to export to archive, " + ofd->FileName, "Export Failed", MessageBoxButtons::OK, MessageBoxIcon::Error);
131
					MessageBox::Show(this, "Unable to export to archive, " + ofd->FileName, "Export Failed", MessageBoxButtons::OK, MessageBoxIcon::Error);
132
			}
132
			}
133
		}
133
		}
Line 4204... Line 4204...
4204
		 }
4204
		 }
4205
private: System::Void addMirrorToolStripMenuItem_Click(System::Object^  sender, System::EventArgs^  e) {
4205
private: System::Void addMirrorToolStripMenuItem_Click(System::Object^  sender, System::EventArgs^  e) {
4206
			 InputBox ^input = gcnew InputBox("Enter the web address to add", "http://");
4206
			 InputBox ^input = gcnew InputBox("Enter the web address to add", "http://");
4207
			if ( input->ShowDialog(this) == System::Windows::Forms::DialogResult::OK )
4207
			if ( input->ShowDialog(this) == System::Windows::Forms::DialogResult::OK )
4208
			{
4208
			{
4209
				m_pPackage->addWebMirror(_S(input->GetInput()));
4209
				m_pPackage->addWebMirror(_WS(input->GetInput()));
4210
				this->UpdateChanged();
4210
				this->UpdateChanged();
4211
				this->UpdateMirrors();
4211
				this->UpdateMirrors();
4212
			}
4212
			}
4213
		 }
4213
		 }
4214
private: System::Void ContextRemoveMirror_Click(System::Object^  sender, System::EventArgs^  e) {
4214
private: System::Void ContextRemoveMirror_Click(System::Object^  sender, System::EventArgs^  e) {
4215
			if ( m_pSelectedItem )
4215
			if ( m_pSelectedItem )
4216
			{
4216
			{
4217
				m_pPackage->removeWebMirror(_S(m_pSelectedItem->Text));
4217
				m_pPackage->removeWebMirror(_WS(m_pSelectedItem->Text));
4218
				this->UpdateMirrors();
4218
				this->UpdateMirrors();
4219
				this->UpdateChanged();
4219
				this->UpdateChanged();
4220
			}
4220
			}
4221
		 }
4221
		 }
4222
private: System::Void ContextLangName_Opening(System::Object^  sender, System::ComponentModel::CancelEventArgs^  e) {
4222
private: System::Void ContextLangName_Opening(System::Object^  sender, System::ComponentModel::CancelEventArgs^  e) {
Line 4932... Line 4932...
4932
			 {
4932
			 {
4933
				 ListViewItem ^item = this->ListMirrors->SelectedItems[0];
4933
				 ListViewItem ^item = this->ListMirrors->SelectedItems[0];
4934
				InputBox ^input = gcnew InputBox("Enter the web address for the mirror", item->Text);
4934
				InputBox ^input = gcnew InputBox("Enter the web address for the mirror", item->Text);
4935
				if ( input->ShowDialog(this) == System::Windows::Forms::DialogResult::OK )
4935
				if ( input->ShowDialog(this) == System::Windows::Forms::DialogResult::OK )
4936
				{
4936
				{
4937
					m_pPackage->removeWebMirror(_S(item->Text));
4937
					m_pPackage->removeWebMirror(_WS(item->Text));
4938
					m_pPackage->addWebMirror(_S(input->GetInput()));
4938
					m_pPackage->addWebMirror(_WS(input->GetInput()));
4939
					item->Text = input->GetInput();
4939
					item->Text = input->GetInput();
4940
					this->UpdateChanged();
4940
					this->UpdateChanged();
4941
				}
4941
				}
4942
			 }
4942
			 }
4943
		 }
4943
		 }
Line 5489... Line 5489...
5489
				 InputBox ^input = gcnew InputBox("Enter the name you want the mod to be called");
5489
				 InputBox ^input = gcnew InputBox("Enter the name you want the mod to be called");
5490
				 if ( input->ShowDialog(this) == Windows::Forms::DialogResult::OK )
5490
				 if ( input->ShowDialog(this) == Windows::Forms::DialogResult::OK )
5491
				 {
5491
				 {
5492
					 if ( input->GetInput()->Length )
5492
					 if ( input->GetInput()->Length )
5493
					 {
5493
					 {
5494
						 m_pPackage->convertNormalMod(f, _S(input->GetInput()));
5494
						 m_pPackage->convertNormalMod(f, _WS(input->GetInput()));
5495
						 this->UpdateFileList();
5495
						 this->UpdateFileList();
5496
					 }
5496
					 }
5497
				 }
5497
				 }
5498
			 }
5498
			 }
5499
		 }
5499
		 }
Line 5508... Line 5508...
5508
				 InputBox ^input = gcnew InputBox("Enter the new file name to change to", _US(f->baseName()));
5508
				 InputBox ^input = gcnew InputBox("Enter the new file name to change to", _US(f->baseName()));
5509
				 if ( input->ShowDialog(this) == Windows::Forms::DialogResult::OK )
5509
				 if ( input->ShowDialog(this) == Windows::Forms::DialogResult::OK )
5510
				 {
5510
				 {
5511
					 if ( input->GetInput()->Length )
5511
					 if ( input->GetInput()->Length )
5512
					 {
5512
					 {
5513
						 m_pPackage->renameFile(f, _S(input->GetInput()));
5513
						 m_pPackage->renameFile(f, _WS(input->GetInput()));
5514
						 this->UpdateFileList();
5514
						 this->UpdateFileList();
5515
					 }
5515
					 }
5516
				 }
5516
				 }
5517
			 }
5517
			 }
5518
		 }
5518
		 }
Line 5563... Line 5563...
5563
private: System::Void ButGameAdd_Click(System::Object^  sender, System::EventArgs^  e) {
5563
private: System::Void ButGameAdd_Click(System::Object^  sender, System::EventArgs^  e) {
5564
			 if ( ButGame->ImageIndex < 0 )
5564
			 if ( ButGame->ImageIndex < 0 )
5565
				 return;
5565
				 return;
5566
 
5566
 
5567
			 if ( this->TextExactVersion->Visible )
5567
			 if ( this->TextExactVersion->Visible )
5568
				m_pPackage->AddGameCompatability(ButGame->ImageIndex + 1, _S(this->TextExactVersion->Text));
5568
				m_pPackage->AddGameCompatability(ButGame->ImageIndex + 1, _WS(this->TextExactVersion->Text));
5569
			 else
5569
			 else
5570
				m_pPackage->AddGameCompatability(ButGame->ImageIndex + 1, (long)this->ComboVersion->SelectedIndex);
5570
				m_pPackage->AddGameCompatability(ButGame->ImageIndex + 1, (long)this->ComboVersion->SelectedIndex);
5571
 
5571
 
5572
			 this->UpdateGamesList();
5572
			 this->UpdateGamesList();
5573
			 ButGame->Text = "- Select Game -";
5573
			 ButGame->Text = "- Select Game -";