C
Curious
I have two buttons on a form, "Pause" and "Continue".
When "Pause" button is clicked, it should:
1) Stop the background worker;
and, 2) Enable the "Continue" button.
I have the code below to explicitly enable the "Continue" button.
However, it's still not enabled. Anyone can tell me why? Thanks.
--------------------------------------------------------------------------------------------------------------------
protected void pauseButton_Click(object sender, EventArgs e)
{
if (mBaseWorker.BackgroundWorker != null)
{
mBaseWorker.BackgroundWorker.CancelAsync();
}
this.continueButton.Enabled = true;
this.Refresh();
}
--------------------------------------------------------------------------------------------------------------------
When "Pause" button is clicked, it should:
1) Stop the background worker;
and, 2) Enable the "Continue" button.
I have the code below to explicitly enable the "Continue" button.
However, it's still not enabled. Anyone can tell me why? Thanks.
--------------------------------------------------------------------------------------------------------------------
protected void pauseButton_Click(object sender, EventArgs e)
{
if (mBaseWorker.BackgroundWorker != null)
{
mBaseWorker.BackgroundWorker.CancelAsync();
}
this.continueButton.Enabled = true;
this.Refresh();
}
--------------------------------------------------------------------------------------------------------------------