private void checkBoxReverse_CheckStateChanged(object sender, EventArgs e) { if (checkBoxReverse.Checked != Focuser.m_MotorReverse)//确保刷新状态下不发送 { bChanging = true; DialogResult dr = MessageBox.Show("Are you sure you want to change the direction of the stepper motor?", "Confirmation information", MessageBoxButtons.OKCancel, MessageBoxIcon.Question); if (dr == DialogResult.OK) { MyFocuser.SetReverse(checkBoxReverse.Checked); TimerCount = 0; } else { //MyFocuser.SetReverse(!checkBoxReverse.Checked); checkBoxReverse.Checked = !checkBoxReverse.Checked; } bChanging = false; } }