private void buttonMotorSet_Click(object sender, EventArgs e) { if (numericUpDownDoubeYRatio.Value == 0) { MessageBox.Show("双轴偏差比例系数不能为0."); return; } GZClothMotionParam cc = new GZClothMotionParam { enable = (byte)(rollingMotorCheckBox.Checked == true ? 1 : 0), mode = (byte)(comboBoxMotorMode.SelectedIndex + 1), speed = (uint)numericUpDownMotorSpeed.Value }; DOUBLE_YAXIS doubleYaxis = new DOUBLE_YAXIS(); if (EpsonLCD.GetDoubleYAxis_Info(ref doubleYaxis)) { doubleYaxis.DoubeYRatio = (float)numericUpDownDoubeYRatio.Value; MessageBox.Show(EpsonLCD.SetGZClothMotionParam(cc) && EpsonLCD.SetDoubleYAxis_Info(doubleYaxis) ? "设置成功." : "设置失败."); } else { MessageBox.Show("设置失败"); } }