public void OnGetPrinterSetting(ref SPrinterSetting ss) { //if (SPrinterProperty.IsSurportCapping()) { WetParam wetParam = new WetParam(); wetParam.ActiveLen = 18; // 回保湿位置 wetParam.PosMask = (byte)(checkBoxEnableCappingPosX.Checked ? 1 : 0); // xyz都启用 if (checkBoxEnableCappingPosY.Checked) { wetParam.PosMask |= (1 << 1); } if (checkBoxEnableCappingPosZ.Checked) { wetParam.PosMask |= (1 << 2); } if (checkBoxsalverPos.Checked) { wetParam.PosMask |= (1 << 3); } wetParam.Enable = (byte)(checkBoxEnableAutoCapping.Checked ? 1 : 0); wetParam.XPos = (int)(UIPreference.ToInchLength(m_CurrentUnit, (float)numCappingPosX.Value) * m_sPrinterProperty.fPulsePerInchX); wetParam.YPos = (int)(UIPreference.ToInchLength(m_CurrentUnit, (float)numCappingPosY.Value) * m_sPrinterProperty.fPulsePerInchY); wetParam.ZPos = (int)(UIPreference.ToInchLength(m_CurrentUnit, (float)numCappingPosZ.Value) * m_sPrinterProperty.fPulsePerInchZ); wetParam.WaitTime = (uint)((float)numCappingDelayTime.Value * 1000f); //回缺省位置 wetParam.DefaultBackPosMask = (byte)(checkBoxXHomePos.Checked ? 1 : 0); // xyz都启用 if (checkBoxYHomePos.Checked) { wetParam.DefaultBackPosMask |= (1 << 1); } wetParam.DefaultBackDelayEnable = (byte)(checkBoxEnableHomeDelay.Checked ? 1 : 0); wetParam.DefaultBackXPos = (int)(UIPreference.ToInchLength(m_CurrentUnit, (float)numHomePosX.Value) * m_sPrinterProperty.fPulsePerInchX); wetParam.DefaultBackYPos = (int)(UIPreference.ToInchLength(m_CurrentUnit, (float)numHomePosY.Value) * m_sPrinterProperty.fPulsePerInchY); wetParam.BackDefaultPosWaitTime = (uint)((float)numAutoHomeDelay.Value * 1000f); wetParam.cover4Place = (int)numSalverPos.Value; if (!EpsonLCD.SetWetParam(wetParam)) { MessageBox.Show("Set Capping parametas fail!"); } } }