예제 #1
0
        public void OnPrinterPropertyChange(SPrinterProperty sp)
        {
            m_sPrinterProperty = sp;
            fPulsePerInchX     = sp.fPulsePerInchX;

            //bool isSimpleUv = SPrinterProperty.IsSimpleUV();
            bool bshowReadyUvSet = PubFunc.GetUserPermission() == (int)UserPermission.SupperUser;

            m_checkbox_autoSwitchMode.Visible =
                label6.Visible             = cmb_UvLightType.Visible =
                    groupBox_Ready.Visible = bshowReadyUvSet;
            Type enumtype = typeof(UvLightType);

            UvLightType[] valse = (UvLightType[])Enum.GetValues(enumtype);
            for (int i = 0; i < valse.Length; i++)
            {
                string item = ResString.GetEnumDisplayName(enumtype, valse[i]);
                this.cmb_UvLightType.Items.Add(item);
            }
            groupBox_UVPower.Visible = SPrinterProperty.IsGongZengUv();

            groupBoxUVOffset.Visible = PubFunc.IsSupportUVOffsetDistance();

            if (groupBox_UVPower.Visible == false)
            {
                groupBoxUVOffset.Location = groupBox_UVPower.Location;
            }
        }
예제 #2
0
        public void OnPrinterPropertyChange(SPrinterProperty sp)
        {
#if SHIDAO
            inkTankStatusControl1.OnPrinterPropertyChanged(sp);
            purgeControl1.OnPrinterPropertyChanged(sp);
#endif
            maintenanceSystemStatus1.OnPrinterPropertyChanged(sp);

            gzPurgeControl1.Visible = SPrinterProperty.IsGongZengUv();
            gzPurgeControl1.OnPrinterPropertyChanged(sp);
        }
예제 #3
0
        public void ApplyToBoard()
        {
            int status = 0;

            status = OnGetRealTimeFromUI();
#if false
            ////////////////////////////////
            byte onelight = 1;
            if (m_CheckBoxOneLight.Checked)
            {
                onelight = 1;
            }
            else
            {
                onelight = 0;
            }
            const int  port = 1;
            const byte PRINTER_PIPECMDSIZE = 26;
            byte []    m_pData             = new byte[PRINTER_PIPECMDSIZE + 2];
            //First Send Begin Updater
            m_pData[0] = 2 + 1;
            m_pData[1] = 0x45;             //One Light mode
            m_pData[2] = onelight;

            if (CoreInterface.SetPipeCmdPackage(m_pData, m_pData[0], port) == 0)
            {
                MessageBox.Show(ResString.GetEnumDisplayName(typeof(UIError), UIError.SaveRealTimeFail));
                return;
            }
#endif
            byte[] uvPowerLevelMap = SerializationUnit.StructToBytes(_UvPowerLevelMap);
            uint   length          = (uint)uvPowerLevelMap.Length;
            int    ret             = CoreInterface.SetEpsonEP0Cmd(0x68, uvPowerLevelMap, ref length, 0, 0x01);
            if (ret == 0)
            {
                MessageBox.Show(ResString.GetResString("SetFailed"));
            }
            if (SPrinterProperty.IsGongZengUv())
            {
                GZUVX2Param.UVX1Power = (ushort)numUVX1Power.Value;
                GZUVX2Param.UVX2Power = (ushort)numUVX2Power.Value;
                if (!EpsonLCD.SetGZUVX2Param(GZUVX2Param))
                {
                    MessageBox.Show(ResString.GetResString("SetFailed"));
                }
            }
            if (CoreInterface.SetUVStatus(status) != 0)
            {
                if ((status & 0xf) == 0 || (status & 0xf0) == 0)
                {
                    MessageBox.Show(ResString.GetResString("OpenUV"));
                }
            }
            else
            {
                MessageBox.Show(ResString.GetEnumDisplayName(typeof(UIError), UIError.SaveRealTimeFail));
            }

            if (PubFunc.IsSupportUVOffsetDistance())
            {
                UVOffsetDistanceUI uvOffset = GetUVOffsetFromUI();
                EpsonLCD.SetUVOffsetDistToFw(uvOffset, fPulsePerInchX);
            }
        }
