private void BtnStop_Click(object sender, EventArgs e) { var msg = "程序并没启动"; if (IsStart) { msg = RuningWorker.Stop(); btnStart.Enabled = true; IsStart = false; } MessageBox.Show(msg); }
protected override void OnStop() { RuningWorker.Stop(); }