public void OnPrinterStatusChanged(JetStatusEnum status) { UpdateButtonStates(status); SetPrinterStatusChanged(status); if (status == JetStatusEnum.Error) { OnErrorCodeChanged(CoreInterface.GetBoardError()); int errorCode = CoreInterface.GetBoardError(); SErrorCode sErrorCode = new SErrorCode(errorCode); if (SErrorCode.IsOnlyPauseError(errorCode)) { string errorInfo = SErrorCode.GetInfoFromErrCode(errorCode); if ( MessageBox.Show(errorInfo, ResString.GetProductName(), MessageBoxButtons.RetryCancel, MessageBoxIcon.Exclamation) == DialogResult.Retry) { CoreInterface.Printer_Resume(); } } } else { OnErrorCodeChanged(0); } if (status != JetStatusEnum.PowerOff && status != JetStatusEnum.Initializing && m_IsFATAL == false) { if (SPrinterProperty.IsGongZeng() || SPrinterProperty.IsDocanPrintMode() || SPrinterProperty.IsRuiZhi()) // 此功能按 厂商限定 { byte[] infos = new byte[19]; BYHX_SL_RetValue ret = BYHXSoftLock.GetDongleInfo(ref infos); if (ret == BYHX_SL_RetValue.SUCSESS) { byte[] dtV = new byte[4]; Buffer.BlockCopy(infos, 4, dtV, 0, dtV.Length); uint boardId = BitConverter.ToUInt32(dtV, 0); if (CoreInterface.IsFatal(boardId)) { m_IsFATAL = true; } } } else { m_IsFATAL = true; } } }
public void printJobInfomation(int mSErrorCode, UserLevel Level, string errStr) { if (mSErrorCode == 0) { this.labelMsg.Text = string.Empty; //清空错误信息 } else { this.labelMsg.Text = errStr; } SErrorCode err = new SErrorCode(mSErrorCode); if (Level != getUserLevel() || this.labelMsg.Text == "" || err.nErrorAction == (byte)ErrorAction.Init ) { return; } if (mErrorlistForm != null) { Color textC = Color.Red; if (SErrorCode.IsOnlyPauseError(mSErrorCode)) { labelMsg.ImageIndex = 1; this.tabPage1.ImageIndex = 1; textC = Color.Green; } else if (SErrorCode.IsWarningError(mSErrorCode)) { labelMsg.ImageIndex = 3; this.tabPage1.ImageIndex = 3; textC = Color.Purple; } else { labelMsg.ImageIndex = 0; this.tabPage1.ImageIndex = 0; textC = Color.Red; } this.mErrorlistForm.PrintJobInfomation(this.labelMsg.Text, textC); if (!this.mErrorlistForm.IsExpanded) { m_Errorring_Timer.Start(); } } }