예제 #4
0
        public void OnPrinterSettingChange(AllParam allParam)
        {
            SPrinterSetting ss = allParam.PrinterSetting;

            m_uvLightType = (UvLightType)ss.UVSetting.eUvLightType;

            this.m_ComboBoxLeftSet.Items.Clear();
            this.m_ComboBoxRightSet.Items.Clear();
            this.m_ComboBoxPLeftSet.Items.Clear();
            this.m_ComboBoxPRightSet.Items.Clear();
            Type enumtype = typeof(UVStatus);

            if (m_uvLightType == UvLightType.UvLightType2 || m_uvLightType == UvLightType.UvLightType3)//(sp.IsAllWinZMeasurSensorSupport())
            {
                enumtype = typeof(UVStatus_ALLWIN);
                UVStatus_ALLWIN[] vals = (UVStatus_ALLWIN[])Enum.GetValues(enumtype);
                for (int i = 0; i < vals.Length; i++)
                {
                    string item = ResString.GetEnumDisplayName(enumtype, vals[i]);
                    this.m_ComboBoxLeftSet.Items.Add(item);
                    this.m_ComboBoxRightSet.Items.Add(item);
                    this.m_ComboBoxPLeftSet.Items.Add(item);
                    this.m_ComboBoxPRightSet.Items.Add(item);
                }
            }
            else
            {
                UVStatus[] vals = (UVStatus[])Enum.GetValues(enumtype);
                for (int i = 0; i < vals.Length; i++)
                {
                    string item = ResString.GetEnumDisplayName(enumtype, vals[i]);
                    this.m_ComboBoxLeftSet.Items.Add(item);
                    this.m_ComboBoxRightSet.Items.Add(item);
                    this.m_ComboBoxPLeftSet.Items.Add(item);
                    this.m_ComboBoxPRightSet.Items.Add(item);
                }
            }

            SUVSetting uvseting = ss.UVSetting;

            UIPreference.SetValueAndClampWithMinMax(this.numericUpDownShutterDis, uvseting.fShutterOpenDistance);
#if !DOUBLE_SIDE_PRINT_HAPOND
            UIPreference.SetValueAndClampWithMinMax(this.numericUpDownLeftDis, uvseting.fLeftDisFromNozzel);
            UIPreference.SetValueAndClampWithMinMax(this.numericUpDownRightDis, uvseting.fRightDisFromNozzel);
            this.checkBox1Leftprinton.Checked  = (uvseting.iLeftRightMask & 0x02) != 0;
            this.checkBox1Rightprinton.Checked = (uvseting.iLeftRightMask & 0x01) != 0;
            this.checkBox2Leftprinton.Checked  = (uvseting.iLeftRightMask & 0x08) != 0;
            this.checkBox2Rightprinton.Checked = (uvseting.iLeftRightMask & 0x04) != 0;
#else
            UIPreference.SetValueAndClampWithMinMax(this.numericUpDownLeftDis, uvseting.fRightDisFromNozzel);
            UIPreference.SetValueAndClampWithMinMax(this.numericUpDownRightDis, uvseting.fLeftDisFromNozzel);
            this.checkBox1Leftprinton.Checked  = (uvseting.iLeftRightMask & 0x04) != 0;
            this.checkBox1Rightprinton.Checked = (uvseting.iLeftRightMask & 0x08) != 0;
            this.checkBox2Leftprinton.Checked  = (uvseting.iLeftRightMask & 0x01) != 0;
            this.checkBox2Rightprinton.Checked = (uvseting.iLeftRightMask & 0x02) != 0;
#endif
            this.cmb_UvLightType.SelectedIndex = ss.UVSetting.eUvLightType;
            if (SPrinterProperty.IsGongZengUv())
            {
                if (EpsonLCD.GetGZUVX2Param(ref GZUVX2Param))
                {
                    numUVX1Power.Value = GZUVX2Param.UVX1Power <= 100 ? GZUVX2Param.UVX1Power : 0;
                    numUVX2Power.Value = GZUVX2Param.UVX2Power <= 100 ? GZUVX2Param.UVX2Power : 0;
                }
            }

            if (PubFunc.IsSupportUVOffsetDistance())
            {
                if (allParam.ExtendedSettings.UVOffsetDis.OffsetDistArray != null && allParam.ExtendedSettings.UVOffsetDis.OffsetDistArray.Length >= 8)
                {
                    UIPreference.SetValueAndClampWithMinMax(this.numPLOpen, allParam.ExtendedSettings.UVOffsetDis.OffsetDistArray[0]);
                    UIPreference.SetValueAndClampWithMinMax(this.numPLClose, allParam.ExtendedSettings.UVOffsetDis.OffsetDistArray[1]);
                    UIPreference.SetValueAndClampWithMinMax(this.numPROpen, allParam.ExtendedSettings.UVOffsetDis.OffsetDistArray[2]);
                    UIPreference.SetValueAndClampWithMinMax(this.numPRClose, allParam.ExtendedSettings.UVOffsetDis.OffsetDistArray[3]);

                    UIPreference.SetValueAndClampWithMinMax(this.numPLOpen2, allParam.ExtendedSettings.UVOffsetDis.OffsetDistArray[4]);
                    UIPreference.SetValueAndClampWithMinMax(this.numPLClose2, allParam.ExtendedSettings.UVOffsetDis.OffsetDistArray[5]);
                    UIPreference.SetValueAndClampWithMinMax(this.numPROpen2, allParam.ExtendedSettings.UVOffsetDis.OffsetDistArray[6]);
                    UIPreference.SetValueAndClampWithMinMax(this.numPRClose2, allParam.ExtendedSettings.UVOffsetDis.OffsetDistArray[7]);
                }
            }
        }