コード例 #1
0
        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("设置失败");
            }
        }
コード例 #2
0
        public void OnPrinterSettingChange(SPrinterSetting ss)
        {
            _ss = ss;
            GZClothMotionParam cc          = new GZClothMotionParam();
            DOUBLE_YAXIS       doubleYaxis = new DOUBLE_YAXIS();

            if (EpsonLCD.GetGZClothMotionParam(ref cc) && EpsonLCD.GetDoubleYAxis_Info(ref doubleYaxis))
            {
                rollingMotorCheckBox.Checked    = cc.enable != 0;
                comboBoxMotorMode.SelectedIndex = (cc.mode - 1);
                numericUpDownMotorSpeed.Value   = cc.speed;
                numericUpDownDoubeYRatio.Value  = (decimal)doubleYaxis.DoubeYRatio;
            }
        }
コード例 #3
0
        private void buttonMotorGet_Click(object sender, EventArgs e)
        {
            GZClothMotionParam cc          = new GZClothMotionParam();
            DOUBLE_YAXIS       doubleYaxis = new DOUBLE_YAXIS();

            if (EpsonLCD.GetGZClothMotionParam(ref cc) && EpsonLCD.GetDoubleYAxis_Info(ref doubleYaxis))
            {
                rollingMotorCheckBox.Checked    = cc.enable != 0;
                comboBoxMotorMode.SelectedIndex = (cc.mode - 1);
                numericUpDownMotorSpeed.Value   = cc.speed;
                numericUpDownDoubeYRatio.Value  = (decimal)doubleYaxis.DoubeYRatio;
            }
            else
            {
                MessageBox.Show("读取失败.");
            }
        }