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 PluginManager {

        /// <summary>
        /// Summary for EditPrice
        ///
        /// 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 EditPrice : public System::Windows::Forms::Form
        {
        public:
                EditPrice(int price) : _iPrice(price)
                {
                        InitializeComponent();

                        this->numericUpDown1->Value = price;
                }

                int price()
                {
                        return _iPrice;
                }

        protected:
                int _iPrice;

                /// <summary>
                /// Clean up any resources being used.
                /// </summary>
                ~EditPrice()
                {
                        if (components)
                        {
                                delete components;
                        }
                }
        private: System::Windows::Forms::Label^  label1;
        protected: 
        private: System::Windows::Forms::Label^  label2;
        private: System::Windows::Forms::NumericUpDown^  numericUpDown1;
        private: System::Windows::Forms::NumericUpDown^  numericUpDown2;
        private: System::Windows::Forms::Panel^  panel1;
        private: System::Windows::Forms::Button^  button2;
        private: System::Windows::Forms::Button^  button1;

        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(EditPrice::typeid));
                        this->label1 = (gcnew System::Windows::Forms::Label());
                        this->label2 = (gcnew System::Windows::Forms::Label());
                        this->numericUpDown1 = (gcnew System::Windows::Forms::NumericUpDown());
                        this->numericUpDown2 = (gcnew System::Windows::Forms::NumericUpDown());
                        this->panel1 = (gcnew System::Windows::Forms::Panel());
                        this->button2 = (gcnew System::Windows::Forms::Button());
                        this->button1 = (gcnew System::Windows::Forms::Button());
                        (cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->numericUpDown1))->BeginInit();
                        (cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->numericUpDown2))->BeginInit();
                        this->panel1->SuspendLayout();
                        this->SuspendLayout();
                        // 
                        // label1
                        // 
                        this->label1->AutoSize = true;
                        this->label1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
                                static_cast<System::Byte>(0)));
                        this->label1->Location = System::Drawing::Point(12, 19);
                        this->label1->Name = L"label1";
                        this->label1->Size = System::Drawing::Size(58, 20);
                        this->label1->TabIndex = 0;
                        this->label1->Text = L"Relval";
                        this->label1->TextAlign = System::Drawing::ContentAlignment::MiddleLeft;
                        // 
                        // label2
                        // 
                        this->label2->AutoSize = true;
                        this->label2->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
                                static_cast<System::Byte>(0)));
                        this->label2->Location = System::Drawing::Point(12, 60);
                        this->label2->Name = L"label2";
                        this->label2->Size = System::Drawing::Size(49, 20);
                        this->label2->TabIndex = 1;
                        this->label2->Text = L"Price";
                        this->label2->TextAlign = System::Drawing::ContentAlignment::MiddleLeft;
                        // 
                        // numericUpDown1
                        // 
                        this->numericUpDown1->Anchor = static_cast<System::Windows::Forms::AnchorStyles>(((System::Windows::Forms::AnchorStyles::Top | System::Windows::Forms::AnchorStyles::Left) 
                                | System::Windows::Forms::AnchorStyles::Right));
                        this->numericUpDown1->Location = System::Drawing::Point(113, 19);
                        this->numericUpDown1->Maximum = System::Decimal(gcnew cli::array< System::Int32 >(4) {80000000, 0, 0, 0});
                        this->numericUpDown1->Name = L"numericUpDown1";
                        this->numericUpDown1->Size = System::Drawing::Size(161, 20);
                        this->numericUpDown1->TabIndex = 2;
                        this->numericUpDown1->ValueChanged += gcnew System::EventHandler(this, &EditPrice::numericUpDown1_ValueChanged);
                        // 
                        // numericUpDown2
                        // 
                        this->numericUpDown2->Anchor = static_cast<System::Windows::Forms::AnchorStyles>(((System::Windows::Forms::AnchorStyles::Top | System::Windows::Forms::AnchorStyles::Left) 
                                | System::Windows::Forms::AnchorStyles::Right));
                        this->numericUpDown2->Location = System::Drawing::Point(114, 60);
                        this->numericUpDown2->Maximum = System::Decimal(gcnew cli::array< System::Int32 >(4) {-1894967296, 0, 0, 0});
                        this->numericUpDown2->Name = L"numericUpDown2";
                        this->numericUpDown2->ReadOnly = true;
                        this->numericUpDown2->Size = System::Drawing::Size(160, 20);
                        this->numericUpDown2->TabIndex = 3;
                        // 
                        // panel1
                        // 
                        this->panel1->Anchor = static_cast<System::Windows::Forms::AnchorStyles>((((System::Windows::Forms::AnchorStyles::Top | System::Windows::Forms::AnchorStyles::Bottom) 
                                | System::Windows::Forms::AnchorStyles::Left) 
                                | System::Windows::Forms::AnchorStyles::Right));
                        this->panel1->BorderStyle = System::Windows::Forms::BorderStyle::Fixed3D;
                        this->panel1->Controls->Add(this->button2);
                        this->panel1->Controls->Add(this->button1);
                        this->panel1->Location = System::Drawing::Point(-2, 95);
                        this->panel1->Name = L"panel1";
                        this->panel1->Size = System::Drawing::Size(291, 56);
                        this->panel1->TabIndex = 4;
                        // 
                        // button2
                        // 
                        this->button2->Anchor = static_cast<System::Windows::Forms::AnchorStyles>((System::Windows::Forms::AnchorStyles::Bottom | System::Windows::Forms::AnchorStyles::Left));
                        this->button2->DialogResult = System::Windows::Forms::DialogResult::Cancel;
                        this->button2->Location = System::Drawing::Point(16, 9);
                        this->button2->Name = L"button2";
                        this->button2->Size = System::Drawing::Size(75, 37);
                        this->button2->TabIndex = 1;
                        this->button2->Text = L"Cancel";
                        this->button2->UseVisualStyleBackColor = true;
                        // 
                        // button1
                        // 
                        this->button1->Anchor = static_cast<System::Windows::Forms::AnchorStyles>((System::Windows::Forms::AnchorStyles::Bottom | System::Windows::Forms::AnchorStyles::Right));
                        this->button1->DialogResult = System::Windows::Forms::DialogResult::OK;
                        this->button1->Location = System::Drawing::Point(200, 9);
                        this->button1->Name = L"button1";
                        this->button1->Size = System::Drawing::Size(75, 37);
                        this->button1->TabIndex = 0;
                        this->button1->Text = L"OK";
                        this->button1->UseVisualStyleBackColor = true;
                        // 
                        // EditPrice
                        // 
                        this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
                        this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
                        this->AutoSizeMode = System::Windows::Forms::AutoSizeMode::GrowAndShrink;
                        this->ClientSize = System::Drawing::Size(286, 151);
                        this->Controls->Add(this->panel1);
                        this->Controls->Add(this->numericUpDown2);
                        this->Controls->Add(this->numericUpDown1);
                        this->Controls->Add(this->label2);
                        this->Controls->Add(this->label1);
                        this->Icon = (cli::safe_cast<System::Drawing::Icon^  >(resources->GetObject(L"$this.Icon")));
                        this->MaximumSize = System::Drawing::Size(400, 190);
                        this->MinimumSize = System::Drawing::Size(250, 190);
                        this->Name = L"EditPrice";
                        this->Text = L"Enter Price";
                        (cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->numericUpDown1))->EndInit();
                        (cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->numericUpDown2))->EndInit();
                        this->panel1->ResumeLayout(false);
                        this->ResumeLayout(false);
                        this->PerformLayout();

                }
#pragma endregion
        private: System::Void numericUpDown1_ValueChanged(System::Object^  sender, System::EventArgs^  e) {
                                 _iPrice = Convert::ToInt32(this->numericUpDown1->Value);
                                int price = static_cast<int>(_iPrice * 28 * 1.00268550164);
                                this->numericUpDown2->Value = price;
                         }
};
}