private void textBox1_KeyPress(object sender, KeyPressEventArgs e) { if ((e.KeyChar == '\r')) { if (evokWork.IsPause()) { resetBtn.Focus(); } else { MessageBox.Show("数据只能在暂停时修改!"); } } }