예제 #1
0
        public void OnPrinterPropertyChange(SPrinterProperty sp)
        {
#if SHIDAO
            inkTankStatusControl1.OnPrinterPropertyChanged(sp);
            purgeControl1.OnPrinterPropertyChanged(sp);
#endif
            if (PubFunc.SupportLengthProgress())
            {
                m_IsLengthProgress = true;
            }

            maintenanceSystemStatus1.OnPrinterPropertyChanged(sp);
            m_bShowGzPurgeControl   = sp.ShowGzPurgeControl();
            gzPurgeControl1.Visible = m_bShowGzPurgeControl;
            if (m_bShowGzPurgeControl)// gzPurgeControl1控件按最大8色设计,自由布局下不显示则不进行初始化
            {
                gzPurgeControl1.OnPrinterPropertyChanged(sp);
            }
        }
예제 #2
0
        public void OnPrinterPropertyChange(SPrinterProperty sp)
        {
            try
            {
                _printerProperty = sp;
                m_TabPagePrinterSetting.SuspendLayout();
                this.m_TabControlSetting.SuspendLayout();
                this.SuspendLayout();
                if (sp.EPSONLCD_DEFINED)
                {
                    this.m_BaseSetting.Dock         = DockStyle.None;
                    this.m_BaseSetting.Visible      = false;
                    this.m_epsonBaseSetting.Visible = true;
                    this.m_epsonBaseSetting.Dock    = DockStyle.Fill;
                }
                else
                {
                    this.m_epsonBaseSetting.Dock    = DockStyle.None;
                    this.m_epsonBaseSetting.Visible = false;
                    this.m_BaseSetting.Visible      = true;
                    this.m_BaseSetting.Dock         = DockStyle.Fill;
                }

                this.m_TabControlSetting.ResumeLayout(false);
                this.m_TabPagePrinterSetting.ResumeLayout(false);
                this.ResumeLayout(false);

                if (this.m_TabControlSetting.TabPages.Contains(this.m_TabPageCaliSetting))
                {
                    this.m_TabControlSetting.TabPages.Remove(this.m_TabPageCaliSetting);
                }

                if (sp.EPSONLCD_DEFINED)
                {
                    //if (this.m_TabControlSetting.TabPages.Contains(this.m_TabPageCaliSetting))
                    //    this.m_TabControlSetting.TabPages.Remove(this.m_TabPageCaliSetting);
                    if (this.m_TabControlSetting.TabPages.Contains(this.m_TabPageMoveSetting))
                    {
                        this.m_TabControlSetting.TabPages.Remove(this.m_TabPageMoveSetting);
                    }
                }
#if !ALLWIN
                //if (sp.IsDocan())
                {
                    if (this.m_TabControlSetting.TabPages.Contains(this.tabPageUVPowerLevel))
                    {
                        this.m_TabControlSetting.TabPages.Remove(this.tabPageUVPowerLevel);
                    }
                }
#endif
                if (sp.EPSONLCD_DEFINED)
                {
                    m_epsonBaseSetting.OnPrinterPropertyChange(sp);
                }
                else
                {
                    m_BaseSetting.OnPrinterPropertyChange(sp);
                }
                if (this.m_TabControlSetting.TabPages.Contains(this.m_TabPageCaliSetting))
                {
                    m_CalibrationSetting.OnPrinterPropertyChange(sp);
                }
                m_SeviceSetting.OnPrinterPropertyChange(sp);
                m_MoveSetting.OnPrinterPropertyChange(sp);
                spotColorSetting1.OnPrinterPropertyChange(sp);
                this.m_PreferenceSetting.OnPrinterPropertyChange(sp);
                this.m_Printer3DSetting.OnPrinterPropertyChange(sp);
                this.userExtensionSetting.OnPrinterPropertyChange(sp);
                doublePrintSetting1.OnPrinterPropertyChange(sp);
                //			m_RealTimeSetting.OnPrinterPropertyChange(sp);
                bool bNoRealPage =
                    ((sp.ePrinterHead == PrinterHeadEnum.Xaar_XJ128_80W) ||
                     (sp.ePrinterHead == PrinterHeadEnum.Xaar_XJ128_40W));
                //			if( bNoRealPage && m_TabControlSetting.TabPages.Contains(m_TabPageRealTime))
                //			{
                //				m_TabControlSetting.TabPages.Remove(m_TabPageRealTime);
                //			}
                //			else if(!bNoRealPage && !m_TabControlSetting.TabPages.Contains(m_TabPageRealTime))
                //			{
                //				m_TabControlSetting.TabPages.Add(m_TabPageRealTime);
                //			}
                bool bFacUser = (PubFunc.GetUserPermission() != (int)UserPermission.Operator);
                if (!bFacUser && m_TabControlSetting.TabPages.Contains(m_TabPageService))
                {
                    m_TabControlSetting.TabPages.Remove(m_TabPageService);
                }
                else if (bFacUser && !m_TabControlSetting.TabPages.Contains(m_TabPageService))
                {
                    m_TabControlSetting.TabPages.Add(m_TabPageService);
                }

                //bool isInwearSimpleUi = SPrinterProperty.IsInwearSimpleUi();
                if (!(sp.bSupportWhiteInk))
                {
                    this.m_TabControlSetting.TabPages.Remove(this.m_TabPageWriteColor);
                }

                m_TabControlSetting.SelectedIndex = 0;

                SwitchToAdvancedMode(PubFunc.IsKingColorAdvancedMode || PubFunc.Is3DPrintMachine());

                if (!PubFunc.SupportDoubleSidePrint)
                {
                    this.m_TabControlSetting.TabPages.Remove(this.m_tabPageDoublePrint);
                }

                //判断是否为3D打印
                if (!PubFunc.Is3DPrintMachine() &&
                    !PubFunc.IsKINCOLOR_FLAT_UV() &&
                    this.m_TabControlSetting.TabPages.Contains(this.m_TabPage_3DPrinter))
                {
                    this.m_TabControlSetting.TabPages.Remove(this.m_TabPage_3DPrinter);
                }

                //判断是否需要显示用户扩展设置
                if (!PubFunc.IsUserExtensionFormNeed() &&
                    this.m_TabControlSetting.TabPages.Contains(this.tabPageUserExtention))
                {
                    this.m_TabControlSetting.TabPages.Remove(this.tabPageUserExtention);
                }

                //判断是否显示打印模式
                if ((!UIFunctionOnOff.SupportPrintMode || !PubFunc.IsFactoryUser()) &&
                    this.m_TabControlSetting.TabPages.Contains(this.tabPagJobModes))
                {
                    this.m_TabControlSetting.TabPages.Remove(this.tabPagJobModes);
                }

                if (!UIFunctionOnOff.SupportMediaMode || !PubFunc.IsFactoryUser() &&
                    this.m_TabControlSetting.TabPages.Contains(this.tabPageMediaMode))
                {
                    this.m_TabControlSetting.TabPages.Remove(this.tabPageMediaMode);
                }

                if (!sp.ShowGzPurgeControl() && this.m_TabControlSetting.TabPages.Contains(tabPagePressureSet))
                {
                    this.m_TabControlSetting.TabPages.Remove(this.tabPagePressureSet);
                }
                else
                {
                    temperatureSetting1.Visible = !SPrinterProperty.IsGONGZENG_DOUBLE_SIDE();
                    pressureSetting1.OnPrinterPropertyChange(sp);
                }

                if (!UIFunctionOnOff.SupportCloseNozzle)
                {
                    this.m_TabControlSetting.TabPages.Remove(this.m_tabPageCloseColorNozzle);
                }

                if (!PubFunc.IsCustomCloseNozzle())
                {
                    this.m_TabControlSetting.TabPages.Remove(this.m_tabPageCustomCloseNozzle);
                }

                if (!SPrinterProperty.IsJianRui())
                {
                    this.m_TabControlSetting.TabPages.Remove(this.m_tabPageWorkPosSetting);
                }
                else
                {
                    workposSetting1.OnPrinterPropertyChange(sp);
                }

                if (!PubFunc.SupportDebugQuality())
                {
                    this.m_TabControlSetting.TabPages.Remove(this.m_tabPageCustomDebugQuality);
                }
                else
                {
                    debugQuality1.OnPrinterPropertyChange(sp);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
예제 #3
0
        public void OnPrinterStatusChanged(JetStatusEnum status)
        {
            _curStatus                   = status;
            buttonApply.Enabled          =
                buttonAllPurge.Enabled   =
                    btnAutoPurge.Enabled = status == JetStatusEnum.Ready || status == JetStatusEnum.Pause;
            if (_curStatus == JetStatusEnum.Ready && _property.ShowGzPurgeControl() && !_pressureTimer.Enabled)
            {
                _pressureTimer.Enabled = true;
            }
            if (_curStatus == JetStatusEnum.PowerOff && _property.ShowGzPurgeControl() && _pressureTimer.Enabled)
            {
                _pressureTimer.Enabled = false;
            }
            if (_curStatus != JetStatusEnum.PowerOff && _curStatus != JetStatusEnum.Initializing && _property.ShowGzPurgeControl())
            {
                _refreshTimer.Start();
                if (!_hasReaded)
                {
                    _hasReaded = true;
                    ushort pid, vid;
                    pid = vid = 0;
                    int ret = CoreInterface.GetProductID(ref vid, ref pid);
                    if (ret != 0)
                    {
                        if (vid == ((ushort)VenderID.GONGZENG_DOUBLE_SIDE))
                        {
                            bGzDoubleSide = true;
                        }
                        grouperHeater.Visible = !bGzDoubleSide;
                        if (!bGzDoubleSide)
                        {
                            grouperHeater.Visible = true;
                            float[] settemps = new float[8];
                            byte[]  buf      = new byte[64];
                            uint    bufsize  = (uint)buf.Length;
                            ret = CoreInterface.GetEpsonEP0Cmd(0x92, buf, ref bufsize, 0, 0xE0);
                            if (ret != 0)
                            {
                                for (int i = 0; i < settemps.Length; i++)
                                {
                                    if (buf.Length >= 2 + i * 2 + 2)
                                    {
                                        settemps[i] = BitConverter.ToInt16(buf, 2 + i * 2) / 100;
                                    }
                                }

                                for (int i = 0; i < _setTemps.Count; i++)
                                {
                                    _setTemps[i].Text = settemps[i].ToString("F1");
                                }
                            }
                        }
                    }
                }
            }
            else
            {
                _refreshTimer.Stop();
                bGetCurTempFailTimes = 0;
            }
        }