Disable the cancel button when already pressed.
This commit is contained in:
@@ -89,11 +89,14 @@ namespace ExportDXF.Forms
|
|||||||
{
|
{
|
||||||
if (worker.IsBusy)
|
if (worker.IsBusy)
|
||||||
{
|
{
|
||||||
|
button1.Enabled = false;
|
||||||
worker.CancelAsync();
|
worker.CancelAsync();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
worker.RunWorkerAsync();
|
{
|
||||||
|
worker.RunWorkerAsync();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void button2_Click(object sender, EventArgs e)
|
private void button2_Click(object sender, EventArgs e)
|
||||||
@@ -146,6 +149,7 @@ namespace ExportDXF.Forms
|
|||||||
comboBox1.Enabled = true;
|
comboBox1.Enabled = true;
|
||||||
|
|
||||||
button1.Image = Properties.Resources.play;
|
button1.Image = Properties.Resources.play;
|
||||||
|
button1.Enabled = true;
|
||||||
}));
|
}));
|
||||||
|
|
||||||
var duration = DateTime.Now - timeStarted;
|
var duration = DateTime.Now - timeStarted;
|
||||||
|
|||||||
Reference in New Issue
Block a user