Beispiel #1
0
        private void RefreshUiParameter()
        {
            NKTParam nktParam = new NKTParam();

            if (EpsonLCD.GetNktParam(ref nktParam))
            {
                numBeltSpeed.Value = nktParam.BeltSpeed;
                numFeedSpeed.Value = nktParam.FeedSpeed;
                numStepSpeed.Value = nktParam.StepSpeed;
                if (m_SPrinterProperty.fPulsePerInchY > 0)
                {
                    float offset = nktParam.DetectorOffset / m_SPrinterProperty.fPulsePerInchY;
                    numDetectorOffset.Value = (decimal)UIPreference.ToDisplayLength(m_CurrentUnit, offset);
                }
                else
                {
                    MessageBox.Show(string.Format("fPulsePerInchY==0,nktParam.DetectorOffset={0}.",
                                                  nktParam.DetectorOffset));
                }
            }
            else
            {
                MessageBox.Show("获取参数失败.");
            }
        }