public void SetPrinterStatusChanged(JetStatusEnum status, bool waitingPauseBetweenLayers = false) { switch (status) { case JetStatusEnum.Pause: case JetStatusEnum.Aborting: CalcuPrintTime.Stop(); break; case JetStatusEnum.Busy: CalcuPrintTime.Start(); break; } string strtext = ResString.GetEnumDisplayName(typeof(JetStatusEnum), status); if (PubFunc.Is3DPrintMachine() && waitingPauseBetweenLayers && status == JetStatusEnum.Ready) { status = JetStatusEnum.Pause; strtext = ResString.GetResString("PauseBetweenLayersStatus");// 层间暂停 } if (status == JetStatusEnum.Error) { strtext += "\n" + "[" + CoreInterface.GetBoardError().ToString("X8") + "]"; } //this.crystalLabel_Status.Text = strtext; #if SHIDAO inkTankStatusControl1.OnPrinterStatusChanged(status); purgeControl1.OnPrinterStatusChanged(status); #endif //gzPurgeControl1.OnPrinterStatusChanged(status); }
public void SetPrinterStatusChanged(JetStatusEnum status, bool waitingPauseBetweenLayers = false) { string strtext = ResString.GetEnumDisplayName(typeof(JetStatusEnum), status); if (PubFunc.Is3DPrintMachine() && waitingPauseBetweenLayers && status == JetStatusEnum.Ready) { status = JetStatusEnum.Pause; strtext = ResString.GetResString("PauseBetweenLayersStatus");// 层间暂停 } if (status == JetStatusEnum.Error) { strtext += "\n" + "[" + CoreInterface.GetBoardError().ToString("X8") + "]"; } this.crystalLabel_Status.Text = strtext; }
public void OnPrinterPropertyChange(SPrinterProperty sp) { if (PubFunc.IsFhzl3D() || PubFunc.IsZXHZ3D() || PubFunc.Is3DPrintMachine()) { this.m_NumericUpDown_3DZDownDis.Visible = true; this.m_NumericUpDown_ZAdjustment.Visible = false; } else// (PubFunc.IsKINCOLOR_FLAT_UV()) { this.m_NumericUpDown_3DZDownDis.Visible = false; this.m_NumericUpDown_ZAdjustment.Visible = true; m_NumericUpDown_ZAdjustment.Location = m_NumericUpDown_3DZDownDis.Location; } this.m_Label_3DSandDis.Visible = this.m_Label_3DFusionTime.Visible = this.m_Label_3DSandSpeed.Visible = this.m_NumericUpDown_3DSandDis.Visible = this.m_NumericUpDown_3DFusionTime.Visible = this.m_NumericUpDown_3DSandSpeed.Visible = false; this.cleanSetting3D1.OnPrinterPropertyChange(sp); }
private void UpdateJobInfoTextWith(int percent) { TimeSpan time = DateTime.Now - m_StartTime; string strTime = time.Hours.ToString() + ":" + time.Minutes.ToString() + ":" + time.Seconds.ToString(); string strPercentage = percent.ToString() + "%"; string unitStr = ResString.GetUnitSuffixDispName(UILengthUnit.Meter); string strArea = (m_fArea * percent / 100.0f).ToString() + " " + unitStr + "2"; float efficient = 0; if (time.TotalSeconds != 0) { efficient = (float)(m_fArea * percent / 100.0f) / (float)time.TotalHours; } string strEff = efficient.ToString() + " " + unitStr + "2/h"; string sjobId = "JobID:"; if (PubFunc.Is3DPrintMachine()) { sjobId = ResString.GetResString("JobID3D"); } if (m_bJobIDVisible) { this.m_LabelPrintingJobInfo.Text = strTime + "\n" + strPercentage + "\n" + strArea + "\n" + strEff + "\n" + sjobId + m_JobID.ToString() + "\n" + m_sJobInfo; } else { this.m_LabelPrintingJobInfo.Text = strTime + "\n" + strPercentage + "\n" + strArea + "\n" + strEff + "\n" + m_sJobInfo; } }
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); } }
private void UpdateJobInfoTextWith(int percent) { //为空时,不计算 try { if (m_curJob == null) { return; } TimeSpan time = CalcuPrintTime.Elapsed; // DateTime.Now - m_StartTime; m_curJob.AllCopiesTime = m_curJob.UsedTime + new TimeSpan(time.Days, time.Hours, time.Minutes, time.Seconds); //精确到秒,去掉毫秒 string strTime = time.Hours.ToString() + ":" + time.Minutes.ToString() + ":" + time.Seconds.ToString(); string strPercentage = percent.ToString() + "%"; string unitStr = ResString.GetUnitSuffixDispName(UILengthUnit.Meter); if (m_curUnit == UILengthUnit.Feet || m_curUnit == UILengthUnit.Inch) { unitStr = ResString.GetUnitSuffixDispName(m_curUnit); } string strArea = (m_fArea * percent / 100.0f).ToString() + " " + unitStr + "²"; if (m_IsLengthProgress) { strArea = (m_fLength * percent / 100.0f).ToString() + " " + unitStr; } float efficient = 0; float efficient_Length = 0; if (time.TotalSeconds != 0) { efficient = (float)(m_fArea * percent / 100.0f) / (float)time.TotalHours; efficient_Length = (float)(m_fLength * percent / 100.0f) / (float)time.TotalHours; } string strEff = efficient.ToString() + " " + unitStr + "²/h"; if (m_IsLengthProgress) { strEff = efficient_Length.ToString() + " " + unitStr + "/h"; } string sjobId = "JobID:"; if (PubFunc.Is3DPrintMachine()) { sjobId = ResString.GetResString("JobID3D"); } if (m_bJobIDVisible) { this.m_LabelPrintingJobInfo.Text = strTime + "\n" + strPercentage + "\n" + strArea + "\n" + strEff + "\n" + sjobId + m_JobID.ToString() + "\n" + m_sJobInfo; } else { this.m_LabelPrintingJobInfo.Text = strTime + "\n" + strPercentage + "\n" + strArea + "\n" + strEff + "\n" + m_sJobInfo; } } catch (Exception ex) { LogWriter.SaveOptionLog("Msg:" + ex.StackTrace); } }