Rev 191 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
#pragma once
using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Windows::Forms;
using namespace System::Data;
using namespace System::Drawing;
#include <spk.h>
namespace SpkExplorer {
/// <summary>
/// Summary for PackageInfo
///
/// WARNING: If you change the name of this class, you will need to change the
/// 'Resource File Name' property for the managed resource compiler tool
/// associated with all .resx files this class depends on. Otherwise,
/// the designers will not be able to interact properly with localized
/// resources associated with this form.
/// </summary>
public ref class PackageInfo : public System::Windows::Forms::Form
{
public:
PackageInfo(CBaseFile *p, int lang)
{
InitializeComponent();
m_pPackage = p;
m_iLang = lang;
if ( p )
this->UpdatePackage();
else
this->Close();
}
protected:
/// <summary>
/// Clean up any resources being used.
/// </summary>
~PackageInfo()
{
if (components)
{
delete components;
}
}
void UpdatePackage()
{
this->label2->Text = _US(m_pPackage->name(m_iLang));
this->label3->Text = _US(m_pPackage->author());
this->label5->Text = _US(m_pPackage->version());
if ( m_pPackage->creationDate().empty() )
this->label7->Text = "(none)";
else
this->label7->Text = _US(m_pPackage->creationDate());
if ( m_pPackage->description().empty() )
this->label9->Text = "(no description)";
else
this->label9->Text = _US(m_pPackage->description().findReplace("<br>", "\n").stripHtml());
if ( m_pPackage->GetType() == TYPE_SPK )
{
this->label11->Text = _US(((CSpkFile *)m_pPackage)->scriptTypeString(m_iLang));
switch ( m_pPackage->pluginType() )
{
case PLUGIN_NORMAL: this->LabelPlugin->Text = "Normal"; break;
case PLUGIN_STABLE: this->LabelPlugin->Text = "Stable"; break;
case PLUGIN_EXPERIMENTAL: this->LabelPlugin->Text = "Experimental";break;
case PLUGIN_CHEAT: this->LabelPlugin->Text = "Cheat"; break;
case PLUGIN_MOD: this->LabelPlugin->Text = "Mod"; break;
}
}
else if ( m_pPackage->GetType() == TYPE_XSP )
{
this->label11->Text = "Ship";
this->LabelPlugin->Text = "Ship";
}
else
{
this->label11->Text = "Generic Package";
this->LabelPlugin->Text = "";
}
CPackages p;
p.startup("", "", "", "");
if ( !m_pPackage->AnyGameCompatability() )
this->label13->Text = "All X Games";
else
this->label13->Text = _US(p.getGameTypesString(m_pPackage, true));
if ( m_pPackage->IsSigned() )
this->panel11->Show();
else
this->panel11->Hide();
}
CBaseFile *m_pPackage;
int m_iLang;
private: System::Windows::Forms::Label^ label1;
private: System::Windows::Forms::Panel^ panel1;
private: System::Windows::Forms::Label^ label2;
private: System::Windows::Forms::Panel^ panel2;
private: System::Windows::Forms::Panel^ panel5;
private: System::Windows::Forms::Label^ label7;
private: System::Windows::Forms::Label^ label8;
private: System::Windows::Forms::Panel^ panel4;
private: System::Windows::Forms::Label^ label5;
private: System::Windows::Forms::Label^ label6;
private: System::Windows::Forms::Panel^ panel3;
private: System::Windows::Forms::Label^ label3;
private: System::Windows::Forms::Label^ label4;
private: System::Windows::Forms::Button^ button1;
private: System::Windows::Forms::Panel^ panel6;
private: System::Windows::Forms::Panel^ panel7;
private: System::Windows::Forms::Label^ label9;
private: System::Windows::Forms::Label^ label10;
private: System::Windows::Forms::Panel^ panel8;
private: System::Windows::Forms::Label^ label11;
private: System::Windows::Forms::Label^ label12;
private: System::Windows::Forms::Panel^ panel9;
private: System::Windows::Forms::Label^ label13;
private: System::Windows::Forms::Label^ label14;
private: System::Windows::Forms::Panel^ panel10;
private: System::Windows::Forms::Label^ LabelPlugin;
private: System::Windows::Forms::Label^ label16;
private: System::Windows::Forms::Panel^ panel11;
private: System::Windows::Forms::Label^ label17;
/// <summary>
/// Required designer variable.
/// </summary>
System::ComponentModel::Container ^components;
#pragma region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
void InitializeComponent(void)
{
this->label1 = (gcnew System::Windows::Forms::Label());
this->panel1 = (gcnew System::Windows::Forms::Panel());
this->label2 = (gcnew System::Windows::Forms::Label());
this->panel2 = (gcnew System::Windows::Forms::Panel());
this->panel9 = (gcnew System::Windows::Forms::Panel());
this->label13 = (gcnew System::Windows::Forms::Label());
this->label14 = (gcnew System::Windows::Forms::Label());
this->panel7 = (gcnew System::Windows::Forms::Panel());
this->label9 = (gcnew System::Windows::Forms::Label());
this->label10 = (gcnew System::Windows::Forms::Label());
this->panel10 = (gcnew System::Windows::Forms::Panel());
this->LabelPlugin = (gcnew System::Windows::Forms::Label());
this->label16 = (gcnew System::Windows::Forms::Label());
this->panel8 = (gcnew System::Windows::Forms::Panel());
this->label11 = (gcnew System::Windows::Forms::Label());
this->label12 = (gcnew System::Windows::Forms::Label());
this->panel5 = (gcnew System::Windows::Forms::Panel());
this->label7 = (gcnew System::Windows::Forms::Label());
this->label8 = (gcnew System::Windows::Forms::Label());
this->panel4 = (gcnew System::Windows::Forms::Panel());
this->label5 = (gcnew System::Windows::Forms::Label());
this->label6 = (gcnew System::Windows::Forms::Label());
this->panel3 = (gcnew System::Windows::Forms::Panel());
this->label3 = (gcnew System::Windows::Forms::Label());
this->label4 = (gcnew System::Windows::Forms::Label());
this->button1 = (gcnew System::Windows::Forms::Button());
this->panel6 = (gcnew System::Windows::Forms::Panel());
this->panel11 = (gcnew System::Windows::Forms::Panel());
this->label17 = (gcnew System::Windows::Forms::Label());
this->panel1->SuspendLayout();
this->panel2->SuspendLayout();
this->panel9->SuspendLayout();
this->panel7->SuspendLayout();
this->panel10->SuspendLayout();
this->panel8->SuspendLayout();
this->panel5->SuspendLayout();
this->panel4->SuspendLayout();
this->panel3->SuspendLayout();
this->panel6->SuspendLayout();
this->panel11->SuspendLayout();
this->SuspendLayout();
//
// label1
//
this->label1->Dock = System::Windows::Forms::DockStyle::Left;
this->label1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 9.75F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(0)));
this->label1->Location = System::Drawing::Point(0, 5);
this->label1->Name = L"label1";
this->label1->Size = System::Drawing::Size(139, 18);
this->label1->TabIndex = 0;
this->label1->Text = L"Package Name";
this->label1->TextAlign = System::Drawing::ContentAlignment::MiddleLeft;
//
// panel1
//
this->panel1->Controls->Add(this->label2);
this->panel1->Controls->Add(this->label1);
this->panel1->Dock = System::Windows::Forms::DockStyle::Top;
this->panel1->Location = System::Drawing::Point(10, 10);
this->panel1->Name = L"panel1";
this->panel1->Padding = System::Windows::Forms::Padding(0, 5, 0, 5);
this->panel1->Size = System::Drawing::Size(465, 28);
this->panel1->TabIndex = 1;
//
// label2
//
this->label2->Dock = System::Windows::Forms::DockStyle::Fill;
this->label2->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 9.75F, System::Drawing::FontStyle::Italic, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(0)));
this->label2->Location = System::Drawing::Point(139, 5);
this->label2->Name = L"label2";
this->label2->Size = System::Drawing::Size(326, 18);
this->label2->TabIndex = 1;
this->label2->Text = L"label2";
this->label2->TextAlign = System::Drawing::ContentAlignment::MiddleLeft;
//
// panel2
//
this->panel2->BorderStyle = System::Windows::Forms::BorderStyle::Fixed3D;
this->panel2->Controls->Add(this->panel11);
this->panel2->Controls->Add(this->panel9);
this->panel2->Controls->Add(this->panel7);
this->panel2->Controls->Add(this->panel10);
this->panel2->Controls->Add(this->panel8);
this->panel2->Controls->Add(this->panel5);
this->panel2->Controls->Add(this->panel4);
this->panel2->Controls->Add(this->panel3);
this->panel2->Controls->Add(this->panel1);
this->panel2->Dock = System::Windows::Forms::DockStyle::Fill;
this->panel2->Location = System::Drawing::Point(0, 0);
this->panel2->Name = L"panel2";
this->panel2->Padding = System::Windows::Forms::Padding(10);
this->panel2->Size = System::Drawing::Size(489, 331);
this->panel2->TabIndex = 2;
//
// panel9
//
this->panel9->Controls->Add(this->label13);
this->panel9->Controls->Add(this->label14);
this->panel9->Dock = System::Windows::Forms::DockStyle::Top;
this->panel9->Location = System::Drawing::Point(10, 261);
this->panel9->Name = L"panel9";
this->panel9->Padding = System::Windows::Forms::Padding(0, 5, 0, 5);
this->panel9->Size = System::Drawing::Size(465, 28);
this->panel9->TabIndex = 7;
//
// label13
//
this->label13->Dock = System::Windows::Forms::DockStyle::Fill;
this->label13->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 9.75F, System::Drawing::FontStyle::Italic, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(0)));
this->label13->Location = System::Drawing::Point(139, 5);
this->label13->Name = L"label13";
this->label13->Size = System::Drawing::Size(326, 18);
this->label13->TabIndex = 1;
this->label13->Text = L"label13";
this->label13->TextAlign = System::Drawing::ContentAlignment::MiddleLeft;
//
// label14
//
this->label14->Dock = System::Windows::Forms::DockStyle::Left;
this->label14->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 9.75F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(0)));
this->label14->Location = System::Drawing::Point(0, 5);
this->label14->Name = L"label14";
this->label14->Size = System::Drawing::Size(139, 18);
this->label14->TabIndex = 0;
this->label14->Text = L"Game Requied";
this->label14->TextAlign = System::Drawing::ContentAlignment::MiddleLeft;
//
// panel7
//
this->panel7->Controls->Add(this->label9);
this->panel7->Controls->Add(this->label10);
this->panel7->Dock = System::Windows::Forms::DockStyle::Top;
this->panel7->Location = System::Drawing::Point(10, 179);
this->panel7->Name = L"panel7";
this->panel7->Padding = System::Windows::Forms::Padding(0, 5, 0, 5);
this->panel7->Size = System::Drawing::Size(465, 82);
this->panel7->TabIndex = 5;
//
// label9
//
this->label9->Dock = System::Windows::Forms::DockStyle::Fill;
this->label9->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 9.75F, System::Drawing::FontStyle::Italic, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(0)));
this->label9->Location = System::Drawing::Point(139, 5);
this->label9->Name = L"label9";
this->label9->Size = System::Drawing::Size(326, 72);
this->label9->TabIndex = 1;
this->label9->Text = L"label9";
this->label9->TextAlign = System::Drawing::ContentAlignment::MiddleLeft;
//
// label10
//
this->label10->Dock = System::Windows::Forms::DockStyle::Left;
this->label10->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 9.75F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(0)));
this->label10->Location = System::Drawing::Point(0, 5);
this->label10->Name = L"label10";
this->label10->Size = System::Drawing::Size(139, 72);
this->label10->TabIndex = 0;
this->label10->Text = L"Description";
this->label10->TextAlign = System::Drawing::ContentAlignment::MiddleLeft;
//
// panel10
//
this->panel10->Controls->Add(this->LabelPlugin);
this->panel10->Controls->Add(this->label16);
this->panel10->Dock = System::Windows::Forms::DockStyle::Top;
this->panel10->Location = System::Drawing::Point(10, 151);
this->panel10->Name = L"panel10";
this->panel10->Padding = System::Windows::Forms::Padding(0, 5, 0, 5);
this->panel10->Size = System::Drawing::Size(465, 28);
this->panel10->TabIndex = 8;
//
// LabelPlugin
//
this->LabelPlugin->Dock = System::Windows::Forms::DockStyle::Fill;
this->LabelPlugin->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 9.75F, System::Drawing::FontStyle::Italic, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(0)));
this->LabelPlugin->Location = System::Drawing::Point(139, 5);
this->LabelPlugin->Name = L"LabelPlugin";
this->LabelPlugin->Size = System::Drawing::Size(326, 18);
this->LabelPlugin->TabIndex = 1;
this->LabelPlugin->Text = L"label15";
this->LabelPlugin->TextAlign = System::Drawing::ContentAlignment::MiddleLeft;
//
// label16
//
this->label16->Dock = System::Windows::Forms::DockStyle::Left;
this->label16->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 9.75F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(0)));
this->label16->Location = System::Drawing::Point(0, 5);
this->label16->Name = L"label16";
this->label16->Size = System::Drawing::Size(139, 18);
this->label16->TabIndex = 0;
this->label16->Text = L"Plugin Type";
this->label16->TextAlign = System::Drawing::ContentAlignment::MiddleLeft;
//
// panel8
//
this->panel8->Controls->Add(this->label11);
this->panel8->Controls->Add(this->label12);
this->panel8->Dock = System::Windows::Forms::DockStyle::Top;
this->panel8->Location = System::Drawing::Point(10, 123);
this->panel8->Name = L"panel8";
this->panel8->Padding = System::Windows::Forms::Padding(0, 5, 0, 5);
this->panel8->Size = System::Drawing::Size(465, 28);
this->panel8->TabIndex = 6;
//
// label11
//
this->label11->Dock = System::Windows::Forms::DockStyle::Fill;
this->label11->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 9.75F, System::Drawing::FontStyle::Italic, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(0)));
this->label11->Location = System::Drawing::Point(139, 5);
this->label11->Name = L"label11";
this->label11->Size = System::Drawing::Size(326, 18);
this->label11->TabIndex = 1;
this->label11->Text = L"label11";
this->label11->TextAlign = System::Drawing::ContentAlignment::MiddleLeft;
//
// label12
//
this->label12->Dock = System::Windows::Forms::DockStyle::Left;
this->label12->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 9.75F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(0)));
this->label12->Location = System::Drawing::Point(0, 5);
this->label12->Name = L"label12";
this->label12->Size = System::Drawing::Size(139, 18);
this->label12->TabIndex = 0;
this->label12->Text = L"Package Type";
this->label12->TextAlign = System::Drawing::ContentAlignment::MiddleLeft;
//
// panel5
//
this->panel5->Controls->Add(this->label7);
this->panel5->Controls->Add(this->label8);
this->panel5->Dock = System::Windows::Forms::DockStyle::Top;
this->panel5->Location = System::Drawing::Point(10, 95);
this->panel5->Name = L"panel5";
this->panel5->Padding = System::Windows::Forms::Padding(0, 5, 0, 5);
this->panel5->Size = System::Drawing::Size(465, 28);
this->panel5->TabIndex = 4;
//
// label7
//
this->label7->Dock = System::Windows::Forms::DockStyle::Fill;
this->label7->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 9.75F, System::Drawing::FontStyle::Italic, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(0)));
this->label7->Location = System::Drawing::Point(139, 5);
this->label7->Name = L"label7";
this->label7->Size = System::Drawing::Size(326, 18);
this->label7->TabIndex = 1;
this->label7->Text = L"label7";
this->label7->TextAlign = System::Drawing::ContentAlignment::MiddleLeft;
//
// label8
//
this->label8->Dock = System::Windows::Forms::DockStyle::Left;
this->label8->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 9.75F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(0)));
this->label8->Location = System::Drawing::Point(0, 5);
this->label8->Name = L"label8";
this->label8->Size = System::Drawing::Size(139, 18);
this->label8->TabIndex = 0;
this->label8->Text = L"Creation Date";
this->label8->TextAlign = System::Drawing::ContentAlignment::MiddleLeft;
//
// panel4
//
this->panel4->Controls->Add(this->label5);
this->panel4->Controls->Add(this->label6);
this->panel4->Dock = System::Windows::Forms::DockStyle::Top;
this->panel4->Location = System::Drawing::Point(10, 64);
this->panel4->Name = L"panel4";
this->panel4->Padding = System::Windows::Forms::Padding(0, 5, 0, 5);
this->panel4->Size = System::Drawing::Size(465, 31);
this->panel4->TabIndex = 3;
//
// label5
//
this->label5->Dock = System::Windows::Forms::DockStyle::Fill;
this->label5->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 9.75F, System::Drawing::FontStyle::Italic, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(0)));
this->label5->Location = System::Drawing::Point(139, 5);
this->label5->Name = L"label5";
this->label5->Size = System::Drawing::Size(326, 21);
this->label5->TabIndex = 1;
this->label5->Text = L"label5";
this->label5->TextAlign = System::Drawing::ContentAlignment::MiddleLeft;
//
// label6
//
this->label6->Dock = System::Windows::Forms::DockStyle::Left;
this->label6->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 9.75F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(0)));
this->label6->Location = System::Drawing::Point(0, 5);
this->label6->Name = L"label6";
this->label6->Size = System::Drawing::Size(139, 21);
this->label6->TabIndex = 0;
this->label6->Text = L"Version";
this->label6->TextAlign = System::Drawing::ContentAlignment::MiddleLeft;
//
// panel3
//
this->panel3->Controls->Add(this->label3);
this->panel3->Controls->Add(this->label4);
this->panel3->Dock = System::Windows::Forms::DockStyle::Top;
this->panel3->Location = System::Drawing::Point(10, 38);
this->panel3->Name = L"panel3";
this->panel3->Padding = System::Windows::Forms::Padding(0, 5, 0, 5);
this->panel3->Size = System::Drawing::Size(465, 26);
this->panel3->TabIndex = 2;
//
// label3
//
this->label3->Dock = System::Windows::Forms::DockStyle::Fill;
this->label3->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 9.75F, System::Drawing::FontStyle::Italic, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(0)));
this->label3->Location = System::Drawing::Point(139, 5);
this->label3->Name = L"label3";
this->label3->Size = System::Drawing::Size(326, 16);
this->label3->TabIndex = 1;
this->label3->Text = L"label3";
this->label3->TextAlign = System::Drawing::ContentAlignment::MiddleLeft;
//
// label4
//
this->label4->Dock = System::Windows::Forms::DockStyle::Left;
this->label4->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 9.75F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(0)));
this->label4->Location = System::Drawing::Point(0, 5);
this->label4->Name = L"label4";
this->label4->Size = System::Drawing::Size(139, 16);
this->label4->TabIndex = 0;
this->label4->Text = L"Package Author";
this->label4->TextAlign = System::Drawing::ContentAlignment::MiddleLeft;
//
// button1
//
this->button1->DialogResult = System::Windows::Forms::DialogResult::OK;
this->button1->Dock = System::Windows::Forms::DockStyle::Right;
this->button1->Location = System::Drawing::Point(387, 5);
this->button1->Name = L"button1";
this->button1->Size = System::Drawing::Size(97, 34);
this->button1->TabIndex = 5;
this->button1->Text = L"Close";
this->button1->UseVisualStyleBackColor = true;
//
// panel6
//
this->panel6->Controls->Add(this->button1);
this->panel6->Dock = System::Windows::Forms::DockStyle::Bottom;
this->panel6->Location = System::Drawing::Point(0, 331);
this->panel6->Name = L"panel6";
this->panel6->Padding = System::Windows::Forms::Padding(5);
this->panel6->Size = System::Drawing::Size(489, 44);
this->panel6->TabIndex = 4;
//
// panel11
//
this->panel11->Controls->Add(this->label17);
this->panel11->Dock = System::Windows::Forms::DockStyle::Top;
this->panel11->Location = System::Drawing::Point(10, 289);
this->panel11->Name = L"panel11";
this->panel11->Padding = System::Windows::Forms::Padding(0, 5, 0, 5);
this->panel11->Size = System::Drawing::Size(465, 28);
this->panel11->TabIndex = 9;
//
// label17
//
this->label17->Dock = System::Windows::Forms::DockStyle::Fill;
this->label17->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 9.75F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(0)));
this->label17->Location = System::Drawing::Point(0, 5);
this->label17->Name = L"label17";
this->label17->Size = System::Drawing::Size(465, 18);
this->label17->TabIndex = 0;
this->label17->Text = L"This Package is Signed";
this->label17->TextAlign = System::Drawing::ContentAlignment::MiddleCenter;
//
// PackageInfo
//
this->AcceptButton = this->button1;
this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
this->ClientSize = System::Drawing::Size(489, 375);
this->Controls->Add(this->panel2);
this->Controls->Add(this->panel6);
this->Name = L"PackageInfo";
this->StartPosition = System::Windows::Forms::FormStartPosition::CenterParent;
this->Text = L"Package Info";
this->panel1->ResumeLayout(false);
this->panel2->ResumeLayout(false);
this->panel9->ResumeLayout(false);
this->panel7->ResumeLayout(false);
this->panel10->ResumeLayout(false);
this->panel8->ResumeLayout(false);
this->panel5->ResumeLayout(false);
this->panel4->ResumeLayout(false);
this->panel3->ResumeLayout(false);
this->panel6->ResumeLayout(false);
this->panel11->ResumeLayout(false);
this->ResumeLayout(false);
}
#pragma endregion
};
}