bool RollActivityPart(ref OMSDIO ini, ref int MessID, ref int LogStep, int ToStep) { if (LogStep > ToStep) { return(false); } if (MessID <= ini.GetMessageCount()) { string s = ini.GetMessage(MessID); if (!string.IsNullOrEmpty(s)) { EventConsumer.FireLogStepEvent(s); } MessID++; int MC = ini.GetMessageOfs(LogStep + 1); if ((MC > 0) && (MessID >= MC)) { if ((ini.GetFailBits() & (1 << LogStep)) == 0) //if ((ini.GetPassBits() & (1 << LogStep)) != 0) { EventConsumer.FireStepPassed(); InStep = false; } else { string ErrorLine; GetErrorDescription(out ErrorLine); throw new VideoException(ErrorLine); } do { // bypassing steps LogStep++; MC = ini.GetMessageOfs(LogStep); System.Threading.Thread.Sleep(1); }while ((MC > 0) && (MessID >= MC)); LogStep--; if (LogStep <= ToStep) { EventConsumer.FireBeginStep(StepNames[LogStep]); InStep = true; } } return(true); } else { System.Threading.Thread.Sleep(100); return(false); } }
private void LogOutput(ref int MsgFrom, OMSDIO Ini, int LogStep) { int MsgTo = Ini.GetMessageOfs(LogStep + 1); if ((MsgTo == 0) || (MsgTo < MsgFrom)) { MsgTo = Ini.GetMessageCount() + 1; } while (MsgFrom < MsgTo) { string s = Ini.GetMessage(MsgFrom++); if (!string.IsNullOrEmpty(s)) { EventConsumer.FireLogStepEvent(s); } } }