Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 8th, 2012  |  syntax: None  |  size: 13.85 KB  |  hits: 13  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #pragma once
  2.  
  3. namespace kalkulatro18kw {
  4.  
  5.         using namespace System;
  6.         using namespace System::ComponentModel;
  7.         using namespace System::Collections;
  8.         using namespace System::Windows::Forms;
  9.         using namespace System::Data;
  10.         using namespace System::Drawing;
  11.  
  12.         /// <summary>
  13.         /// Summary for Form1
  14.         /// </summary>
  15.         public ref class Form1 : public System::Windows::Forms::Form
  16.         {
  17.         public:
  18.                 Form1(void)
  19.                 {
  20.                         InitializeComponent();
  21.                         //
  22.                         //TODO: Add the constructor code here
  23.                         //
  24.                 }
  25.  
  26.         protected:
  27.                 /// <summary>
  28.                 /// Clean up any resources being used.
  29.                 /// </summary>
  30.                 ~Form1()
  31.                 {
  32.                         if (components)
  33.                         {
  34.                                 delete components;
  35.                         }
  36.                 }
  37.         private: System::Windows::Forms::Button^  button1;
  38.         protected:
  39.         private: System::Windows::Forms::Button^  button2;
  40.         private: System::Windows::Forms::Button^  button3;
  41.         private: System::Windows::Forms::Button^  button4;
  42.         private: System::Windows::Forms::Button^  button5;
  43.         private: System::Windows::Forms::Button^  button6;
  44.         private: System::Windows::Forms::Button^  button7;
  45.         private: System::Windows::Forms::Button^  button8;
  46.         private: System::Windows::Forms::Button^  button9;
  47.         private: System::Windows::Forms::Button^  button10;
  48.         private: System::Windows::Forms::Button^  button11;
  49.         private: System::Windows::Forms::Button^  button12;
  50.         private: System::Windows::Forms::Button^  button13;
  51.         private: System::Windows::Forms::Button^  button14;
  52.         private: System::Windows::Forms::Button^  button15;
  53.         private: System::Windows::Forms::Button^  button16;
  54.         private: System::Windows::Forms::TextBox^  textBox1;
  55.         private: System::Windows::Forms::Button^  button17;
  56.  
  57.         protected:
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.         protected:
  68.  
  69.         private:
  70.                 /// <summary>
  71.                 /// Required designer variable.
  72.                 /// </summary>
  73.                 System::ComponentModel::Container ^components;
  74.  
  75. #pragma region Windows Form Designer generated code
  76.                 /// <summary>
  77.                 /// Required method for Designer support - do not modify
  78.                 /// the contents of this method with the code editor.
  79.                 /// </summary>
  80.                 void InitializeComponent(void)
  81.                 {
  82.                         this->button1 = (gcnew System::Windows::Forms::Button());
  83.                         this->button2 = (gcnew System::Windows::Forms::Button());
  84.                         this->button3 = (gcnew System::Windows::Forms::Button());
  85.                         this->button4 = (gcnew System::Windows::Forms::Button());
  86.                         this->button5 = (gcnew System::Windows::Forms::Button());
  87.                         this->button6 = (gcnew System::Windows::Forms::Button());
  88.                         this->button7 = (gcnew System::Windows::Forms::Button());
  89.                         this->button8 = (gcnew System::Windows::Forms::Button());
  90.                         this->button9 = (gcnew System::Windows::Forms::Button());
  91.                         this->button10 = (gcnew System::Windows::Forms::Button());
  92.                         this->button11 = (gcnew System::Windows::Forms::Button());
  93.                         this->button12 = (gcnew System::Windows::Forms::Button());
  94.                         this->button13 = (gcnew System::Windows::Forms::Button());
  95.                         this->button14 = (gcnew System::Windows::Forms::Button());
  96.                         this->button15 = (gcnew System::Windows::Forms::Button());
  97.                         this->button16 = (gcnew System::Windows::Forms::Button());
  98.                         this->textBox1 = (gcnew System::Windows::Forms::TextBox());
  99.                         this->button17 = (gcnew System::Windows::Forms::Button());
  100.                         this->SuspendLayout();
  101.                         //
  102.                         // button1
  103.                         //
  104.                         this->button1->Location = System::Drawing::Point(25, 196);
  105.                         this->button1->Name = L"button1";
  106.                         this->button1->Size = System::Drawing::Size(37, 26);
  107.                         this->button1->TabIndex = 0;
  108.                         this->button1->Text = L",";
  109.                         this->button1->UseVisualStyleBackColor = true;
  110.                         this->button1->Click += gcnew System::EventHandler(this, &Form1::button1_Click_1);
  111.                         //
  112.                         // button2
  113.                         //
  114.                         this->button2->Location = System::Drawing::Point(68, 196);
  115.                         this->button2->Name = L"button2";
  116.                         this->button2->Size = System::Drawing::Size(37, 26);
  117.                         this->button2->TabIndex = 1;
  118.                         this->button2->Text = L"0";
  119.                         this->button2->UseVisualStyleBackColor = true;
  120.                         this->button2->Click += gcnew System::EventHandler(this, &Form1::button2_Click);
  121.                         //
  122.                         // button3
  123.                         //
  124.                         this->button3->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 6.75F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
  125.                                 static_cast<System::Byte>(238)));
  126.                         this->button3->Location = System::Drawing::Point(111, 196);
  127.                         this->button3->Name = L"button3";
  128.                         this->button3->Size = System::Drawing::Size(37, 26);
  129.                         this->button3->TabIndex = 2;
  130.                         this->button3->Text = L"C/CE";
  131.                         this->button3->UseVisualStyleBackColor = true;
  132.                         this->button3->Click += gcnew System::EventHandler(this, &Form1::button3_Click);
  133.                         //
  134.                         // button4
  135.                         //
  136.                         this->button4->Location = System::Drawing::Point(25, 164);
  137.                         this->button4->Name = L"button4";
  138.                         this->button4->Size = System::Drawing::Size(37, 26);
  139.                         this->button4->TabIndex = 3;
  140.                         this->button4->Text = L"1";
  141.                         this->button4->UseVisualStyleBackColor = true;
  142.                         this->button4->Click += gcnew System::EventHandler(this, &Form1::button4_Click);
  143.                         //
  144.                         // button5
  145.                         //
  146.                         this->button5->Location = System::Drawing::Point(68, 164);
  147.                         this->button5->Name = L"button5";
  148.                         this->button5->Size = System::Drawing::Size(37, 26);
  149.                         this->button5->TabIndex = 4;
  150.                         this->button5->Text = L"2";
  151.                         this->button5->UseVisualStyleBackColor = true;
  152.                         this->button5->Click += gcnew System::EventHandler(this, &Form1::button5_Click);
  153.                         //
  154.                         // button6
  155.                         //
  156.                         this->button6->Location = System::Drawing::Point(111, 164);
  157.                         this->button6->Name = L"button6";
  158.                         this->button6->Size = System::Drawing::Size(37, 26);
  159.                         this->button6->TabIndex = 5;
  160.                         this->button6->Text = L"3";
  161.                         this->button6->UseVisualStyleBackColor = true;
  162.                         this->button6->Click += gcnew System::EventHandler(this, &Form1::button6_Click);
  163.                         //
  164.                         // button7
  165.                         //
  166.                         this->button7->Location = System::Drawing::Point(25, 132);
  167.                         this->button7->Name = L"button7";
  168.                         this->button7->Size = System::Drawing::Size(37, 26);
  169.                         this->button7->TabIndex = 6;
  170.                         this->button7->Text = L"4";
  171.                         this->button7->UseVisualStyleBackColor = true;
  172.                         this->button7->Click += gcnew System::EventHandler(this, &Form1::button7_Click);
  173.                         //
  174.                         // button8
  175.                         //
  176.                         this->button8->Location = System::Drawing::Point(68, 132);
  177.                         this->button8->Name = L"button8";
  178.                         this->button8->Size = System::Drawing::Size(37, 26);
  179.                         this->button8->TabIndex = 7;
  180.                         this->button8->Text = L"5";
  181.                         this->button8->UseVisualStyleBackColor = true;
  182.                         this->button8->Click += gcnew System::EventHandler(this, &Form1::button8_Click);
  183.                         //
  184.                         // button9
  185.                         //
  186.                         this->button9->Location = System::Drawing::Point(111, 132);
  187.                         this->button9->Name = L"button9";
  188.                         this->button9->Size = System::Drawing::Size(37, 26);
  189.                         this->button9->TabIndex = 8;
  190.                         this->button9->Text = L"6";
  191.                         this->button9->UseVisualStyleBackColor = true;
  192.                         this->button9->Click += gcnew System::EventHandler(this, &Form1::button9_Click);
  193.                         //
  194.                         // button10
  195.                         //
  196.                         this->button10->Location = System::Drawing::Point(25, 100);
  197.                         this->button10->Name = L"button10";
  198.                         this->button10->Size = System::Drawing::Size(37, 26);
  199.                         this->button10->TabIndex = 9;
  200.                         this->button10->Text = L"7";
  201.                         this->button10->UseVisualStyleBackColor = true;
  202.                         this->button10->Click += gcnew System::EventHandler(this, &Form1::button10_Click);
  203.                         //
  204.                         // button11
  205.                         //
  206.                         this->button11->Location = System::Drawing::Point(68, 100);
  207.                         this->button11->Name = L"button11";
  208.                         this->button11->Size = System::Drawing::Size(37, 26);
  209.                         this->button11->TabIndex = 10;
  210.                         this->button11->Text = L"8";
  211.                         this->button11->UseVisualStyleBackColor = true;
  212.                         this->button11->Click += gcnew System::EventHandler(this, &Form1::button11_Click);
  213.                         //
  214.                         // button12
  215.                         //
  216.                         this->button12->Location = System::Drawing::Point(111, 100);
  217.                         this->button12->Name = L"button12";
  218.                         this->button12->Size = System::Drawing::Size(37, 26);
  219.                         this->button12->TabIndex = 11;
  220.                         this->button12->Text = L"9";
  221.                         this->button12->UseVisualStyleBackColor = true;
  222.                         this->button12->Click += gcnew System::EventHandler(this, &Form1::button12_Click);
  223.                         //
  224.                         // button13
  225.                         //
  226.                         this->button13->Location = System::Drawing::Point(154, 100);
  227.                         this->button13->Name = L"button13";
  228.                         this->button13->Size = System::Drawing::Size(37, 26);
  229.                         this->button13->TabIndex = 12;
  230.                         this->button13->Text = L"/";
  231.                         this->button13->UseVisualStyleBackColor = true;
  232.                         this->button13->Click += gcnew System::EventHandler(this, &Form1::button13_Click);
  233.                         //
  234.                         // button14
  235.                         //
  236.                         this->button14->Location = System::Drawing::Point(154, 132);
  237.                         this->button14->Name = L"button14";
  238.                         this->button14->Size = System::Drawing::Size(37, 26);
  239.                         this->button14->TabIndex = 13;
  240.                         this->button14->Text = L"*";
  241.                         this->button14->UseVisualStyleBackColor = true;
  242.                         this->button14->Click += gcnew System::EventHandler(this, &Form1::button14_Click);
  243.                         //
  244.                         // button15
  245.                         //
  246.                         this->button15->Location = System::Drawing::Point(154, 164);
  247.                         this->button15->Name = L"button15";
  248.                         this->button15->Size = System::Drawing::Size(37, 26);
  249.                         this->button15->TabIndex = 14;
  250.                         this->button15->Text = L"-";
  251.                         this->button15->UseVisualStyleBackColor = true;
  252.                         this->button15->Click += gcnew System::EventHandler(this, &Form1::button15_Click);
  253.                         //
  254.                         // button16
  255.                         //
  256.                         this->button16->Location = System::Drawing::Point(154, 196);
  257.                         this->button16->Name = L"button16";
  258.                         this->button16->Size = System::Drawing::Size(37, 26);
  259.                         this->button16->TabIndex = 15;
  260.                         this->button16->Text = L"+";
  261.                         this->button16->UseVisualStyleBackColor = true;
  262.                         this->button16->Click += gcnew System::EventHandler(this, &Form1::button16_Click);
  263.                         //
  264.                         // textBox1
  265.                         //
  266.                         this->textBox1->Location = System::Drawing::Point(25, 45);
  267.                         this->textBox1->Name = L"textBox1";
  268.                         this->textBox1->Size = System::Drawing::Size(217, 20);
  269.                         this->textBox1->TabIndex = 16;
  270.                         //
  271.                         // button17
  272.                         //
  273.                         this->button17->Location = System::Drawing::Point(197, 100);
  274.                         this->button17->Name = L"button17";
  275.                         this->button17->Size = System::Drawing::Size(45, 121);
  276.                         this->button17->TabIndex = 17;
  277.                         this->button17->Text = L"=";
  278.                         this->button17->UseVisualStyleBackColor = true;
  279.                         this->button17->Click += gcnew System::EventHandler(this, &Form1::button17_Click);
  280.                         //
  281.                         // Form1
  282.                         //
  283.                         this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
  284.                         this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
  285.                         this->ClientSize = System::Drawing::Size(292, 266);
  286.                         this->Controls->Add(this->button17);
  287.                         this->Controls->Add(this->textBox1);
  288.                         this->Controls->Add(this->button16);
  289.                         this->Controls->Add(this->button15);
  290.                         this->Controls->Add(this->button14);
  291.                         this->Controls->Add(this->button13);
  292.                         this->Controls->Add(this->button12);
  293.                         this->Controls->Add(this->button11);
  294.                         this->Controls->Add(this->button10);
  295.                         this->Controls->Add(this->button9);
  296.                         this->Controls->Add(this->button8);
  297.                         this->Controls->Add(this->button7);
  298.                         this->Controls->Add(this->button6);
  299.                         this->Controls->Add(this->button5);
  300.                         this->Controls->Add(this->button4);
  301.                         this->Controls->Add(this->button3);
  302.                         this->Controls->Add(this->button2);
  303.                         this->Controls->Add(this->button1);
  304.                         this->Name = L"Form1";
  305.                         this->Text = L"Form1";
  306.                         this->Load += gcnew System::EventHandler(this, &Form1::Form1_Load);
  307.                         this->ResumeLayout(false);
  308.                         this->PerformLayout();
  309.  
  310.                 }
  311. #pragma endregion
  312.                
  313.        
  314. private: System::Void button1_Click_1(System::Object^  sender, System::EventArgs^  e) {
  315.                           this -> textBox1 -> Text = this -> textBox1 -> Text +  ",";
  316.                          
  317. }
  318. private: System::Void button2_Click(System::Object^  sender, System::EventArgs^  e) {
  319.                            this -> textBox1 -> Text = this -> textBox1 -> Text +  "0";
  320.                  }
  321. private: System::Void button4_Click(System::Object^  sender, System::EventArgs^  e) {
  322.                            this -> textBox1 -> Text = this -> textBox1 -> Text +  "1";
  323.                  }
  324. private: System::Void button5_Click(System::Object^  sender, System::EventArgs^  e) {
  325.                            this -> textBox1 -> Text = this -> textBox1 -> Text +  "2";
  326.                  }
  327. private: System::Void button6_Click(System::Object^  sender, System::EventArgs^  e) {
  328.                            this -> textBox1 -> Text = this -> textBox1 -> Text +  "3";
  329.                  }
  330. private: System::Void button7_Click(System::Object^  sender, System::EventArgs^  e) {
  331.                            this -> textBox1 -> Text = this -> textBox1 -> Text +  "4";
  332.                  }
  333. private: System::Void button8_Click(System::Object^  sender, System::EventArgs^  e) {
  334.                            this -> textBox1 -> Text = this -> textBox1 -> Text +  "5";
  335.                  }
  336. private: System::Void button9_Click(System::Object^  sender, System::EventArgs^  e) {
  337.                            this -> textBox1 -> Text = this -> textBox1 -> Text +  "6";
  338.                  }
  339.  
  340. private: System::Void button10_Click(System::Object^  sender, System::EventArgs^  e) {
  341.                            this -> textBox1 -> Text = this -> textBox1 -> Text +  "7";
  342.                  }
  343. private: System::Void button11_Click(System::Object^  sender, System::EventArgs^  e) {
  344.                            this -> textBox1 -> Text = this -> textBox1 -> Text +  "8";
  345.                  }
  346.  
  347. private: System::Void button12_Click(System::Object^  sender, System::EventArgs^  e) {
  348.                            this -> textBox1 -> Text = this -> textBox1 -> Text +  "9";
  349.                  }
  350. private: System::Void Form1_Load(System::Object^  sender, System::EventArgs^  e) {
  351.                  }
  352. private: System::Void button13_Click(System::Object^  sender, System::EventArgs^  e) {
  353.                           this -> textBox1 -> Text = "//";
  354.                  }
  355. private: System::Void button14_Click(System::Object^  sender, System::EventArgs^  e) {
  356.                           this -> textBox1 -> Text = "*";
  357.                  }
  358. private: System::Void button15_Click(System::Object^  sender, System::EventArgs^  e) {
  359.                           this -> textBox1 -> Text = "-";
  360.                  }
  361. private: System::Void button16_Click(System::Object^  sender, System::EventArgs^  e) {
  362.                           this -> textBox1 -> Text = "+";
  363.                  }
  364. private: System::Void button3_Click(System::Object^  sender, System::EventArgs^  e) {
  365.                          this -> textBox1 -> Text = "";
  366.                  }
  367. private: System::Void button17_Click(System::Object^  sender, System::EventArgs^  e) {
  368.                  }
  369. };
  370. }