Subversion Repositories spk

Rev

Blame | 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;


namespace Creator {

        /// <summary>
        /// Summary for AddWareText
        ///
        /// 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 AddWareText : public System::Windows::Forms::Form
        {
        public:
                AddWareText(String ^ware)
                {
                        InitializeComponent();

                        m_sWare = ware;
                        this->Text = "Add Ware Text: " + m_sWare;
                }

                void SetEdit(int id)
                {
                        this->Text = "Edit Ware Text: " + m_sWare + " (" + System::Convert::ToString(id) + ")";
                        this->numericUpDown1->Value = id;
                        this->numericUpDown1->Enabled = false;
                }

                void SetName(String ^s) { this->TextWare->Text = s; }
                void SetDesc(String ^s) { this->TextDesc->Text = s; }

                String  ^GetName() { return m_sName; }
                String  ^GetDescription() { return m_sDesc; }
                int             GetLang() { return m_iLang; }

        protected:
                /// <summary>
                /// Clean up any resources being used.
                /// </summary>
                ~AddWareText()
                {
                        if (components)
                        {
                                delete components;
                        }
                }
        private: System::Windows::Forms::Panel^  panel1;
        private: System::Windows::Forms::Button^  Cancel;
        protected: 
                String ^m_sWare;
                String ^m_sName;
                String ^m_sDesc;
                int        m_iLang;

        private: System::Windows::Forms::Button^  button1;
        private: System::Windows::Forms::Panel^  panel2;
        private: System::Windows::Forms::NumericUpDown^  numericUpDown1;
        private: System::Windows::Forms::Label^  label1;
        private: System::Windows::Forms::Panel^  panel3;
        public: System::Windows::Forms::TextBox^  TextWare;
        private: 
        private: System::Windows::Forms::Label^  label2;
        public: 
        private: System::Windows::Forms::Panel^  panel4;
        private: System::Windows::Forms::RichTextBox^  TextDesc;

        private: System::Windows::Forms::Label^  label3;

        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(AddWareText::typeid));
                        this->panel1 = (gcnew System::Windows::Forms::Panel());
                        this->Cancel = (gcnew System::Windows::Forms::Button());
                        this->button1 = (gcnew System::Windows::Forms::Button());
                        this->panel2 = (gcnew System::Windows::Forms::Panel());
                        this->numericUpDown1 = (gcnew System::Windows::Forms::NumericUpDown());
                        this->label1 = (gcnew System::Windows::Forms::Label());
                        this->panel3 = (gcnew System::Windows::Forms::Panel());
                        this->TextWare = (gcnew System::Windows::Forms::TextBox());
                        this->label2 = (gcnew System::Windows::Forms::Label());
                        this->panel4 = (gcnew System::Windows::Forms::Panel());
                        this->TextDesc = (gcnew System::Windows::Forms::RichTextBox());
                        this->label3 = (gcnew System::Windows::Forms::Label());
                        this->panel1->SuspendLayout();
                        this->panel2->SuspendLayout();
                        (cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->numericUpDown1))->BeginInit();
                        this->panel3->SuspendLayout();
                        this->panel4->SuspendLayout();
                        this->SuspendLayout();
                        // 
                        // panel1
                        // 
                        this->panel1->Controls->Add(this->Cancel);
                        this->panel1->Controls->Add(this->button1);
                        this->panel1->Dock = System::Windows::Forms::DockStyle::Bottom;
                        this->panel1->Location = System::Drawing::Point(10, 150);
                        this->panel1->Name = L"panel1";
                        this->panel1->Padding = System::Windows::Forms::Padding(3, 13, 3, 3);
                        this->panel1->Size = System::Drawing::Size(462, 43);
                        this->panel1->TabIndex = 0;
                        // 
                        // Cancel
                        // 
                        this->Cancel->DialogResult = System::Windows::Forms::DialogResult::Cancel;
                        this->Cancel->Dock = System::Windows::Forms::DockStyle::Right;
                        this->Cancel->Location = System::Drawing::Point(289, 13);
                        this->Cancel->Name = L"Cancel";
                        this->Cancel->Size = System::Drawing::Size(85, 27);
                        this->Cancel->TabIndex = 1;
                        this->Cancel->TabStop = false;
                        this->Cancel->Text = L"Cancel";
                        this->Cancel->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(374, 13);
                        this->button1->Name = L"button1";
                        this->button1->Size = System::Drawing::Size(85, 27);
                        this->button1->TabIndex = 0;
                        this->button1->TabStop = false;
                        this->button1->Text = L"OK";
                        this->button1->UseVisualStyleBackColor = true;
                        this->button1->Click += gcnew System::EventHandler(this, &AddWareText::button1_Click);
                        // 
                        // panel2
                        // 
                        this->panel2->Controls->Add(this->numericUpDown1);
                        this->panel2->Controls->Add(this->label1);
                        this->panel2->Dock = System::Windows::Forms::DockStyle::Top;
                        this->panel2->Location = System::Drawing::Point(10, 10);
                        this->panel2->Name = L"panel2";
                        this->panel2->Padding = System::Windows::Forms::Padding(5);
                        this->panel2->Size = System::Drawing::Size(462, 33);
                        this->panel2->TabIndex = 5;
                        // 
                        // numericUpDown1
                        // 
                        this->numericUpDown1->Dock = System::Windows::Forms::DockStyle::Fill;
                        this->numericUpDown1->Location = System::Drawing::Point(153, 5);
                        this->numericUpDown1->Maximum = System::Decimal(gcnew cli::array< System::Int32 >(4) {999, 0, 0, 0});
                        this->numericUpDown1->Minimum = System::Decimal(gcnew cli::array< System::Int32 >(4) {1, 0, 0, 0});
                        this->numericUpDown1->Name = L"numericUpDown1";
                        this->numericUpDown1->Size = System::Drawing::Size(304, 20);
                        this->numericUpDown1->TabIndex = 4;
                        this->numericUpDown1->Value = System::Decimal(gcnew cli::array< System::Int32 >(4) {1, 0, 0, 0});
                        // 
                        // 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(5, 5);
                        this->label1->Name = L"label1";
                        this->label1->Size = System::Drawing::Size(148, 23);
                        this->label1->TabIndex = 3;
                        this->label1->Text = L"Language ID";
                        this->label1->TextAlign = System::Drawing::ContentAlignment::MiddleLeft;
                        // 
                        // panel3
                        // 
                        this->panel3->Controls->Add(this->TextWare);
                        this->panel3->Controls->Add(this->label2);
                        this->panel3->Dock = System::Windows::Forms::DockStyle::Top;
                        this->panel3->Location = System::Drawing::Point(10, 43);
                        this->panel3->Name = L"panel3";
                        this->panel3->Padding = System::Windows::Forms::Padding(5);
                        this->panel3->Size = System::Drawing::Size(462, 31);
                        this->panel3->TabIndex = 6;
                        // 
                        // TextWare
                        // 
                        this->TextWare->Dock = System::Windows::Forms::DockStyle::Fill;
                        this->TextWare->Location = System::Drawing::Point(153, 5);
                        this->TextWare->Name = L"TextWare";
                        this->TextWare->Size = System::Drawing::Size(304, 20);
                        this->TextWare->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(5, 5);
                        this->label2->Name = L"label2";
                        this->label2->Size = System::Drawing::Size(148, 21);
                        this->label2->TabIndex = 3;
                        this->label2->Text = L"Name";
                        this->label2->TextAlign = System::Drawing::ContentAlignment::MiddleLeft;
                        // 
                        // panel4
                        // 
                        this->panel4->Controls->Add(this->TextDesc);
                        this->panel4->Controls->Add(this->label3);
                        this->panel4->Dock = System::Windows::Forms::DockStyle::Fill;
                        this->panel4->Location = System::Drawing::Point(10, 74);
                        this->panel4->Name = L"panel4";
                        this->panel4->Padding = System::Windows::Forms::Padding(5);
                        this->panel4->Size = System::Drawing::Size(462, 76);
                        this->panel4->TabIndex = 7;
                        // 
                        // TextDesc
                        // 
                        this->TextDesc->Dock = System::Windows::Forms::DockStyle::Fill;
                        this->TextDesc->Location = System::Drawing::Point(153, 5);
                        this->TextDesc->Name = L"TextDesc";
                        this->TextDesc->Size = System::Drawing::Size(304, 66);
                        this->TextDesc->TabIndex = 4;
                        this->TextDesc->Text = L"";
                        // 
                        // label3
                        // 
                        this->label3->Dock = System::Windows::Forms::DockStyle::Left;
                        this->label3->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->label3->Image = (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"label3.Image")));
                        this->label3->ImageAlign = System::Drawing::ContentAlignment::MiddleRight;
                        this->label3->Location = System::Drawing::Point(5, 5);
                        this->label3->Name = L"label3";
                        this->label3->Size = System::Drawing::Size(148, 66);
                        this->label3->TabIndex = 3;
                        this->label3->Text = L"Description";
                        this->label3->TextAlign = System::Drawing::ContentAlignment::MiddleLeft;
                        // 
                        // AddWareText
                        // 
                        this->AcceptButton = this->button1;
                        this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
                        this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
                        this->CancelButton = this->Cancel;
                        this->ClientSize = System::Drawing::Size(482, 203);
                        this->ControlBox = false;
                        this->Controls->Add(this->panel4);
                        this->Controls->Add(this->panel3);
                        this->Controls->Add(this->panel2);
                        this->Controls->Add(this->panel1);
                        this->Name = L"AddWareText";
                        this->Padding = System::Windows::Forms::Padding(10);
                        this->ShowIcon = false;
                        this->StartPosition = System::Windows::Forms::FormStartPosition::CenterParent;
                        this->Text = L"Add Ware Text";
                        this->TopMost = true;
                        this->Load += gcnew System::EventHandler(this, &AddWareText::AddWareText_Load);
                        this->panel1->ResumeLayout(false);
                        this->panel2->ResumeLayout(false);
                        (cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->numericUpDown1))->EndInit();
                        this->panel3->ResumeLayout(false);
                        this->panel3->PerformLayout();
                        this->panel4->ResumeLayout(false);
                        this->ResumeLayout(false);

                }
#pragma endregion
        private: System::Void button1_Click(System::Object^  sender, System::EventArgs^  e) {
                                 m_iLang = System::Convert::ToInt32(this->numericUpDown1->Value);
                                 m_sName = this->TextWare->Text;
                                 m_sDesc = this->TextDesc->Text;
                         }
private: System::Void AddWareText_Load(System::Object^  sender, System::EventArgs^  e) {
                         this->numericUpDown1->Focus();
                 }
};
}