Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<string>
- #include<algorithm>
- #include<string.h>
- #pragma once
- namespace fun {
- using namespace System;
- using namespace System::ComponentModel;
- using namespace System::Collections;
- using namespace System::Windows::Forms;
- using namespace System::Data;
- using namespace System::Drawing;
- /// <summary>
- /// Summary for Form1
- /// </summary>
- public ref class Form1 : public System::Windows::Forms::Form
- {
- public:
- Form1(void)
- {
- InitializeComponent();
- //
- //TODO: Add the constructor code here
- //
- }
- protected:
- /// <summary>
- /// Clean up any resources being used.
- /// </summary>
- ~Form1()
- {
- if (components)
- {
- delete components;
- }
- }
- private: System::Windows::Forms::Label^ label1;
- private: System::Windows::Forms::Label^ label2;
- private: System::Windows::Forms::Label^ label3;
- private: System::Windows::Forms::Label^ label4;
- private: System::Windows::Forms::Label^ label5;
- private: System::Windows::Forms::Label^ label6;
- private: System::Windows::Forms::Label^ label7;
- private: System::Windows::Forms::Label^ label9;
- private: System::Windows::Forms::Label^ label10;
- private: System::Windows::Forms::Label^ label8;
- private: System::Windows::Forms::Label^ label11;
- private: System::Windows::Forms::Label^ label12;
- private: System::Windows::Forms::Button^ button1;
- private: System::Windows::Forms::Button^ button2;
- private: System::Windows::Forms::Label^ label13;
- private: System::Windows::Forms::Label^ label14;
- private: System::Windows::Forms::Label^ label15;
- private: System::Windows::Forms::Label^ label16;
- private: System::Windows::Forms::Label^ label18;
- private: System::Windows::Forms::Label^ label17;
- private: System::Windows::Forms::Label^ label19;
- private: System::Windows::Forms::Label^ label20;
- private: System::Windows::Forms::Label^ label21;
- private: System::Windows::Forms::TextBox^ textBox1;
- private: System::Windows::Forms::TextBox^ textBox2;
- private: System::Windows::Forms::TextBox^ textBox3;
- private: System::Windows::Forms::TextBox^ textBox4;
- private: System::Windows::Forms::TextBox^ textBox5;
- private: System::Windows::Forms::TextBox^ textBox7;
- private: System::Windows::Forms::TextBox^ textBox9;
- private: System::Windows::Forms::TextBox^ textBox10;
- private: System::Windows::Forms::TextBox^ textBox6;
- private: System::Windows::Forms::TextBox^ textBox8;
- private: System::Windows::Forms::TextBox^ textBox11;
- private: System::Windows::Forms::TextBox^ textBox12;
- private: System::Windows::Forms::TextBox^ textBox14;
- private: System::Windows::Forms::TextBox^ textBox15;
- private: System::Windows::Forms::TextBox^ textBox16;
- private: System::Windows::Forms::TextBox^ textBox17;
- private: System::Windows::Forms::TextBox^ textBox18;
- private: System::Windows::Forms::Label^ label22;
- private: System::Windows::Forms::Label^ label23;
- private: System::Windows::Forms::Label^ label24;
- private: System::Windows::Forms::TextBox^ textBox13;
- private: System::Windows::Forms::TextBox^ textBox19;
- private: System::Windows::Forms::Label^ label25;
- private: System::Windows::Forms::Label^ label26;
- private: System::Windows::Forms::Label^ label27;
- protected:
- 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(Form1::typeid));
- this->label1 = (gcnew System::Windows::Forms::Label());
- this->label2 = (gcnew System::Windows::Forms::Label());
- this->label3 = (gcnew System::Windows::Forms::Label());
- this->label4 = (gcnew System::Windows::Forms::Label());
- this->label5 = (gcnew System::Windows::Forms::Label());
- this->label6 = (gcnew System::Windows::Forms::Label());
- this->label7 = (gcnew System::Windows::Forms::Label());
- this->label9 = (gcnew System::Windows::Forms::Label());
- this->label10 = (gcnew System::Windows::Forms::Label());
- this->label8 = (gcnew System::Windows::Forms::Label());
- this->label11 = (gcnew System::Windows::Forms::Label());
- this->label12 = (gcnew System::Windows::Forms::Label());
- this->button1 = (gcnew System::Windows::Forms::Button());
- this->button2 = (gcnew System::Windows::Forms::Button());
- this->label13 = (gcnew System::Windows::Forms::Label());
- this->label14 = (gcnew System::Windows::Forms::Label());
- this->label15 = (gcnew System::Windows::Forms::Label());
- this->label16 = (gcnew System::Windows::Forms::Label());
- this->label18 = (gcnew System::Windows::Forms::Label());
- this->label17 = (gcnew System::Windows::Forms::Label());
- this->label19 = (gcnew System::Windows::Forms::Label());
- this->label20 = (gcnew System::Windows::Forms::Label());
- this->label21 = (gcnew System::Windows::Forms::Label());
- this->textBox1 = (gcnew System::Windows::Forms::TextBox());
- this->textBox2 = (gcnew System::Windows::Forms::TextBox());
- this->textBox3 = (gcnew System::Windows::Forms::TextBox());
- this->textBox4 = (gcnew System::Windows::Forms::TextBox());
- this->textBox5 = (gcnew System::Windows::Forms::TextBox());
- this->textBox7 = (gcnew System::Windows::Forms::TextBox());
- this->textBox9 = (gcnew System::Windows::Forms::TextBox());
- this->textBox10 = (gcnew System::Windows::Forms::TextBox());
- this->textBox6 = (gcnew System::Windows::Forms::TextBox());
- this->textBox8 = (gcnew System::Windows::Forms::TextBox());
- this->textBox11 = (gcnew System::Windows::Forms::TextBox());
- this->textBox12 = (gcnew System::Windows::Forms::TextBox());
- this->textBox14 = (gcnew System::Windows::Forms::TextBox());
- this->textBox15 = (gcnew System::Windows::Forms::TextBox());
- this->textBox16 = (gcnew System::Windows::Forms::TextBox());
- this->textBox17 = (gcnew System::Windows::Forms::TextBox());
- this->textBox18 = (gcnew System::Windows::Forms::TextBox());
- this->label22 = (gcnew System::Windows::Forms::Label());
- this->label23 = (gcnew System::Windows::Forms::Label());
- this->label24 = (gcnew System::Windows::Forms::Label());
- this->textBox13 = (gcnew System::Windows::Forms::TextBox());
- this->textBox19 = (gcnew System::Windows::Forms::TextBox());
- this->label25 = (gcnew System::Windows::Forms::Label());
- this->label26 = (gcnew System::Windows::Forms::Label());
- this->label27 = (gcnew System::Windows::Forms::Label());
- this->SuspendLayout();
- //
- // label1
- //
- this->label1->AutoSize = true;
- this->label1->BackColor = System::Drawing::Color::Transparent;
- this->label1->Font = (gcnew System::Drawing::Font(L"Tw Cen MT", 12, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
- static_cast<System::Byte>(0)));
- this->label1->Location = System::Drawing::Point(325, 74);
- this->label1->Name = L"label1";
- this->label1->Size = System::Drawing::Size(76, 19);
- this->label1->TabIndex = 0;
- this->label1->Text = L"Ball n\' Cup";
- this->label1->Click += gcnew System::EventHandler(this, &Form1::label1_Click);
- //
- // label2
- //
- this->label2->AutoSize = true;
- this->label2->BackColor = System::Drawing::Color::Transparent;
- this->label2->Font = (gcnew System::Drawing::Font(L"Tw Cen MT", 12, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
- static_cast<System::Byte>(0)));
- this->label2->Location = System::Drawing::Point(325, 96);
- this->label2->Name = L"label2";
- this->label2->Size = System::Drawing::Size(74, 19);
- this->label2->TabIndex = 1;
- this->label2->Text = L"Pogo Stick";
- this->label2->Click += gcnew System::EventHandler(this, &Form1::label2_Click);
- //
- // label3
- //
- this->label3->AutoSize = true;
- this->label3->BackColor = System::Drawing::Color::Transparent;
- this->label3->Font = (gcnew System::Drawing::Font(L"Tw Cen MT", 12, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
- static_cast<System::Byte>(0)));
- this->label3->Location = System::Drawing::Point(325, 117);
- this->label3->Name = L"label3";
- this->label3->Size = System::Drawing::Size(135, 19);
- this->label3->TabIndex = 2;
- this->label3->Text = L"Fall over Spring Toy";
- //
- // label4
- //
- this->label4->AutoSize = true;
- this->label4->BackColor = System::Drawing::Color::Transparent;
- this->label4->Font = (gcnew System::Drawing::Font(L"Tw Cen MT", 12, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
- static_cast<System::Byte>(0)));
- this->label4->Location = System::Drawing::Point(325, 171);
- this->label4->Name = L"label4";
- this->label4->Size = System::Drawing::Size(91, 19);
- this->label4->TabIndex = 3;
- this->label4->Text = L"Wind up Toy";
- //
- // label5
- //
- this->label5->AutoSize = true;
- this->label5->BackColor = System::Drawing::Color::Transparent;
- this->label5->Font = (gcnew System::Drawing::Font(L"Tw Cen MT", 12, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
- static_cast<System::Byte>(0)));
- this->label5->Location = System::Drawing::Point(325, 193);
- this->label5->Name = L"label5";
- this->label5->Size = System::Drawing::Size(101, 19);
- this->label5->TabIndex = 4;
- this->label5->Text = L"Clockwork Toy";
- //
- // label6
- //
- this->label6->AutoSize = true;
- this->label6->BackColor = System::Drawing::Color::Transparent;
- this->label6->Font = (gcnew System::Drawing::Font(L"Tw Cen MT", 12, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
- static_cast<System::Byte>(0)));
- this->label6->Location = System::Drawing::Point(325, 214);
- this->label6->Name = L"label6";
- this->label6->Size = System::Drawing::Size(154, 19);
- this->label6->TabIndex = 5;
- this->label6->Text = L"Ghastly Jack in the Box";
- //
- // label7
- //
- this->label7->AutoSize = true;
- this->label7->BackColor = System::Drawing::Color::Transparent;
- this->label7->Font = (gcnew System::Drawing::Font(L"Tw Cen MT", 12, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
- static_cast<System::Byte>(0)));
- this->label7->Location = System::Drawing::Point(325, 268);
- this->label7->Name = L"label7";
- this->label7->Size = System::Drawing::Size(63, 19);
- this->label7->TabIndex = 6;
- this->label7->Text = L"Tin Larry";
- //
- // label9
- //
- this->label9->AutoSize = true;
- this->label9->BackColor = System::Drawing::Color::Transparent;
- this->label9->Font = (gcnew System::Drawing::Font(L"Tw Cen MT", 12, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
- static_cast<System::Byte>(0)));
- this->label9->Location = System::Drawing::Point(325, 290);
- this->label9->Name = L"label9";
- this->label9->Size = System::Drawing::Size(90, 19);
- this->label9->TabIndex = 7;
- this->label9->Text = L"Draconic Toy";
- //
- // label10
- //
- this->label10->AutoSize = true;
- this->label10->BackColor = System::Drawing::Color::Transparent;
- this->label10->Font = (gcnew System::Drawing::Font(L"Tw Cen MT", 12, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
- static_cast<System::Byte>(0)));
- this->label10->Location = System::Drawing::Point(325, 311);
- this->label10->Name = L"label10";
- this->label10->Size = System::Drawing::Size(118, 19);
- this->label10->TabIndex = 8;
- this->label10->Text = L"Replica Deathbot";
- //
- // label8
- //
- this->label8->AutoSize = true;
- this->label8->BackColor = System::Drawing::Color::Transparent;
- this->label8->Font = (gcnew System::Drawing::Font(L"Tw Cen MT", 15.75F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
- static_cast<System::Byte>(0)));
- this->label8->Location = System::Drawing::Point(287, 42);
- this->label8->Name = L"label8";
- this->label8->Size = System::Drawing::Size(85, 24);
- this->label8->TabIndex = 9;
- this->label8->Text = L"Wooden";
- //
- // label11
- //
- this->label11->AutoSize = true;
- this->label11->BackColor = System::Drawing::Color::Transparent;
- this->label11->Font = (gcnew System::Drawing::Font(L"Tw Cen MT", 15.75F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
- static_cast<System::Byte>(0)));
- this->label11->Location = System::Drawing::Point(287, 139);
- this->label11->Name = L"label11";
- this->label11->Size = System::Drawing::Size(97, 24);
- this->label11->TabIndex = 10;
- this->label11->Text = L"Clockwork";
- this->label11->Click += gcnew System::EventHandler(this, &Form1::label11_Click);
- //
- // label12
- //
- this->label12->AutoSize = true;
- this->label12->BackColor = System::Drawing::Color::Transparent;
- this->label12->Font = (gcnew System::Drawing::Font(L"Tw Cen MT", 15.75F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
- static_cast<System::Byte>(0)));
- this->label12->Location = System::Drawing::Point(287, 236);
- this->label12->Name = L"label12";
- this->label12->Size = System::Drawing::Size(60, 24);
- this->label12->TabIndex = 11;
- this->label12->Text = L"Metal";
- //
- // button1
- //
- this->button1->Font = (gcnew System::Drawing::Font(L"Tw Cen MT", 12, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
- static_cast<System::Byte>(0)));
- this->button1->Location = System::Drawing::Point(489, 150);
- this->button1->Name = L"button1";
- this->button1->Size = System::Drawing::Size(121, 41);
- this->button1->TabIndex = 12;
- this->button1->Text = L"Max Receipts";
- this->button1->UseVisualStyleBackColor = true;
- this->button1->Click += gcnew System::EventHandler(this, &Form1::button1_Click);
- //
- // button2
- //
- this->button2->Font = (gcnew System::Drawing::Font(L"Tw Cen MT", 12, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
- static_cast<System::Byte>(0)));
- this->button2->Location = System::Drawing::Point(489, 96);
- this->button2->Name = L"button2";
- this->button2->Size = System::Drawing::Size(121, 41);
- this->button2->TabIndex = 13;
- this->button2->Text = L"Max Ice Coins";
- this->button2->UseVisualStyleBackColor = true;
- this->button2->Click += gcnew System::EventHandler(this, &Form1::button2_Click);
- //
- // label13
- //
- this->label13->AutoSize = true;
- this->label13->BackColor = System::Drawing::Color::Transparent;
- this->label13->Font = (gcnew System::Drawing::Font(L"Tw Cen MT", 15.75F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
- static_cast<System::Byte>(0)));
- this->label13->Location = System::Drawing::Point(100, 57);
- this->label13->Name = L"label13";
- this->label13->Size = System::Drawing::Size(135, 24);
- this->label13->TabIndex = 14;
- this->label13->Text = L"Your Toy Parts";
- //
- // label14
- //
- this->label14->AutoSize = true;
- this->label14->BackColor = System::Drawing::Color::Transparent;
- this->label14->Font = (gcnew System::Drawing::Font(L"Tw Cen MT", 12, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
- static_cast<System::Byte>(0)));
- this->label14->Location = System::Drawing::Point(153, 89);
- this->label14->Name = L"label14";
- this->label14->Size = System::Drawing::Size(50, 19);
- this->label14->TabIndex = 15;
- this->label14->Text = L"Wood";
- //
- // label15
- //
- this->label15->AutoSize = true;
- this->label15->BackColor = System::Drawing::Color::Transparent;
- this->label15->Font = (gcnew System::Drawing::Font(L"Tw Cen MT", 12, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
- static_cast<System::Byte>(0)));
- this->label15->Location = System::Drawing::Point(153, 116);
- this->label15->Name = L"label15";
- this->label15->Size = System::Drawing::Size(50, 19);
- this->label15->TabIndex = 16;
- this->label15->Text = L"Spring";
- //
- // label16
- //
- this->label16->AutoSize = true;
- this->label16->BackColor = System::Drawing::Color::Transparent;
- this->label16->Font = (gcnew System::Drawing::Font(L"Tw Cen MT", 12, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
- static_cast<System::Byte>(0)));
- this->label16->Location = System::Drawing::Point(153, 143);
- this->label16->Name = L"label16";
- this->label16->Size = System::Drawing::Size(47, 19);
- this->label16->TabIndex = 17;
- this->label16->Text = L"Screw";
- //
- // label18
- //
- this->label18->AutoSize = true;
- this->label18->BackColor = System::Drawing::Color::Transparent;
- this->label18->Font = (gcnew System::Drawing::Font(L"Tw Cen MT", 12, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
- static_cast<System::Byte>(0)));
- this->label18->Location = System::Drawing::Point(153, 197);
- this->label18->Name = L"label18";
- this->label18->Size = System::Drawing::Size(45, 19);
- this->label18->TabIndex = 19;
- this->label18->Text = L"Metal";
- //
- // label17
- //
- this->label17->AutoSize = true;
- this->label17->BackColor = System::Drawing::Color::Transparent;
- this->label17->Font = (gcnew System::Drawing::Font(L"Tw Cen MT", 12, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
- static_cast<System::Byte>(0)));
- this->label17->Location = System::Drawing::Point(153, 251);
- this->label17->Name = L"label17";
- this->label17->Size = System::Drawing::Size(92, 19);
- this->label17->TabIndex = 20;
- this->label17->Text = L"Ghostly Cloth";
- //
- // label19
- //
- this->label19->AutoSize = true;
- this->label19->BackColor = System::Drawing::Color::Transparent;
- this->label19->Font = (gcnew System::Drawing::Font(L"Tw Cen MT", 12, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
- static_cast<System::Byte>(0)));
- this->label19->Location = System::Drawing::Point(153, 170);
- this->label19->Name = L"label19";
- this->label19->Size = System::Drawing::Size(36, 19);
- this->label19->TabIndex = 20;
- this->label19->Text = L"Cog";
- //
- // label20
- //
- this->label20->AutoSize = true;
- this->label20->BackColor = System::Drawing::Color::Transparent;
- this->label20->Font = (gcnew System::Drawing::Font(L"Tw Cen MT", 12, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
- static_cast<System::Byte>(0)));
- this->label20->Location = System::Drawing::Point(153, 224);
- this->label20->Name = L"label20";
- this->label20->Size = System::Drawing::Size(74, 19);
- this->label20->TabIndex = 21;
- this->label20->Text = L"Doohickey";
- //
- // label21
- //
- this->label21->AutoSize = true;
- this->label21->BackColor = System::Drawing::Color::Transparent;
- this->label21->Font = (gcnew System::Drawing::Font(L"Tw Cen MT", 12, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
- static_cast<System::Byte>(0)));
- this->label21->Location = System::Drawing::Point(153, 278);
- this->label21->Name = L"label21";
- this->label21->Size = System::Drawing::Size(63, 19);
- this->label21->TabIndex = 22;
- this->label21->Text = L"Fire Bulb";
- //
- // textBox1
- //
- this->textBox1->Font = (gcnew System::Drawing::Font(L"Tw Cen MT", 9.75F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
- static_cast<System::Byte>(0)));
- this->textBox1->Location = System::Drawing::Point(127, 89);
- this->textBox1->MaxLength = 2;
- this->textBox1->Name = L"textBox1";
- this->textBox1->Size = System::Drawing::Size(22, 22);
- this->textBox1->TabIndex = 23;
- this->textBox1->Text = L"0";
- this->textBox1->TextAlign = System::Windows::Forms::HorizontalAlignment::Center;
- this->textBox1->KeyPress += gcnew System::Windows::Forms::KeyPressEventHandler(this, &Form1::textBox1_KeyPress);
- //
- // textBox2
- //
- this->textBox2->Font = (gcnew System::Drawing::Font(L"Tw Cen MT", 9.75F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
- static_cast<System::Byte>(0)));
- this->textBox2->Location = System::Drawing::Point(127, 117);
- this->textBox2->MaxLength = 2;
- this->textBox2->Name = L"textBox2";
- this->textBox2->Size = System::Drawing::Size(22, 22);
- this->textBox2->TabIndex = 24;
- this->textBox2->Text = L"0";
- this->textBox2->TextAlign = System::Windows::Forms::HorizontalAlignment::Center;
- this->textBox2->TextChanged += gcnew System::EventHandler(this, &Form1::textBox2_TextChanged);
- this->textBox2->KeyPress += gcnew System::Windows::Forms::KeyPressEventHandler(this, &Form1::textBox1_KeyPress);
- //
- // textBox3
- //
- this->textBox3->Font = (gcnew System::Drawing::Font(L"Tw Cen MT", 9.75F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
- static_cast<System::Byte>(0)));
- this->textBox3->Location = System::Drawing::Point(127, 142);
- this->textBox3->MaxLength = 2;
- this->textBox3->Name = L"textBox3";
- this->textBox3->Size = System::Drawing::Size(22, 22);
- this->textBox3->TabIndex = 25;
- this->textBox3->Text = L"0";
- this->textBox3->TextAlign = System::Windows::Forms::HorizontalAlignment::Center;
- this->textBox3->KeyPress += gcnew System::Windows::Forms::KeyPressEventHandler(this, &Form1::textBox1_KeyPress);
- //
- // textBox4
- //
- this->textBox4->Font = (gcnew System::Drawing::Font(L"Tw Cen MT", 9.75F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
- static_cast<System::Byte>(0)));
- this->textBox4->Location = System::Drawing::Point(127, 169);
- this->textBox4->MaxLength = 2;
- this->textBox4->Name = L"textBox4";
- this->textBox4->Size = System::Drawing::Size(22, 22);
- this->textBox4->TabIndex = 26;
- this->textBox4->Text = L"0";
- this->textBox4->TextAlign = System::Windows::Forms::HorizontalAlignment::Center;
- this->textBox4->KeyPress += gcnew System::Windows::Forms::KeyPressEventHandler(this, &Form1::textBox1_KeyPress);
- //
- // textBox5
- //
- this->textBox5->Font = (gcnew System::Drawing::Font(L"Tw Cen MT", 9.75F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
- static_cast<System::Byte>(0)));
- this->textBox5->Location = System::Drawing::Point(127, 196);
- this->textBox5->MaxLength = 2;
- this->textBox5->Name = L"textBox5";
- this->textBox5->Size = System::Drawing::Size(22, 22);
- this->textBox5->TabIndex = 27;
- this->textBox5->Text = L"0";
- this->textBox5->TextAlign = System::Windows::Forms::HorizontalAlignment::Center;
- this->textBox5->KeyPress += gcnew System::Windows::Forms::KeyPressEventHandler(this, &Form1::textBox1_KeyPress);
- //
- // textBox7
- //
- this->textBox7->Font = (gcnew System::Drawing::Font(L"Tw Cen MT", 9.75F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
- static_cast<System::Byte>(0)));
- this->textBox7->Location = System::Drawing::Point(127, 223);
- this->textBox7->MaxLength = 2;
- this->textBox7->Name = L"textBox7";
- this->textBox7->Size = System::Drawing::Size(22, 22);
- this->textBox7->TabIndex = 28;
- this->textBox7->Text = L"0";
- this->textBox7->TextAlign = System::Windows::Forms::HorizontalAlignment::Center;
- this->textBox7->KeyPress += gcnew System::Windows::Forms::KeyPressEventHandler(this, &Form1::textBox1_KeyPress);
- //
- // textBox9
- //
- this->textBox9->Font = (gcnew System::Drawing::Font(L"Tw Cen MT", 9.75F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
- static_cast<System::Byte>(0)));
- this->textBox9->Location = System::Drawing::Point(127, 250);
- this->textBox9->MaxLength = 2;
- this->textBox9->Name = L"textBox9";
- this->textBox9->Size = System::Drawing::Size(22, 22);
- this->textBox9->TabIndex = 29;
- this->textBox9->Text = L"0";
- this->textBox9->TextAlign = System::Windows::Forms::HorizontalAlignment::Center;
- this->textBox9->KeyPress += gcnew System::Windows::Forms::KeyPressEventHandler(this, &Form1::textBox1_KeyPress);
- //
- // textBox10
- //
- this->textBox10->Font = (gcnew System::Drawing::Font(L"Tw Cen MT", 9.75F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
- static_cast<System::Byte>(0)));
- this->textBox10->Location = System::Drawing::Point(127, 277);
- this->textBox10->MaxLength = 2;
- this->textBox10->Name = L"textBox10";
- this->textBox10->Size = System::Drawing::Size(22, 22);
- this->textBox10->TabIndex = 30;
- this->textBox10->Text = L"0";
- this->textBox10->TextAlign = System::Windows::Forms::HorizontalAlignment::Center;
- this->textBox10->KeyPress += gcnew System::Windows::Forms::KeyPressEventHandler(this, &Form1::textBox1_KeyPress);
- //
- // textBox6
- //
- this->textBox6->Font = (gcnew System::Drawing::Font(L"Tw Cen MT", 8.25F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
- static_cast<System::Byte>(0)));
- this->textBox6->Location = System::Drawing::Point(299, 75);
- this->textBox6->MaxLength = 2;
- this->textBox6->Name = L"textBox6";
- this->textBox6->ReadOnly = true;
- this->textBox6->Size = System::Drawing::Size(20, 19);
- this->textBox6->TabIndex = 31;
- this->textBox6->Text = L"0";
- this->textBox6->TextAlign = System::Windows::Forms::HorizontalAlignment::Center;
- //
- // textBox8
- //
- this->textBox8->Font = (gcnew System::Drawing::Font(L"Tw Cen MT", 8.25F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
- static_cast<System::Byte>(0)));
- this->textBox8->Location = System::Drawing::Point(299, 97);
- this->textBox8->MaxLength = 2;
- this->textBox8->Name = L"textBox8";
- this->textBox8->ReadOnly = true;
- this->textBox8->Size = System::Drawing::Size(20, 19);
- this->textBox8->TabIndex = 32;
- this->textBox8->Text = L"0";
- this->textBox8->TextAlign = System::Windows::Forms::HorizontalAlignment::Center;
- //
- // textBox11
- //
- this->textBox11->Font = (gcnew System::Drawing::Font(L"Tw Cen MT", 8.25F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
- static_cast<System::Byte>(0)));
- this->textBox11->Location = System::Drawing::Point(299, 119);
- this->textBox11->MaxLength = 2;
- this->textBox11->Name = L"textBox11";
- this->textBox11->ReadOnly = true;
- this->textBox11->Size = System::Drawing::Size(20, 19);
- this->textBox11->TabIndex = 33;
- this->textBox11->Text = L"0";
- this->textBox11->TextAlign = System::Windows::Forms::HorizontalAlignment::Center;
- //
- // textBox12
- //
- this->textBox12->Font = (gcnew System::Drawing::Font(L"Tw Cen MT", 8.25F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
- static_cast<System::Byte>(0)));
- this->textBox12->Location = System::Drawing::Point(299, 172);
- this->textBox12->MaxLength = 2;
- this->textBox12->Name = L"textBox12";
- this->textBox12->ReadOnly = true;
- this->textBox12->Size = System::Drawing::Size(20, 19);
- this->textBox12->TabIndex = 34;
- this->textBox12->Text = L"0";
- this->textBox12->TextAlign = System::Windows::Forms::HorizontalAlignment::Center;
- //
- // textBox14
- //
- this->textBox14->Font = (gcnew System::Drawing::Font(L"Tw Cen MT", 8.25F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
- static_cast<System::Byte>(0)));
- this->textBox14->Location = System::Drawing::Point(299, 194);
- this->textBox14->MaxLength = 2;
- this->textBox14->Name = L"textBox14";
- this->textBox14->ReadOnly = true;
- this->textBox14->Size = System::Drawing::Size(20, 19);
- this->textBox14->TabIndex = 35;
- this->textBox14->Text = L"0";
- this->textBox14->TextAlign = System::Windows::Forms::HorizontalAlignment::Center;
- //
- // textBox15
- //
- this->textBox15->Font = (gcnew System::Drawing::Font(L"Tw Cen MT", 8.25F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
- static_cast<System::Byte>(0)));
- this->textBox15->Location = System::Drawing::Point(299, 215);
- this->textBox15->MaxLength = 2;
- this->textBox15->Name = L"textBox15";
- this->textBox15->ReadOnly = true;
- this->textBox15->Size = System::Drawing::Size(20, 19);
- this->textBox15->TabIndex = 36;
- this->textBox15->Text = L"0";
- this->textBox15->TextAlign = System::Windows::Forms::HorizontalAlignment::Center;
- //
- // textBox16
- //
- this->textBox16->Font = (gcnew System::Drawing::Font(L"Tw Cen MT", 8.25F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
- static_cast<System::Byte>(0)));
- this->textBox16->Location = System::Drawing::Point(299, 312);
- this->textBox16->MaxLength = 2;
- this->textBox16->Name = L"textBox16";
- this->textBox16->ReadOnly = true;
- this->textBox16->Size = System::Drawing::Size(20, 19);
- this->textBox16->TabIndex = 37;
- this->textBox16->Text = L"0";
- this->textBox16->TextAlign = System::Windows::Forms::HorizontalAlignment::Center;
- //
- // textBox17
- //
- this->textBox17->Font = (gcnew System::Drawing::Font(L"Tw Cen MT", 8.25F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
- static_cast<System::Byte>(0)));
- this->textBox17->Location = System::Drawing::Point(299, 269);
- this->textBox17->MaxLength = 2;
- this->textBox17->Name = L"textBox17";
- this->textBox17->ReadOnly = true;
- this->textBox17->Size = System::Drawing::Size(20, 19);
- this->textBox17->TabIndex = 37;
- this->textBox17->Text = L"0";
- this->textBox17->TextAlign = System::Windows::Forms::HorizontalAlignment::Center;
- //
- // textBox18
- //
- this->textBox18->Font = (gcnew System::Drawing::Font(L"Tw Cen MT", 8.25F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
- static_cast<System::Byte>(0)));
- this->textBox18->Location = System::Drawing::Point(299, 291);
- this->textBox18->MaxLength = 2;
- this->textBox18->Name = L"textBox18";
- this->textBox18->ReadOnly = true;
- this->textBox18->Size = System::Drawing::Size(20, 19);
- this->textBox18->TabIndex = 38;
- this->textBox18->Text = L"0";
- this->textBox18->TextAlign = System::Windows::Forms::HorizontalAlignment::Center;
- //
- // label22
- //
- this->label22->AutoSize = true;
- this->label22->BackColor = System::Drawing::Color::Transparent;
- this->label22->Font = (gcnew System::Drawing::Font(L"Tw Cen MT", 15.75F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
- static_cast<System::Byte>(0)));
- this->label22->Location = System::Drawing::Point(495, 219);
- this->label22->Name = L"label22";
- this->label22->Size = System::Drawing::Size(53, 24);
- this->label22->TabIndex = 39;
- this->label22->Text = L"Total";
- //
- // label23
- //
- this->label23->AutoSize = true;
- this->label23->BackColor = System::Drawing::Color::Transparent;
- this->label23->Font = (gcnew System::Drawing::Font(L"Tw Cen MT", 12, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
- static_cast<System::Byte>(0)));
- this->label23->Location = System::Drawing::Point(546, 252);
- this->label23->Name = L"label23";
- this->label23->Size = System::Drawing::Size(64, 19);
- this->label23->TabIndex = 40;
- this->label23->Text = L"Ice Coins";
- //
- // label24
- //
- this->label24->AutoSize = true;
- this->label24->BackColor = System::Drawing::Color::Transparent;
- this->label24->Font = (gcnew System::Drawing::Font(L"Tw Cen MT", 12, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
- static_cast<System::Byte>(0)));
- this->label24->Location = System::Drawing::Point(546, 277);
- this->label24->Name = L"label24";
- this->label24->Size = System::Drawing::Size(60, 19);
- this->label24->TabIndex = 41;
- this->label24->Text = L"Receipts";
- //
- // textBox13
- //
- this->textBox13->Font = (gcnew System::Drawing::Font(L"Tw Cen MT", 9.75F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
- static_cast<System::Byte>(0)));
- this->textBox13->Location = System::Drawing::Point(499, 251);
- this->textBox13->MaxLength = 3;
- this->textBox13->Name = L"textBox13";
- this->textBox13->ReadOnly = true;
- this->textBox13->Size = System::Drawing::Size(41, 22);
- this->textBox13->TabIndex = 42;
- this->textBox13->Text = L"0";
- this->textBox13->TextAlign = System::Windows::Forms::HorizontalAlignment::Center;
- //
- // textBox19
- //
- this->textBox19->Font = (gcnew System::Drawing::Font(L"Tw Cen MT", 9.75F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
- static_cast<System::Byte>(0)));
- this->textBox19->Location = System::Drawing::Point(499, 273);
- this->textBox19->MaxLength = 3;
- this->textBox19->Name = L"textBox19";
- this->textBox19->ReadOnly = true;
- this->textBox19->Size = System::Drawing::Size(41, 22);
- this->textBox19->TabIndex = 43;
- this->textBox19->Text = L"0";
- this->textBox19->TextAlign = System::Windows::Forms::HorizontalAlignment::Center;
- //
- // label25
- //
- this->label25->AutoSize = true;
- this->label25->BackColor = System::Drawing::Color::Transparent;
- this->label25->Font = (gcnew System::Drawing::Font(L"Tw Cen MT", 20.25F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
- static_cast<System::Byte>(0)));
- this->label25->ForeColor = System::Drawing::SystemColors::ActiveCaptionText;
- this->label25->Location = System::Drawing::Point(45, 9);
- this->label25->Name = L"label25";
- this->label25->Size = System::Drawing::Size(551, 31);
- this->label25->TabIndex = 44;
- this->label25->Text = L"MouseHunt Max Ice Coins and Receipts Calculator";
- //
- // label26
- //
- this->label26->AutoSize = true;
- this->label26->Location = System::Drawing::Point(12, 326);
- this->label26->Name = L"label26";
- this->label26->Size = System::Drawing::Size(87, 14);
- this->label26->TabIndex = 45;
- this->label26->Text = L"Created by zeulb";
- //
- // label27
- //
- this->label27->AutoSize = true;
- this->label27->Location = System::Drawing::Point(575, 326);
- this->label27->Name = L"label27";
- this->label27->Size = System::Drawing::Size(56, 14);
- this->label27->TabIndex = 46;
- this->label27->Text = L"version 0.3";
- //
- // Form1
- //
- this->AutoScaleDimensions = System::Drawing::SizeF(6, 14);
- this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
- this->BackgroundImage = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"$this.BackgroundImage")));
- this->BackgroundImageLayout = System::Windows::Forms::ImageLayout::Stretch;
- this->ClientSize = System::Drawing::Size(642, 349);
- this->Controls->Add(this->label27);
- this->Controls->Add(this->label26);
- this->Controls->Add(this->label25);
- this->Controls->Add(this->textBox19);
- this->Controls->Add(this->textBox13);
- this->Controls->Add(this->label24);
- this->Controls->Add(this->label23);
- this->Controls->Add(this->label22);
- this->Controls->Add(this->textBox18);
- this->Controls->Add(this->textBox17);
- this->Controls->Add(this->textBox16);
- this->Controls->Add(this->textBox15);
- this->Controls->Add(this->textBox14);
- this->Controls->Add(this->textBox12);
- this->Controls->Add(this->textBox11);
- this->Controls->Add(this->textBox8);
- this->Controls->Add(this->textBox6);
- this->Controls->Add(this->textBox10);
- this->Controls->Add(this->textBox9);
- this->Controls->Add(this->textBox7);
- this->Controls->Add(this->textBox5);
- this->Controls->Add(this->textBox4);
- this->Controls->Add(this->textBox3);
- this->Controls->Add(this->textBox2);
- this->Controls->Add(this->textBox1);
- this->Controls->Add(this->label21);
- this->Controls->Add(this->label20);
- this->Controls->Add(this->label19);
- this->Controls->Add(this->label17);
- this->Controls->Add(this->label18);
- this->Controls->Add(this->label16);
- this->Controls->Add(this->label15);
- this->Controls->Add(this->label14);
- this->Controls->Add(this->label13);
- this->Controls->Add(this->button2);
- this->Controls->Add(this->button1);
- this->Controls->Add(this->label12);
- this->Controls->Add(this->label11);
- this->Controls->Add(this->label8);
- this->Controls->Add(this->label10);
- this->Controls->Add(this->label9);
- this->Controls->Add(this->label7);
- this->Controls->Add(this->label6);
- this->Controls->Add(this->label5);
- this->Controls->Add(this->label4);
- this->Controls->Add(this->label3);
- this->Controls->Add(this->label2);
- this->Controls->Add(this->label1);
- this->Font = (gcnew System::Drawing::Font(L"Tw Cen MT", 8.25F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
- static_cast<System::Byte>(0)));
- this->Icon = (cli::safe_cast<System::Drawing::Icon^ >(resources->GetObject(L"$this.Icon")));
- this->Name = L"Form1";
- this->Text = L"MouseHunt Max Ice Coins and Receipts Calculator";
- this->Load += gcnew System::EventHandler(this, &Form1::Form1_Load);
- this->ResumeLayout(false);
- this->PerformLayout();
- }
- #pragma endregion
- private: System::Void Form1_Load(System::Object^ sender, System::EventArgs^ e) {
- }
- private: System::Void label1_Click(System::Object^ sender, System::EventArgs^ e) {
- }
- private: System::Void label2_Click(System::Object^ sender, System::EventArgs^ e) {
- }
- private:
- void button1_Click(System::Object ^ sender,
- System::EventArgs ^ e)
- {
- #include<algorithm>
- #include<string.h>
- int a[10];
- int v[10] = {0,7,12,15,10,16,20,25,30,35};
- int w[10] = {0,5,10,15,6,12,20,15,25,40};
- int out[10]= {0,0,0,0,0,0,0,0,0,0};
- int p[10][10] = {{0,0,0,0,0,0,0,0,0,0},
- {0,4,0,3,0,0,0,0,0,0},
- {0,7,8,4,0,0,0,0,0,0},
- {0,6,10,8,0,0,0,0,0,0},
- {0,4,2,2,1,0,0,0,0,0},
- {0,6,5,6,3,0,0,0,0,0},
- {0,3,7,3,1,0,0,1,0,0},
- {0,0,8,2,2,3,0,0,0,0},
- {0,10,0,5,3,2,0,0,1,0},
- {0,9,11,8,4,4,1,0,0,0}};
- int::TryParse(textBox1->Text, a[1]);
- int::TryParse(textBox2->Text, a[2]);
- int::TryParse(textBox3->Text, a[3]);
- int::TryParse(textBox5->Text, a[4]);
- int::TryParse(textBox4->Text, a[5]);
- int::TryParse(textBox7->Text, a[6]);
- int::TryParse(textBox9->Text, a[7]);
- int::TryParse(textBox10->Text, a[8]);
- int mins[10],jum1,jum2,jum3,jum4,jum5,jum6,jum7,jum8;
- for(int q=1; q<=9;q++)
- {
- mins[q] = 999;
- for(int r=1; r<=8;r++)
- {
- if (p[q][r] !=0)
- {
- if (mins[q] > (a[r]/p[q][r]))
- mins[q] =(a[r]/p[q][r]);
- }
- }
- }
- int maks=0,els=0;
- for(int a1=0;a1<=mins[1];a1++)
- for(int a2=0;a2<=mins[2];a2++)
- for(int a3=0;a3<=mins[3];a3++)
- for(int a4=0;a4<=mins[4];a4++)
- for(int a5=0;a5<=mins[5];a5++)
- for(int a6=0;a6<=mins[6];a6++)
- for(int a7=0;a7<=mins[7];a7++)
- for(int a8=0;a8<=mins[8];a8++)
- for(int a9=0;a9<=mins[9];a9++)
- {
- int lala[10];
- lala[1] = a1;
- lala[2] = a2;
- lala[3] = a3;
- lala[4] = a4;
- lala[5] = a5;
- lala[6] = a6;
- lala[7] = a7;
- lala[8] = a8;
- lala[9] = a9;
- jum1 = 0;
- jum2 = 0;
- jum3 = 0;
- jum4 = 0;
- jum5 = 0;
- jum6 = 0;
- jum7 = 0;
- jum8 = 0;
- for(int uu=1; uu<=9;uu++)
- {
- jum1+=lala[uu]*p[uu][1];
- jum2+=lala[uu]*p[uu][2];
- jum3+=lala[uu]*p[uu][3];
- jum4+=lala[uu]*p[uu][4];
- jum5+=lala[uu]*p[uu][5];
- jum6+=lala[uu]*p[uu][6];
- jum7+=lala[uu]*p[uu][7];
- jum8+=lala[uu]*p[uu][8];
- }
- if (maks < (a1*v[1]+a2*v[2]+a3*v[3]+a4*v[4]+a5*v[5]+a6*v[6]+a7*v[7]+a8*v[8]+a9*v[9]))
- {
- if ((jum1 <= a[1]) &&(jum2 <= a[2]) &&(jum3 <= a[3]) &&(jum4 <= a[4]) &&(jum5 <= a[5]) &&(jum6 <= a[6]) &&(jum7 <= a[7]) &&(jum8 <= a[8]))
- {
- out[1] = a1;
- out[2] = a2;
- out[3] = a3;
- out[4] = a4;
- out[5] = a5;
- out[6] = a6;
- out[7] = a7;
- out[8] = a8;
- out[9] = a9;
- maks = (a1*v[1]+a2*v[2]+a3*v[3]+a4*v[4]+a5*v[5]+a6*v[6]+a7*v[7]+a8*v[8]+a9*v[9]);
- els = (a1*w[1]+a2*w[2]+a3*w[3]+a4*w[4]+a5*w[5]+a6*w[6]+a7*w[7]+a8*w[8]+a9*w[9]);
- }
- }
- }
- textBox6->Text = out[1].ToString();
- textBox8->Text = out[2].ToString();
- textBox11->Text = out[3].ToString();
- textBox12->Text = out[4].ToString();
- textBox14->Text = out[5].ToString();
- textBox15->Text = out[6].ToString();
- textBox17->Text = out[7].ToString();
- textBox18->Text = out[8].ToString();
- textBox16->Text = out[9].ToString();
- textBox19->Text = maks.ToString();
- textBox13->Text = els.ToString();
- }
- private:
- void button2_Click(System::Object ^ sender,
- System::EventArgs ^ e)
- {
- #include<algorithm>
- #include<string.h>
- int a[10];
- int w[10] = {0,7,12,15,10,16,20,25,30,35};
- int v[10] = {0,5,10,15,6,12,20,15,25,40};
- int out[10]= {0,0,0,0,0,0,0,0,0,0};
- int p[10][10] = {{0,0,0,0,0,0,0,0,0,0},
- {0,4,0,3,0,0,0,0,0,0},
- {0,7,8,4,0,0,0,0,0,0},
- {0,6,10,8,0,0,0,0,0,0},
- {0,4,2,2,1,0,0,0,0,0},
- {0,6,5,6,3,0,0,0,0,0},
- {0,3,7,3,1,0,0,1,0,0},
- {0,0,8,2,2,3,0,0,0,0},
- {0,10,0,5,3,2,0,0,1,0},
- {0,9,11,8,4,4,1,0,0,0}};
- int::TryParse(textBox1->Text, a[1]);
- int::TryParse(textBox2->Text, a[2]);
- int::TryParse(textBox3->Text, a[3]);
- int::TryParse(textBox5->Text, a[4]);
- int::TryParse(textBox4->Text, a[5]);
- int::TryParse(textBox7->Text, a[6]);
- int::TryParse(textBox9->Text, a[7]);
- int::TryParse(textBox10->Text, a[8]);
- int mins[10],jum1,jum2,jum3,jum4,jum5,jum6,jum7,jum8;
- for(int q=1; q<=9;q++)
- {
- mins[q] = 999;
- for(int r=1; r<=8;r++)
- {
- if (p[q][r] !=0)
- {
- if (mins[q] > (a[r]/p[q][r]))
- mins[q] =(a[r]/p[q][r]);
- }
- }
- }
- int maks=0,els=0;
- for(int a1=0;a1<=mins[1];a1++)
- for(int a2=0;a2<=mins[2];a2++)
- for(int a3=0;a3<=mins[3];a3++)
- for(int a4=0;a4<=mins[4];a4++)
- for(int a5=0;a5<=mins[5];a5++)
- for(int a6=0;a6<=mins[6];a6++)
- for(int a7=0;a7<=mins[7];a7++)
- for(int a8=0;a8<=mins[8];a8++)
- for(int a9=0;a9<=mins[9];a9++)
- {
- int lala[10];
- lala[1] = a1;
- lala[2] = a2;
- lala[3] = a3;
- lala[4] = a4;
- lala[5] = a5;
- lala[6] = a6;
- lala[7] = a7;
- lala[8] = a8;
- lala[9] = a9;
- jum1 = 0;
- jum2 = 0;
- jum3 = 0;
- jum4 = 0;
- jum5 = 0;
- jum6 = 0;
- jum7 = 0;
- jum8 = 0;
- for(int uu=1; uu<=9;uu++)
- {
- jum1+=lala[uu]*p[uu][1];
- jum2+=lala[uu]*p[uu][2];
- jum3+=lala[uu]*p[uu][3];
- jum4+=lala[uu]*p[uu][4];
- jum5+=lala[uu]*p[uu][5];
- jum6+=lala[uu]*p[uu][6];
- jum7+=lala[uu]*p[uu][7];
- jum8+=lala[uu]*p[uu][8];
- }
- if (maks < (a1*v[1]+a2*v[2]+a3*v[3]+a4*v[4]+a5*v[5]+a6*v[6]+a7*v[7]+a8*v[8]+a9*v[9]))
- {
- if ((jum1 <= a[1]) &&(jum2 <= a[2]) &&(jum3 <= a[3]) &&(jum4 <= a[4]) &&(jum5 <= a[5]) &&(jum6 <= a[6]) &&(jum7 <= a[7]) &&(jum8 <= a[8]))
- {
- out[1] = a1;
- out[2] = a2;
- out[3] = a3;
- out[4] = a4;
- out[5] = a5;
- out[6] = a6;
- out[7] = a7;
- out[8] = a8;
- out[9] = a9;
- maks = (a1*v[1]+a2*v[2]+a3*v[3]+a4*v[4]+a5*v[5]+a6*v[6]+a7*v[7]+a8*v[8]+a9*v[9]);
- els = (a1*w[1]+a2*w[2]+a3*w[3]+a4*w[4]+a5*w[5]+a6*w[6]+a7*w[7]+a8*w[8]+a9*w[9]);
- }
- }
- }
- textBox6->Text = out[1].ToString();
- textBox8->Text = out[2].ToString();
- textBox11->Text = out[3].ToString();
- textBox12->Text = out[4].ToString();
- textBox14->Text = out[5].ToString();
- textBox15->Text = out[6].ToString();
- textBox17->Text = out[7].ToString();
- textBox18->Text = out[8].ToString();
- textBox16->Text = out[9].ToString();
- textBox19->Text = els.ToString();
- textBox13->Text = maks.ToString();
- }
- private: System::Void label11_Click(System::Object^ sender, System::EventArgs^ e) {}
- private: System::Void textBox2_TextChanged(System::Object^ sender, System::EventArgs^ e) {
- }
- private: System::Void textBox1_KeyPress(System::Object^ sender, System::Windows::Forms::KeyPressEventArgs^ e) {
- if(!Char::IsDigit(e->KeyChar) && e->KeyChar != 0x08)
- e->Handled = true;
- }
- };
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement