private void btnCTest_Click(object sender, EventArgs e) { NMC.HardwareSigStart2Hardware(); bool flag = NMC.HardwareGo(1, 100, 10); if (!flag) { MessageShow.show("Bscan move failed, pls check!", "B扫运动失败,请检查!"); return; } NMC.HardwareSigStop2Hardware(); }
private void btnOk_Click(object sender, EventArgs e) { bool flag = false; if (nudVelocity.Text == "" || nudRange.Text == "") { MessageShow.show("Warning:Inputting is null, please input!", "警告:输入为空,请重新输入!"); return; } double speed = Convert.ToDouble(nudVelocity.Value); double range = Convert.ToDouble(nudRange.Value); NMC.HardwareSigStart2Hardware(); flag = NMC.HardwareGo(axisIndex, range, speed); if (!flag) { MessageShow.show("Bscan move failed, pls check!", "B扫运动失败,请检查!"); return; } NMC.HardwareSigStop2Hardware(); }