- #pragma once
- namespace My220310 {
- 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
- ///
- /// 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 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::Button^ button1;
- protected:
- private: System::Windows::Forms::Label^ label1;
- private: System::Windows::Forms::TextBox^ textBox1;
- private: System::Windows::Forms::TextBox^ textBox2;
- private: System::Windows::Forms::TextBox^ textBox3;
- private: System::Windows::Forms::Label^ label2;
- private: System::Windows::Forms::GroupBox^ groupBox1;
- private: System::Windows::Forms::RadioButton^ radioButton4;
- private: System::Windows::Forms::RadioButton^ radioButton3;
- private: System::Windows::Forms::RadioButton^ radioButton2;
- private: System::Windows::Forms::RadioButton^ radioButton1;
- 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)
- {
- this->button1 = (gcnew System::Windows::Forms::Button());
- this->label1 = (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->label2 = (gcnew System::Windows::Forms::Label());
- this->groupBox1 = (gcnew System::Windows::Forms::GroupBox());
- this->radioButton1 = (gcnew System::Windows::Forms::RadioButton());
- this->radioButton2 = (gcnew System::Windows::Forms::RadioButton());
- this->radioButton3 = (gcnew System::Windows::Forms::RadioButton());
- this->radioButton4 = (gcnew System::Windows::Forms::RadioButton());
- this->groupBox1->SuspendLayout();
- this->SuspendLayout();
- //
- // button1
- //
- this->button1->Location = System::Drawing::Point(366, 218);
- this->button1->Name = L"button1";
- this->button1->Size = System::Drawing::Size(75, 23);
- this->button1->TabIndex = 0;
- this->button1->Text = L"Oblicz";
- this->button1->UseVisualStyleBackColor = true;
- this->button1->Click += gcnew System::EventHandler(this, &Form1::button1_Click);
- //
- // label1
- //
- this->label1->AutoSize = true;
- this->label1->Location = System::Drawing::Point(197, 173);
- this->label1->Name = L"label1";
- this->label1->Size = System::Drawing::Size(13, 13);
- this->label1->TabIndex = 1;
- this->label1->Text = L"+";
- this->label1->Click += gcnew System::EventHandler(this, &Form1::label1_Click);
- //
- // textBox1
- //
- this->textBox1->Location = System::Drawing::Point(91, 170);
- this->textBox1->Name = L"textBox1";
- this->textBox1->Size = System::Drawing::Size(100, 20);
- this->textBox1->TabIndex = 2;
- //
- // textBox2
- //
- this->textBox2->Location = System::Drawing::Point(216, 170);
- this->textBox2->Name = L"textBox2";
- this->textBox2->Size = System::Drawing::Size(100, 20);
- this->textBox2->TabIndex = 3;
- //
- // textBox3
- //
- this->textBox3->Location = System::Drawing::Point(341, 170);
- this->textBox3->Name = L"textBox3";
- this->textBox3->Size = System::Drawing::Size(100, 20);
- this->textBox3->TabIndex = 4;
- this->textBox3->TextChanged += gcnew System::EventHandler(this, &Form1::textBox3_TextChanged);
- //
- // label2
- //
- this->label2->AutoSize = true;
- this->label2->Location = System::Drawing::Point(322, 173);
- this->label2->Name = L"label2";
- this->label2->Size = System::Drawing::Size(13, 13);
- this->label2->TabIndex = 1;
- this->label2->Text = L"=";
- //
- // groupBox1
- //
- this->groupBox1->Controls->Add(this->radioButton4);
- this->groupBox1->Controls->Add(this->radioButton3);
- this->groupBox1->Controls->Add(this->radioButton2);
- this->groupBox1->Controls->Add(this->radioButton1);
- this->groupBox1->Location = System::Drawing::Point(183, 29);
- this->groupBox1->Name = L"groupBox1";
- this->groupBox1->Size = System::Drawing::Size(152, 125);
- this->groupBox1->TabIndex = 5;
- this->groupBox1->TabStop = false;
- this->groupBox1->Text = L"groupBox1";
- this->groupBox1->Enter += gcnew System::EventHandler(this, &Form1::groupBox1_Enter);
- //
- // radioButton1
- //
- this->radioButton1->AutoSize = true;
- this->radioButton1->Location = System::Drawing::Point(55, 19);
- this->radioButton1->Name = L"radioButton1";
- this->radioButton1->Size = System::Drawing::Size(31, 17);
- this->radioButton1->TabIndex = 0;
- this->radioButton1->TabStop = true;
- this->radioButton1->Text = L"+";
- this->radioButton1->UseVisualStyleBackColor = true;
- this->radioButton1->CheckedChanged += gcnew System::EventHandler(this, &Form1::radioButton1_CheckedChanged);
- //
- // radioButton2
- //
- this->radioButton2->AutoSize = true;
- this->radioButton2->Location = System::Drawing::Point(55, 42);
- this->radioButton2->Name = L"radioButton2";
- this->radioButton2->Size = System::Drawing::Size(28, 17);
- this->radioButton2->TabIndex = 1;
- this->radioButton2->TabStop = true;
- this->radioButton2->Text = L"-";
- this->radioButton2->UseVisualStyleBackColor = true;
- //
- // radioButton3
- //
- this->radioButton3->AutoSize = true;
- this->radioButton3->Location = System::Drawing::Point(55, 65);
- this->radioButton3->Name = L"radioButton3";
- this->radioButton3->Size = System::Drawing::Size(29, 17);
- this->radioButton3->TabIndex = 2;
- this->radioButton3->TabStop = true;
- this->radioButton3->Text = L"*";
- this->radioButton3->UseVisualStyleBackColor = true;
- //
- // radioButton4
- //
- this->radioButton4->AutoSize = true;
- this->radioButton4->Location = System::Drawing::Point(55, 88);
- this->radioButton4->Name = L"radioButton4";
- this->radioButton4->Size = System::Drawing::Size(30, 17);
- this->radioButton4->TabIndex = 3;
- this->radioButton4->TabStop = true;
- this->radioButton4->Text = L"/";
- this->radioButton4->UseVisualStyleBackColor = true;
- //
- // Form1
- //
- this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
- this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
- this->ClientSize = System::Drawing::Size(604, 326);
- this->Controls->Add(this->groupBox1);
- this->Controls->Add(this->textBox3);
- this->Controls->Add(this->textBox2);
- this->Controls->Add(this->textBox1);
- this->Controls->Add(this->label2);
- this->Controls->Add(this->label1);
- this->Controls->Add(this->button1);
- this->Name = L"Form1";
- this->Text = L"Form1";
- this->groupBox1->ResumeLayout(false);
- this->groupBox1->PerformLayout();
- this->ResumeLayout(false);
- this->PerformLayout();
- }
- #pragma endregion
- private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e)
- {
- if(RadioButton1->Checked){
- textBox3->Text=System::Convert::ToString(System::Convert::ToDouble(textBox1->Text)+System::Convert::ToDouble(textBox2->Text))};
- if(RadioButton2->Checked){
- textBox3->Text=System::Convert::ToString(System::Convert::ToDouble(textBox1->Text)-System::Convert::ToDouble(textBox2->Text))};
- if(RadioButton3->Checked){
- textBox3->Text=System::Convert::ToString(System::Convert::ToDouble(textBox1->Text)*System::Convert::ToDouble(textBox2->Text))};
- if(RadioButton4->Checked){
- textBox3->Text=System::Convert::ToString(System::Convert::ToDouble(textBox1->Text)/System::Convert::ToDouble(textBox2->Text))};
- }
- private: System::Void label1_Click(System::Object^ sender, System::EventArgs^ e) {
- }
- private: System::Void textBox3_TextChanged(System::Object^ sender, System::EventArgs^ e)
- {
- }
- private: System::Void groupBox1_Enter(System::Object^ sender, System::EventArgs^ e) {
- }
- private: System::Void radioButton1_CheckedChanged(System::Object^ sender, System::EventArgs^ e) {
- }
- };
- }
