#pragma endregion
private: System::Void button8_Click(System::Object^ sender, System::EventArgs^ e) {
textBox1 -> Clear();
textBox2 -> Clear();
label4 -> Text = "0";
textBox1 -> Focus();
}
private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) {
double a, b, c;
if(textBox1 -> Text == "") {
textBox1 -> Clear();
textBox2 -> Clear();
label4 -> Text = "0";
MessageBox::Show("Введите аргументы","Ошибка",
MessageBoxButtons::OK, MessageBoxIcon::Warning);
textBox1 -> Focus();
} else if(textBox2 -> Text == "") {
textBox1 -> Clear();
textBox2 -> Clear();
label4 -> Text = "0";
MessageBox::Show("Введите аргументы","Ошибка",
MessageBoxButtons::OK, MessageBoxIcon::Warning);
textBox1 -> Focus();
} else {
label4 -> Text = "";
a = System::Convert::ToDouble(textBox1 -> Text);
b = System::Convert::ToDouble(textBox2 -> Text);
c = a + b;
label4 -> Text = c.ToString("e");
}
}
private: System::Void button2_Click(System::Object^ sender, System::EventArgs^ e) {
double a, b, c;
if(textBox1 -> Text == "") {
textBox1 -> Clear();
textBox2 -> Clear();
label4 -> Text = "0";
MessageBox::Show("Введите аргументы","Ошибка",
MessageBoxButtons::OK, MessageBoxIcon::Warning);
textBox1 -> Focus();
} else if(textBox2 -> Text == "") {
textBox1 -> Clear();
textBox2 -> Clear();
label4 -> Text = "0";
MessageBox::Show("Введите аргументы","Ошибка",
MessageBoxButtons::OK, MessageBoxIcon::Warning);
textBox1 -> Focus();
} else {
label4 -> Text = "";
a = System::Convert::ToDouble(textBox1 -> Text);
b = System::Convert::ToDouble(textBox2 -> Text);
c = a - b;
label4 -> Text = c.ToString("e");
}
}
private: System::Void button4_Click(System::Object^ sender, System::EventArgs^ e) {
double a, b, c;
if(textBox1 -> Text == "") {
textBox1 -> Clear();
textBox2 -> Clear();
label4 -> Text = "0";
MessageBox::Show("Введите аргументы","Ошибка",
MessageBoxButtons::OK, MessageBoxIcon::Warning);
textBox1 -> Focus();
} else if(textBox2 -> Text == "") {
textBox1 -> Clear();
textBox2 -> Clear();
label4 -> Text = "0";
MessageBox::Show("Введите аргументы","Ошибка",
MessageBoxButtons::OK, MessageBoxIcon::Warning);
textBox1 -> Focus();
} else {
label4 -> Text = "";
a = System::Convert::ToDouble(textBox1 -> Text);
b = System::Convert::ToDouble(textBox2 -> Text);
c = a * b;
label4 -> Text = c.ToString("e");
}
}
private: System::Void button5_Click(System::Object^ sender, System::EventArgs^ e) {
double a, b, c;
if(textBox1 -> Text == "") {
textBox1 -> Clear();
textBox2 -> Clear();
label4 -> Text = "0";
MessageBox::Show("Введите аргументы","Ошибка",
MessageBoxButtons::OK, MessageBoxIcon::Warning);
textBox1 -> Focus();
} else if(textBox2 -> Text == "") {
textBox1 -> Clear();
textBox2 -> Clear();
label4 -> Text = "0";
MessageBox::Show("Введите аргументы","Ошибка",
MessageBoxButtons::OK, MessageBoxIcon::Warning);
textBox1 -> Focus();
} else {
label4 -> Text = "";
a = System::Convert::ToDouble(textBox1 -> Text);
b = System::Convert::ToDouble(textBox2 -> Text);
c = a / b;
label4 -> Text = c.ToString("e");
}
}
private: System::Void button7_Click_1(System::Object^ sender, System::EventArgs^ e) {
Form2 ^f2 = gcnew Form2();
f2->Show();
}
private: System::Void button6_Click(System::Object^ sender, System::EventArgs^ e) {
Close();
}
private: System::Void button3_Click_1(System::Object^ sender, System::EventArgs^ e) {
textBox1 -> Clear();
textBox2 -> Clear();
textBox1 -> Text = label4 -> Text;
textBox2 -> Focus();
}