private void btnSetting_Click(object sender, EventArgs e) { if (worker.IsBusy) { MessageBox.Show(this, "任务正在运行!", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } using (var dlg = new SettingDialog()) { var result = dlg.ShowDialog(this); if (result != DialogResult.OK) { return; } Init(WorkerType.Gen); } }
private void btnSetting_Click(object sender, EventArgs e) { if (worker.IsBusy) { MessageBox.Show(this, "任务正在运行!", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } using (var dlg = new SettingDialog()) { var result = dlg.ShowDialog(this); if (result != DialogResult.OK) return; Init(WorkerType.Gen); } }