Advertisement
Guest User

Untitled

a guest
Oct 17th, 2019
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.95 KB | None | 0 0
  1. private void button1_Click(object sender, EventArgs e)
  2. {
  3. if (textBox1.Text == "0")
  4. {
  5. textBox1.Clear();
  6.  
  7.  
  8. }
  9.  
  10. Button button = (Button)sender;
  11.  
  12. textBox1.Text = textBox1.Text + button.Text;
  13. }
  14.  
  15. private void button18_Click(object sender, EventArgs e)
  16. {
  17. textBox1.Text = "0";
  18. result = 0;
  19. }
  20.  
  21. private void operacja(object sender, MouseEventArgs e)
  22. {
  23. Button button = (Button)sender;
  24.  
  25. operation = button.Text;
  26. result = double.Parse(textBox1.Text);
  27. textBox1.Clear();
  28.  
  29.  
  30. }
  31.  
  32. private void button17_Click(object sender, EventArgs e)
  33. {
  34. textBox1.Text = "0";
  35.  
  36. }
  37.  
  38. private void button15_Click(object sender, EventArgs e)
  39. {
  40. switch (operation)
  41. {
  42. case "+":
  43. {
  44. textBox1.Text = (result + double.Parse(textBox1.Text)).ToString();
  45. if (textBox1.Text == "2137")
  46. {
  47. textBox1.Text = "AHAHAHHAHA 2137 CZAISZ PAPIEŻ UMAR JP2GMD";
  48.  
  49. }
  50. break;
  51. }
  52. case "-":
  53. {
  54. textBox1.Text = (result - double.Parse(textBox1.Text)).ToString();
  55. break;
  56. if (textBox1.Text == "2137")
  57. {
  58. textBox1.Text = "AHAHAHHAHA 2137 CZAISZ PAPIEŻ UMAR JP2GMD";
  59.  
  60. }
  61. }
  62. case "*":
  63. {
  64. textBox1.Text = (result * double.Parse(textBox1.Text)).ToString();
  65. break;
  66. if (textBox1.Text == "2137")
  67. {
  68. textBox1.Text = "AHAHAHHAHA 2137 CZAISZ PAPIEŻ UMAR JP2GMD";
  69.  
  70. }
  71. }
  72. case "/":
  73. {
  74. if(textBox1.Text=="0")
  75. {
  76. textBox1.Text = "nie dziel przez zero kurwo jebana";
  77. break; }
  78. else
  79. textBox1.Text = (result / double.Parse(textBox1.Text)).ToString();
  80. if(textBox1.Text=="2137")
  81. {
  82. textBox1.Text = "AHAHAHHAHA 2137 CZAISZ PAPIEŻ UMAR HAHAHAHAH";
  83.  
  84. }
  85. break;
  86. }
  87.  
  88. }
  89.  
  90.  
  91.  
  92.  
  93. }
  94. void button3_Click(object sender, EventArgs e)
  95. {
  96. Form2 nowyFormularz = new Form2();
  97. nowyFormularz.Show();
  98. this.Hide();
  99. }
  100. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement