Facebook
From Chocolate Octupus, 5 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 321
  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.  
  12. namespace WindowsFormsApp2
  13. {
  14.     public partial class Form1 : Form
  15.     {
  16.         Double value = 0;
  17.         string operacja = "";
  18.             bool operacia_press = false;
  19.         public Form1()
  20.         {
  21.             InitializeComponent();
  22.         }
  23.  
  24.         private void label1_Click(object sender, EventArgs e)
  25.         {
  26.  
  27.         }
  28.  
  29.         private void Form1_Load(object sender, EventArgs e)
  30.         {
  31.  
  32.  
  33.         }
  34.  
  35.         private void button1_Click(object sender, EventArgs e)
  36.         {
  37.             Wynik.Text = "0";
  38.  
  39.         }
  40.  
  41.         private void button16_Click(object sender, EventArgs e)
  42.         {
  43.  
  44.         }
  45.  
  46.         private void button12_Click(object sender, EventArgs e)
  47.         {
  48.  
  49.         }
  50.  
  51.         private void plusMinus_Click(object sender, EventArgs e)
  52.         {
  53.  
  54.         }
  55.  
  56.  
  57.  
  58.         private void button_Click(object sender, EventArgs e)
  59.         {
  60.            
  61.            
  62.             Button b = (Button)sender;
  63.             Wynik.Text = Wynik.Text + b.Text;
  64.         }
  65.  
  66.  
  67.         private void operacja_click(object sender, EventArgs e)
  68.         {
  69.             Button b = (Button)sender;
  70.             operacja = b.Text;
  71.             value = Double.Parse(Wynik.Text);
  72.             operacia_press = true;
  73.         }
  74.  
  75.         private void button17_Click(object sender, EventArgs e)
  76.         {
  77.             switch(operacja)
  78.  
  79.                 case "+":
  80.                  Wynik.Text = value + Double.Parse(Wynik.Text)).ToString();
  81.                 break;
  82.  
  83.  
  84.  
  85.  
  86.             }
  87.     }
  88. }
  89.