using
System;using
System.Collections.Generic;using
System.ComponentModel;using
System.Data;using
System.Drawing;using
System.Text;using
System.Windows.Forms;namespace
Calculater{
public partial class Form1 : Form{
bool p = true; public Form1(){
InitializeComponent();
}
private void button9_Click( sender, EventArgs e){
if (p)textBox1.Text += button9.Text;
else{
textBox1.Text =
"0";textBox1.Text += button9.Text;
}
}
private void button1_Click( sender, EventArgs e){
if (p)textBox1.Text += button1.Text;
else{
textBox1.Text =
"0";textBox1.Text += button1.Text;
}
}
private void button2_Click( sender, EventArgs e){
if (p)textBox1.Text += button2.Text;
else{
textBox1.Text =
"0";textBox1.Text += button2.Text;
}
}
private void button3_Click( sender, EventArgs e){
if (p)textBox1.Text += button3.Text;
else{
textBox1.Text =
"0";textBox1.Text += button3.Text;
}
}
private void button5_Click( sender, EventArgs e){
if (p)textBox1.Text += button5.Text;
else{
textBox1.Text =
"0";textBox1.Text += button5.Text;
}
}
private void button6_Click( sender, EventArgs e){
if (p)textBox1.Text += button6.Text;
else{
textBox1.Text =
"0";textBox1.Text += button6.Text;
}
}
private void button7_Click( sender, EventArgs e){
if (p)textBox1.Text += button7.Text;
else{
textBox1.Text =
"0";textBox1.Text += button7.Text;
}
}
private void button10_Click( sender, EventArgs e){
}
private void button11_Click( sender, EventArgs e){
if (p)textBox1.Text += button11.Text;
else{
textBox1.Text =
"0";textBox1.Text += button11.Text;
}
}
private void button13_Click( sender, EventArgs e){
if (p)textBox1.Text += button13.Text;
else{
textBox1.Text =
"0";textBox1.Text += button13.Text;
}
}
private void Form1_Load( sender, EventArgs e){
}
private void button10_Click_1( sender, EventArgs e){
if (p)textBox1.Text += button10.Text;
else{
textBox1.Text =
"0";textBox1.Text += button10.Text;
}
}
private void button1_Click_1( sender, EventArgs e){
if (p)textBox1.Text += button7.Text;
else{
textBox1.Text =
"0";textBox1.Text += button7.Text;
}
}
private void button2_Click_1( sender, EventArgs e){
}
}