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); } }