private void button3_Click(object sender, EventArgs e) { if (!backgroundWorker.IsBusy) { this.Invoke((Action)(() => { grid.clear(); DrawGrid(); })); } }