private void SetData() { try { HapondMotorParam_Auto data = new HapondMotorParam_Auto(); data.Flag = new char[] { 'Y', 'T', 'O', 'Q' }; data.sysMode = (byte)(comboBoxControlMode.SelectedIndex); data.motorType = (byte)(comboBoxMotorType.SelectedIndex); data.torValue = (short)numericUpDownTorque.Value; data.headAdjustHei = (uint)numericUpDownPrintHeadHeight.Value; data.torSwitchStepVal = (short)numericUpDownLV.Value; data.torSwitchStepTime = (short)numericUpDownLT.Value; data.StepTimeOut = (short)numericUpDownTimeout.Value; data.SwitchType = (byte)(comboBoxSwitchType.SelectedIndex); EpsonLCD.SetMotionSetting(data); } catch (Exception ex) { MessageBox.Show(ex.Message); } }