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 AddDepend
        ///
        /// 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 AddDepend : public System::Windows::Forms::Form
        {
        public:
                AddDepend(void)
                {
                        InitializeComponent();
                }

                void BuiltIn()
                {
                        this->TextName->Enabled = false;
                        this->TextAuthor->Enabled = false;
                }

                void SetEdit(String ^name, String ^author, String ^version)
                {
                        this->Text = "Edit Dependacy";
                        this->TextName->Text = name;
                        this->TextAuthor->Text = author;
                        this->TextVersion->Text = version;
                }

                String ^GetName() { return m_sName; }
                String ^GetAuthor() { return m_sAuthor; }
                String ^GetVersion() { return m_sVersion; }

        protected:
                /// <summary>
                /// Clean up any resources being used.
                /// </summary>
                ~AddDepend()
                {
                        if (components)
                        {
                                delete components;
                        }
                }
        private: System::Windows::Forms::Panel^  panel1;
        protected: 
        private: System::Windows::Forms::Button^  button2;
        private: System::Windows::Forms::Button^  button1;
        private: System::Windows::Forms::TextBox^  TextName;
        private: System::Windows::Forms::Panel^  panel2;
        private: System::Windows::Forms::Label^  label1;
        private: System::Windows::Forms::Panel^  panel3;
        private: System::Windows::Forms::TextBox^  TextAuthor;
        private: System::Windows::Forms::Label^  label2;
        private: System::Windows::Forms::Panel^  panel4;
        private: System::Windows::Forms::TextBox^  TextVersion;
        private: System::Windows::Forms::Label^  label3;

        private:
                String ^m_sName;
                String ^m_sAuthor;
                String ^m_sVersion;
                /// <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(AddDepend::typeid));
                        this->panel1 = (gcnew System::Windows::Forms::Panel());
                        this->button2 = (gcnew System::Windows::Forms::Button());
                        this->button1 = (gcnew System::Windows::Forms::Button());
                        this->TextName = (gcnew System::Windows::Forms::TextBox());
                        this->panel2 = (gcnew System::Windows::Forms::Panel());
                        this->label1 = (gcnew System::Windows::Forms::Label());
                        this->panel3 = (gcnew System::Windows::Forms::Panel());
                        this->TextAuthor = (gcnew System::Windows::Forms::TextBox());
                        this->label2 = (gcnew System::Windows::Forms::Label());
                        this->panel4 = (gcnew System::Windows::Forms::Panel());
                        this->TextVersion = (gcnew System::Windows::Forms::TextBox());
                        this->label3 = (gcnew System::Windows::Forms::Label());
                        this->panel1->SuspendLayout();
                        this->panel2->SuspendLayout();
                        this->panel3->SuspendLayout();
                        this->panel4->SuspendLayout();
                        this->SuspendLayout();
                        // 
                        // 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, 119);
                        this->panel1->Name = L"panel1";
                        this->panel1->Padding = System::Windows::Forms::Padding(5);
                        this->panel1->Size = System::Drawing::Size(469, 36);
                        this->panel1->TabIndex = 0;
                        // 
                        // button2
                        // 
                        this->button2->DialogResult = System::Windows::Forms::DialogResult::Cancel;
                        this->button2->Dock = System::Windows::Forms::DockStyle::Right;
                        this->button2->Location = System::Drawing::Point(270, 5);
                        this->button2->Name = L"button2";
                        this->button2->Size = System::Drawing::Size(94, 26);
                        this->button2->TabIndex = 2;
                        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(364, 5);
                        this->button1->Name = L"button1";
                        this->button1->Size = System::Drawing::Size(100, 26);
                        this->button1->TabIndex = 2;
                        this->button1->Text = L"OK";
                        this->button1->UseVisualStyleBackColor = true;
                        this->button1->Click += gcnew System::EventHandler(this, &AddDepend::button1_Click);
                        // 
                        // TextName
                        // 
                        this->TextName->Dock = System::Windows::Forms::DockStyle::Fill;
                        this->TextName->Location = System::Drawing::Point(196, 0);
                        this->TextName->Name = L"TextName";
                        this->TextName->Size = System::Drawing::Size(273, 20);
                        this->TextName->TabIndex = 0;
                        // 
                        // panel2
                        // 
                        this->panel2->Controls->Add(this->TextName);
                        this->panel2->Controls->Add(this->label1);
                        this->panel2->Dock = System::Windows::Forms::DockStyle::Top;
                        this->panel2->Location = System::Drawing::Point(15, 15);
                        this->panel2->Name = L"panel2";
                        this->panel2->Size = System::Drawing::Size(469, 29);
                        this->panel2->TabIndex = 2;
                        // 
                        // 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(196, 29);
                        this->label1->TabIndex = 2;
                        this->label1->Text = L"Package Name";
                        this->label1->TextAlign = System::Drawing::ContentAlignment::MiddleLeft;
                        // 
                        // panel3
                        // 
                        this->panel3->Controls->Add(this->TextAuthor);
                        this->panel3->Controls->Add(this->label2);
                        this->panel3->Dock = System::Windows::Forms::DockStyle::Top;
                        this->panel3->Location = System::Drawing::Point(15, 44);
                        this->panel3->Name = L"panel3";
                        this->panel3->Size = System::Drawing::Size(469, 29);
                        this->panel3->TabIndex = 3;
                        // 
                        // TextAuthor
                        // 
                        this->TextAuthor->Dock = System::Windows::Forms::DockStyle::Fill;
                        this->TextAuthor->Location = System::Drawing::Point(196, 0);
                        this->TextAuthor->Name = L"TextAuthor";
                        this->TextAuthor->Size = System::Drawing::Size(273, 20);
                        this->TextAuthor->TabIndex = 1;
                        // 
                        // 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(196, 29);
                        this->label2->TabIndex = 2;
                        this->label2->Text = L"Author";
                        this->label2->TextAlign = System::Drawing::ContentAlignment::MiddleLeft;
                        // 
                        // panel4
                        // 
                        this->panel4->Controls->Add(this->TextVersion);
                        this->panel4->Controls->Add(this->label3);
                        this->panel4->Dock = System::Windows::Forms::DockStyle::Top;
                        this->panel4->Location = System::Drawing::Point(15, 73);
                        this->panel4->Name = L"panel4";
                        this->panel4->Size = System::Drawing::Size(469, 29);
                        this->panel4->TabIndex = 4;
                        // 
                        // TextVersion
                        // 
                        this->TextVersion->Dock = System::Windows::Forms::DockStyle::Fill;
                        this->TextVersion->Location = System::Drawing::Point(196, 0);
                        this->TextVersion->Name = L"TextVersion";
                        this->TextVersion->Size = System::Drawing::Size(273, 20);
                        this->TextVersion->TabIndex = 1;
                        // 
                        // 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(0, 0);
                        this->label3->Name = L"label3";
                        this->label3->Size = System::Drawing::Size(196, 29);
                        this->label3->TabIndex = 2;
                        this->label3->Text = L"Minimum Version";
                        this->label3->TextAlign = System::Drawing::ContentAlignment::MiddleLeft;
                        // 
                        // AddDepend
                        // 
                        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(499, 170);
                        this->Controls->Add(this->panel4);
                        this->Controls->Add(this->panel3);
                        this->Controls->Add(this->panel2);
                        this->Controls->Add(this->panel1);
                        this->Name = L"AddDepend";
                        this->Padding = System::Windows::Forms::Padding(15);
                        this->StartPosition = System::Windows::Forms::FormStartPosition::CenterParent;
                        this->Text = L"Add Dependacies";
                        this->TopMost = true;
                        this->Load += gcnew System::EventHandler(this, &AddDepend::AddDepend_Load);
                        this->panel1->ResumeLayout(false);
                        this->panel2->ResumeLayout(false);
                        this->panel2->PerformLayout();
                        this->panel3->ResumeLayout(false);
                        this->panel3->PerformLayout();
                        this->panel4->ResumeLayout(false);
                        this->panel4->PerformLayout();
                        this->ResumeLayout(false);

                }
#pragma endregion
        private: System::Void button1_Click(System::Object^  sender, System::EventArgs^  e) {
                                 m_sName = this->TextName->Text;
                                 m_sAuthor = this->TextAuthor->Text;
                                 m_sVersion = this->TextVersion->Text;
                         }
        private: System::Void AddDepend_Load(System::Object^  sender, System::EventArgs^  e) {
                                 this->TextName->Focus();
                         }
};
}