Rev 1 | 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 AddShipPart////// 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 AddShipPart : public System::Windows::Forms::Form{public:AddShipPart(System::Windows::Forms::Form ^parent){InitializeComponent();m_pParent = parent;}String ^GetData() { return m_sData; }String ^GetSection() { return m_sSection; }String ^GetSection2() { return m_sSection2; }void SetSection(String ^section) { this->ComboSection->Text = section; }void SetSection2(String ^section) { this->TextSection2->Text = section; }void SetData(String ^data) { this->TextData->Text = data; }void SetComponent(bool edit);void SetDummy(bool edit);void SetBodies(bool edit);protected:CGameDirectories *_prepareSection();System::Windows::Forms::Form ^m_pParent;String ^m_sSection;String ^m_sSection2;String ^m_sData;/// <summary>/// Clean up any resources being used./// </summary>~AddShipPart(){if (components){delete components;}}private: System::Windows::Forms::TextBox^ TextSection2;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::Label^ Data;private: System::Windows::Forms::Panel^ panel3;private: System::Windows::Forms::Button^ button2;private: System::Windows::Forms::Button^ button1;private: System::Windows::Forms::ComboBox^ ComboSection;private: System::Windows::Forms::RichTextBox^ TextData;private: System::Windows::Forms::Panel^ PanelSection2;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){System::ComponentModel::ComponentResourceManager^ resources = (gcnew System::ComponentModel::ComponentResourceManager(AddShipPart::typeid));this->ComboSection = (gcnew System::Windows::Forms::ComboBox());this->TextData = (gcnew System::Windows::Forms::RichTextBox());this->PanelSection2 = (gcnew System::Windows::Forms::Panel());this->TextSection2 = (gcnew System::Windows::Forms::TextBox());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->Data = (gcnew System::Windows::Forms::Label());this->panel3 = (gcnew System::Windows::Forms::Panel());this->button2 = (gcnew System::Windows::Forms::Button());this->button1 = (gcnew System::Windows::Forms::Button());this->PanelSection2->SuspendLayout();this->panel1->SuspendLayout();this->panel2->SuspendLayout();this->panel3->SuspendLayout();this->SuspendLayout();//// ComboSection//this->ComboSection->Dock = System::Windows::Forms::DockStyle::Fill;this->ComboSection->DropDownStyle = System::Windows::Forms::ComboBoxStyle::DropDownList;this->ComboSection->FormattingEnabled = true;this->ComboSection->Location = System::Drawing::Point(132, 0);this->ComboSection->Name = L"ComboSection";this->ComboSection->Size = System::Drawing::Size(382, 21);this->ComboSection->TabIndex = 0;//// TextData//this->TextData->Dock = System::Windows::Forms::DockStyle::Fill;this->TextData->Location = System::Drawing::Point(132, 3);this->TextData->Name = L"TextData";this->TextData->Size = System::Drawing::Size(379, 83);this->TextData->TabIndex = 2;this->TextData->Text = L"";//// PanelSection2//this->PanelSection2->Controls->Add(this->TextSection2);this->PanelSection2->Controls->Add(this->label1);this->PanelSection2->Dock = System::Windows::Forms::DockStyle::Top;this->PanelSection2->Location = System::Drawing::Point(10, 38);this->PanelSection2->Name = L"PanelSection2";this->PanelSection2->Size = System::Drawing::Size(514, 28);this->PanelSection2->TabIndex = 3;//// TextSection2//this->TextSection2->Dock = System::Windows::Forms::DockStyle::Fill;this->TextSection2->Location = System::Drawing::Point(132, 0);this->TextSection2->Name = L"TextSection2";this->TextSection2->Size = System::Drawing::Size(382, 20);this->TextSection2->TabIndex = 1;//// 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->Image = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"label1.Image")));this->label1->ImageAlign = System::Drawing::ContentAlignment::MiddleRight;this->label1->Location = System::Drawing::Point(0, 0);this->label1->Name = L"label1";this->label1->Size = System::Drawing::Size(132, 28);this->label1->TabIndex = 0;this->label1->Text = L"File Entry";this->label1->TextAlign = System::Drawing::ContentAlignment::MiddleLeft;//// panel1//this->panel1->Controls->Add(this->ComboSection);this->panel1->Controls->Add(this->label2);this->panel1->Dock = System::Windows::Forms::DockStyle::Top;this->panel1->Location = System::Drawing::Point(10, 10);this->panel1->Name = L"panel1";this->panel1->Size = System::Drawing::Size(514, 28);this->panel1->TabIndex = 4;//// label2//this->label2->Dock = System::Windows::Forms::DockStyle::Left;this->label2->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->label2->Image = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"label2.Image")));this->label2->ImageAlign = System::Drawing::ContentAlignment::MiddleRight;this->label2->Location = System::Drawing::Point(0, 0);this->label2->Name = L"label2";this->label2->Size = System::Drawing::Size(132, 28);this->label2->TabIndex = 1;this->label2->Text = L"Section";this->label2->TextAlign = System::Drawing::ContentAlignment::MiddleLeft;//// panel2//this->panel2->Controls->Add(this->TextData);this->panel2->Controls->Add(this->Data);this->panel2->Dock = System::Windows::Forms::DockStyle::Fill;this->panel2->Location = System::Drawing::Point(10, 66);this->panel2->Name = L"panel2";this->panel2->Padding = System::Windows::Forms::Padding(3);this->panel2->Size = System::Drawing::Size(514, 89);this->panel2->TabIndex = 5;//// Data//this->Data->Dock = System::Windows::Forms::DockStyle::Left;this->Data->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->Data->Image = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"Data.Image")));this->Data->ImageAlign = System::Drawing::ContentAlignment::MiddleRight;this->Data->Location = System::Drawing::Point(3, 3);this->Data->Name = L"Data";this->Data->Size = System::Drawing::Size(129, 83);this->Data->TabIndex = 3;this->Data->Text = L"Data";this->Data->TextAlign = System::Drawing::ContentAlignment::MiddleLeft;//// panel3//this->panel3->Controls->Add(this->button2);this->panel3->Controls->Add(this->button1);this->panel3->Dock = System::Windows::Forms::DockStyle::Bottom;this->panel3->Location = System::Drawing::Point(10, 155);this->panel3->Name = L"panel3";this->panel3->Padding = System::Windows::Forms::Padding(10);this->panel3->Size = System::Drawing::Size(514, 50);this->panel3->TabIndex = 6;//// button2//this->button2->DialogResult = System::Windows::Forms::DialogResult::Cancel;this->button2->Dock = System::Windows::Forms::DockStyle::Right;this->button2->Location = System::Drawing::Point(285, 10);this->button2->Name = L"button2";this->button2->Size = System::Drawing::Size(114, 30);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(399, 10);this->button1->Name = L"button1";this->button1->Size = System::Drawing::Size(105, 30);this->button1->TabIndex = 0;this->button1->Text = L"OK";this->button1->UseVisualStyleBackColor = true;this->button1->Click += gcnew System::EventHandler(this, &AddShipPart::button1_Click);//// AddShipPart//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(534, 215);this->ControlBox = false;this->Controls->Add(this->panel2);this->Controls->Add(this->PanelSection2);this->Controls->Add(this->panel1);this->Controls->Add(this->panel3);this->Name = L"AddShipPart";this->Padding = System::Windows::Forms::Padding(10);this->StartPosition = System::Windows::Forms::FormStartPosition::CenterParent;this->Text = L"AddShipPart";this->TopMost = true;this->Load += gcnew System::EventHandler(this, &AddShipPart::AddShipPart_Load);this->PanelSection2->ResumeLayout(false);this->PanelSection2->PerformLayout();this->panel1->ResumeLayout(false);this->panel2->ResumeLayout(false);this->panel3->ResumeLayout(false);this->ResumeLayout(false);}#pragma endregionprivate: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) {m_sSection = this->ComboSection->Text;m_sSection2 = this->TextSection2->Text;m_sData = this->TextData->Text;}private: System::Void AddShipPart_Load(System::Object^ sender, System::EventArgs^ e) {this->ComboSection->Focus();}};}