Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void button1_Click(object sender, EventArgs e)
- {
- if (textBox1.Text == "0")
- {
- textBox1.Clear();
- }
- Button button = (Button)sender;
- textBox1.Text = textBox1.Text + button.Text;
- }
- private void button18_Click(object sender, EventArgs e)
- {
- textBox1.Text = "0";
- result = 0;
- }
- private void operacja(object sender, MouseEventArgs e)
- {
- Button button = (Button)sender;
- operation = button.Text;
- result = double.Parse(textBox1.Text);
- textBox1.Clear();
- }
- private void button17_Click(object sender, EventArgs e)
- {
- textBox1.Text = "0";
- }
- private void button15_Click(object sender, EventArgs e)
- {
- switch (operation)
- {
- case "+":
- {
- textBox1.Text = (result + double.Parse(textBox1.Text)).ToString();
- if (textBox1.Text == "2137")
- {
- textBox1.Text = "AHAHAHHAHA 2137 CZAISZ PAPIEŻ UMAR JP2GMD";
- }
- break;
- }
- case "-":
- {
- textBox1.Text = (result - double.Parse(textBox1.Text)).ToString();
- break;
- if (textBox1.Text == "2137")
- {
- textBox1.Text = "AHAHAHHAHA 2137 CZAISZ PAPIEŻ UMAR JP2GMD";
- }
- }
- case "*":
- {
- textBox1.Text = (result * double.Parse(textBox1.Text)).ToString();
- break;
- if (textBox1.Text == "2137")
- {
- textBox1.Text = "AHAHAHHAHA 2137 CZAISZ PAPIEŻ UMAR JP2GMD";
- }
- }
- case "/":
- {
- if(textBox1.Text=="0")
- {
- textBox1.Text = "nie dziel przez zero kurwo jebana";
- break; }
- else
- textBox1.Text = (result / double.Parse(textBox1.Text)).ToString();
- if(textBox1.Text=="2137")
- {
- textBox1.Text = "AHAHAHHAHA 2137 CZAISZ PAPIEŻ UMAR HAHAHAHAH";
- }
- break;
- }
- }
- }
- void button3_Click(object sender, EventArgs e)
- {
- Form2 nowyFormularz = new Form2();
- nowyFormularz.Show();
- this.Hide();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement