Texto da etiqueta C # não atualizando
Eu tenho o seguinte código
private void button1_Click(object sender, EventArgs e)
{
var answer =
MessageBox.Show(
"Do you wish to submit checked items to the ACH bank? \r\n\r\nOnly the items that are checked and have the status 'Entered' will be submitted.",
"Submit",
MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question,
MessageBoxDefaultButton.Button1);
if (answer != DialogResult.Yes)
return;
button1.Enabled = false;
progressBar1.Maximum = dataGridView1.Rows.Count;
progressBar1.Minimum = 0;
progressBar1.Value = 0;
progressBar1.Step = 1;
foreach (DataGridViewRow row in dataGridView1.Rows)
{
if ((string) row.Cells["Status"].Value == "Entered")
{
progressBar1.PerformStep();
label_Message.Text = @"Sending " + row.Cells["Name"].Value + @" for $" + row.Cells["CheckAmount"].Value + @" to the bank.";
Thread.Sleep(2000);
}
}
label_Message.Text = @"Complete.";
button1.Enabled = true;
}
Este é um teste que estou criando para portar para o meu aplicativo. Tudo funciona bem, mas o label_Message.text está sendo definido. Ele nunca aparece na tela. Está sendo definido, eu fiz um console.write para verificar. Apenas não está atualizando a tela. Também recebo o "Completo" no final.
Alguém tem alguma ideia