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;
using System.Threading;
namespace kalkulator
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void przyciskmn_Click(object sender, EventArgs e)
{
textBox1.Text = "x";
if(textBox1.Text == "x")
{
Thread.Sleep(1000); //Tutaj mam problem
}
}
private void przyciskdz_Click(object sender, EventArgs e)
{
textBox1.Text += ":";
}
private void przyciskdo_Click(object sender, EventArgs e)
{
textBox1.Text += "+";
}
private void przyciskod_Click(object sender, EventArgs e)
{
textBox1.Text += "-";
}
private void przyciskcl_Click(object sender, EventArgs e)
{
textBox1.Clear();
}
}
}
Nie rozumiem dlaczego aplikacja najpierw stopuje a dopiero później pisze w textbox x. Czy da radę to zmienić?