I've got richTextbox on my application and I want to refresh it every one second. When some function is called timer stops working.
private void button1_Click(object sender, EventArgs e)
{
//some selenium code to tests something
}
public void timer1_Tick(object sender, EventArgs e)
{
String Temp = richTextBox1.Text;
richTextBox1.Text = Counter + Temp;
Counter++;
}
flow:
- Run app
- richTextBox = 1... 12... 123... 1234
- Click on button (it takes 10 seconds to finish executing function)
- richTextBox = 1... 13... 123... 1234... 12345... 123456...
Is there possibility that during 3rd step timer will work as well?