document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using System.Windows.Forms;
  10.  
  11. namespace Kalkulator
  12. {
  13.     public partial class Form1 : Form
  14.     {
  15.         public Form1()
  16.         {
  17.             InitializeComponent();
  18.         }
  19.  
  20.         private void label1_Click(object sender, EventArgs e)
  21.         {
  22.  
  23.         }
  24.  
  25.         private void textBox2_TextChanged(object sender, EventArgs e)
  26.         {
  27.  
  28.         }
  29.  
  30.         private void Form1_Load(object sender, EventArgs e)
  31.         {
  32.             textBox1.Clear();
  33.             textBox2.Clear();
  34.             label4.Text = "";
  35.  
  36.         }
  37.  
  38.         private void button1_Click(object sender, EventArgs e)
  39.         {
  40.             if(string.IsNullOrEmpty(textBox1.Text) || string.IsNullOrEmpty(textBox2.Text))
  41.             {
  42.                 MessageBox.Show("Angka 1 dan Angka 2 harus diisi terlebih dahulu!");
  43.             }
  44.             else
  45.             {
  46.                 int a, b, c;
  47.                 a = int.Parse(this.textBox1.Text);
  48.                 b = int.Parse(this.textBox2.Text);
  49.                 c = a + b;
  50.                 string d = string.Concat(this.textBox1.Text, " + ");
  51.                 d = string.Concat(d, this.textBox2.Text);
  52.                 this.label5.Text = d;
  53.                 this.label4.Text = c.ToString();
  54.             }
  55.            
  56.         }
  57.  
  58.         private void button2_Click(object sender, EventArgs e)
  59.         {
  60.             if (string.IsNullOrEmpty(textBox1.Text) || string.IsNullOrEmpty(textBox2.Text))
  61.             {
  62.                 MessageBox.Show("Angka 1 dan Angka 2 harus diisi terlebih dahulu!");
  63.             }
  64.             else
  65.             {
  66.                 int a, b, c;
  67.                 a = int.Parse(this.textBox1.Text);
  68.                 b = int.Parse(this.textBox2.Text);
  69.                 c = a / b;
  70.                 string d = string.Concat(this.textBox1.Text, " / ");
  71.                 d = string.Concat(d, this.textBox2.Text);
  72.                 this.label5.Text = d;
  73.                 this.label4.Text = c.ToString();
  74.             }
  75.         }
  76.  
  77.         private void button5_Click(object sender, EventArgs e)
  78.         {
  79.             textBox1.Clear();
  80.             textBox2.Clear();
  81.             label4.Text = "";
  82.             label5.Text = "";
  83.         }
  84.  
  85.         private void label4_Click(object sender, EventArgs e)
  86.         {
  87.  
  88.         }
  89.  
  90.         private void button3_Click(object sender, EventArgs e)
  91.         {
  92.             if (string.IsNullOrEmpty(textBox1.Text) || string.IsNullOrEmpty(textBox2.Text))
  93.             {
  94.                 MessageBox.Show("Angka 1 dan Angka 2 harus diisi terlebih dahulu!");
  95.             }
  96.             else
  97.             {
  98.                 int a, b, c;
  99.                 a = int.Parse(this.textBox1.Text);
  100.                 b = int.Parse(this.textBox2.Text);
  101.                 c = a * b;
  102.                 string d = string.Concat(this.textBox1.Text, " x ");
  103.                 d = string.Concat(d, this.textBox2.Text);
  104.                 this.label5.Text = d;
  105.                 this.label4.Text = c.ToString();
  106.             }
  107.         }
  108.  
  109.         private void button4_Click(object sender, EventArgs e)
  110.         {
  111.             if (string.IsNullOrEmpty(textBox1.Text) || string.IsNullOrEmpty(textBox2.Text))
  112.             {
  113.                 MessageBox.Show("Angka 1 dan Angka 2 harus diisi terlebih dahulu!");
  114.             }
  115.             else
  116.             {
  117.                 int a, b, c;
  118.                 a = int.Parse(this.textBox1.Text);
  119.                 b = int.Parse(this.textBox2.Text);
  120.                 c = a - b;
  121.                 string d = string.Concat(this.textBox1.Text, " - ");
  122.                 d = string.Concat(d, this.textBox2.Text);
  123.                 this.label5.Text = d;
  124.                 this.label4.Text = c.ToString();
  125.             }
  126.         }
  127.  
  128.         private void label5_Click(object sender, EventArgs e)
  129.         {
  130.  
  131.         }
  132.     }
  133. }
  134.  
');