using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace WindowsFormsApp2 { public partial class Form1 : Form { Double value = 0; string operacja = ""; bool operacia_press = false; public Form1() { InitializeComponent(); } private void label1_Click(object sender, EventArgs e) { } private void Form1_Load(object sender, EventArgs e) { } private void button1_Click(object sender, EventArgs e) { Wynik.Text = "0"; } private void button16_Click(object sender, EventArgs e) { } private void button12_Click(object sender, EventArgs e) { } private void plusMinus_Click(object sender, EventArgs e) { } private void button_Click(object sender, EventArgs e) { Button b = (Button)sender; Wynik.Text = Wynik.Text + b.Text; } private void operacja_click(object sender, EventArgs e) { Button b = (Button)sender; operacja = b.Text; value = Double.Parse(Wynik.Text); operacia_press = true; } private void button17_Click(object sender, EventArgs e) { switch(operacja) case "+": Wynik.Text = value + Double.Parse(Wynik.Text)).ToString(); break; } } }