Rev 1 | Rev 197 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
#pragma onceusing namespace System;using namespace System::ComponentModel;using namespace System::Collections;using namespace System::Windows::Forms;using namespace System::Data;using namespace System::Drawing;namespace Creator {/// <summary>/// Summary for SelectGame////// 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 SelectGame : public System::Windows::Forms::Form{public:SelectGame(String ^text, CPackages *p){InitializeComponent();this->label1->Text = text;m_pPackages = NULL;if ( !p ) {p = new CPackages;p->startup(".", ".", ".", ".");m_pPackages = p;}for ( int i = 0; i < p->GetGameExe()->GetNumGames(); i++ ){SGameExe *gameExe = p->GetGameExe()->GetGame(i);this->comboBox1->Items->Add(SystemStringFromCyString(gameExe->sName));}this->comboBox1->SelectedIndex = this->comboBox1->Items->Count - 1;}int GetGame(){return this->comboBox1->SelectedIndex;}protected:/// <summary>/// Clean up any resources being used./// </summary>~SelectGame(){if (components){delete components;}if ( m_pPackages )delete m_pPackages;}private: System::Windows::Forms::Label^ label1;private: System::Windows::Forms::ComboBox^ comboBox1;private: System::Windows::Forms::Panel^ panel1;private: System::Windows::Forms::Button^ button2;private: System::Windows::Forms::Button^ button1;protected:CPackages *m_pPackages;private:/// <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->comboBox1 = (gcnew System::Windows::Forms::ComboBox());this->panel1 = (gcnew System::Windows::Forms::Panel());this->button2 = (gcnew System::Windows::Forms::Button());this->button1 = (gcnew System::Windows::Forms::Button());this->panel1->SuspendLayout();this->SuspendLayout();//// label1//this->label1->Dock = System::Windows::Forms::DockStyle::Fill;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(15, 15);this->label1->Name = L"label1";this->label1->Size = System::Drawing::Size(349, 77);this->label1->TabIndex = 0;this->label1->Text = L"Select the game";this->label1->TextAlign = System::Drawing::ContentAlignment::MiddleCenter;//// comboBox1//this->comboBox1->Dock = System::Windows::Forms::DockStyle::Bottom;this->comboBox1->DropDownStyle = System::Windows::Forms::ComboBoxStyle::DropDownList;this->comboBox1->FormattingEnabled = true;this->comboBox1->Location = System::Drawing::Point(15, 92);this->comboBox1->Name = L"comboBox1";this->comboBox1->Size = System::Drawing::Size(349, 21);this->comboBox1->TabIndex = 1;//// panel1//this->panel1->Controls->Add(this->button2);this->panel1->Controls->Add(this->button1);this->panel1->Dock = System::Windows::Forms::DockStyle::Bottom;this->panel1->Location = System::Drawing::Point(15, 113);this->panel1->Name = L"panel1";this->panel1->Padding = System::Windows::Forms::Padding(0, 10, 0, 0);this->panel1->Size = System::Drawing::Size(349, 35);this->panel1->TabIndex = 2;//// button2//this->button2->DialogResult = System::Windows::Forms::DialogResult::Cancel;this->button2->Dock = System::Windows::Forms::DockStyle::Left;this->button2->Location = System::Drawing::Point(0, 10);this->button2->Name = L"button2";this->button2->Size = System::Drawing::Size(75, 25);this->button2->TabIndex = 1;this->button2->Text = L"Cancel";this->button2->UseVisualStyleBackColor = true;//// button1//this->button1->DialogResult = System::Windows::Forms::DialogResult::OK;this->button1->Dock = System::Windows::Forms::DockStyle::Right;this->button1->Location = System::Drawing::Point(274, 10);this->button1->Name = L"button1";this->button1->Size = System::Drawing::Size(75, 25);this->button1->TabIndex = 0;this->button1->Text = L"Select";this->button1->UseVisualStyleBackColor = true;//// SelectGame//this->AcceptButton = this->button1;this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;this->CancelButton = this->button2;this->ClientSize = System::Drawing::Size(379, 163);this->ControlBox = false;this->Controls->Add(this->label1);this->Controls->Add(this->comboBox1);this->Controls->Add(this->panel1);this->MaximizeBox = false;this->MinimizeBox = false;this->Name = L"SelectGame";this->Padding = System::Windows::Forms::Padding(15);this->ShowInTaskbar = false;this->StartPosition = System::Windows::Forms::FormStartPosition::CenterParent;this->Text = L"Select Game";this->TopMost = true;this->panel1->ResumeLayout(false);this->ResumeLayout(false);}#pragma endregion};}